Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeskTopName leaks #1157

Open
lormaccone opened this issue Jan 2, 2025 · 2 comments
Open

DeskTopName leaks #1157

lormaccone opened this issue Jan 2, 2025 · 2 comments
Labels
relates:module Issue is in module code type:bug Something's broken!
Milestone

Comments

@lormaccone
Copy link

lormaccone commented Jan 2, 2025

Upfront Information

Please provide the following information by running the command and providing
the output.

  • Fvwm3 version (run: fvwm3 --version)

  • fvwm3 1.1.2 (1.1.1-22-g8db8fa34)
    with support for: XPM, PNG, Shape, XShm, SM, XRandR, XRender, XCursor, XFT, XFixes, NLS

  • Linux distribution or BSD name/version

  • Gentoo linux

  • Platform (run: uname -sp)

  • Linux Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz

Expected Behaviour

I am updating DeskTopName every 10 seconds to display the time:

#!/bin/bash
while [ 1 ]
do
data=date +%d/%m-%H:%M
for i in $(seq 0 3); do FvwmPrompt "DesktopName $i $i $data"; done
sleep 10
done

Actual Behaviour

It works: it displays the current time on the pager, but it leaks x11 windows. By running xrestop, I see that, while running that script, the number of <unknown> instances grows continuously, until it runs out of windows " Maximum number of clients reached". It is not consistent (not every call of DeskTopName increases the instances), so it's difficult to debug. But it is certain that it is due to that command, I've been trying for a few days and I've tried to update DeskTopName in different manners (not only with FvwmPrompt, e.g. using PeriodicTasks), but it always gives the same problem: it's certainly due to updating DeskTopName, as I use FvwmPrompt for other things and it never displayed any issues.

Enabling logging

I enabled logging, but nothing related appears in the log file

Steps to Reproduce

How can the problem be reproduced?

Every time I run the above script, after a while (many hours) I get "Maximum number of clients reached" and I cannot open any more x11 clients, e.g. xterm..

  • Reduce the problem to the smallest fvwm configuration example (where
    possible). Start with a blank config file (fvwm3 -f/dev/null) and go from
    there.

This configuration file seems already to display the problem:

AddToFunc "InitFunction" "I" Module FvwmPager *
AddToFunc "InitFunction" "I" Module FvwmMFL

  • Does the problem also happen with Fvwm2?
    I don't know: it's not running on my system (it complains of some missing library)
    Include your configuration with this issue.

Does Fvwm3 crash?

No. killing fvwm does not release the extra windows. I need to restart Xorg.

Extra Information

  • Anything else we should know?

My heartfelt thanks for your work!! It's a GREAT window manager I've been using for decades! Thanks!

  • Feel free to take a screen capture or video and upload to this issue if you
    feel it would help.

  • Attach $HOME/.fvwm/fvwm3-output.log from the step above.

@lormaccone lormaccone added the type:bug Something's broken! label Jan 2, 2025
@ThomasAdam ThomasAdam added this to FVWM3 Jan 2, 2025
@ThomasAdam ThomasAdam added this to the 1.1.2 milestone Jan 2, 2025
@github-project-automation github-project-automation bot moved this to To do in FVWM3 Jan 2, 2025
@ThomasAdam ThomasAdam added the relates:module Issue is in module code label Jan 2, 2025
@ThomasAdam
Copy link
Member

Hi @lormaccone,

This is unusual. First of all, what you're achieving is very unconventional. We can do better. But for now, that's not the point.

As to what you're seeing with all these windows being created, we need to remember that this is actually going to be a problem with connections to the XServer itself -- and I suspect what's happening here is some of these connections via FvwmMFL are being held open.

Do you see the following when you've left your script running?

*FvwmPrompt 1.1.2 (1.1.1-19-ge222b4f49)

Press ^D or type 'exit' to end this session

If so, does that correspond to any of these <unknown> entries in xrestop?

@lormaccone
Copy link
Author

Yes, I agree I can do better, for now I've done it with a widget, but I can't get the desktopname to appear there. In any case, that's not the issue here.

Yes, I do see some *FvwmPrompt when I leave my script running, that's why I had changed my script to:

#!/bin/bash
while [ 1 ]
do
data=date +%d/%m-%H:%M
for i in $(seq 0 3); do echo exit|FvwmPrompt "DesktopName $i $i $data"; done
sleep 10
done

So that those instances are not left hanging. First of all, that shouldn't happen (maybe a different bug for FvwmPrompt?) because it appears that FvwmPrompt SOMETIMES (not always) doesn't see the arguments that are passed to it. In any case, even adding echo exit|FvwmPrompt I get no change in the end result, that's why I hadn't put it in my bug report. Moreover, xrestop says <unknown> whereas if that was the issue, I suppose it would say FwvmPrompt, no?

Thanks for your immediate reply!
Lorenzo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relates:module Issue is in module code type:bug Something's broken!
Projects
Status: To do
Development

No branches or pull requests

2 participants