-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
FvmwMFL did not get started because of wrong PID in pid file #1054
Comments
Hi, Thanks. I'm already aware of this. It's because of PID wrap-arounds. |
Thanks for your quick reply. Out of curiosity: What do you mean by "PID wrap-arounds"? That the PIDs generated by the kernel overflow? On my system I have:
And from the logs:
I'd think that FVWM had PID 1889, while FvwmMFL had PID 1971? Which doesn't seem to match a "classical PID wrap-around" as described e.g. here. Update: Fixed typo. |
There can only ever be one single instance of FvwmMFL running per FVWM instance/$DISPLAY. Currently, this is done with logging the PID of the running FvwmMFL process and using that to look up a process with the same PID. This is fragile though as the pid in the saved file might not be the samae PID of FvwmMFL -- therefore, FvwmMFL wouldn't start. Instead, switch to using a lock file which is predicated per $DISPLAY -- achieving the same result, but less error prone. Fixes #1054
Thanks a lot. Unfortunately, I hit this issue exactly once in 2 years of using FVWM 3 and I have not been able to reproduce it artificially, either. So the most reasonable thing seemed to be a review, which I did. Feel free to close this issue at your discretion. |
Yea, with rolling PIDs can be a bit random if it happens or not, but a better locking mechanism can still help out. |
There can only ever be one single instance of FvwmMFL running per FVWM instance/$DISPLAY. Currently, this is done with logging the PID of the running FvwmMFL process and using that to look up a process with the same PID. This is fragile though as the pid in the saved file might not be the samae PID of FvwmMFL -- therefore, FvwmMFL wouldn't start. Instead, switch to using a lock file which is predicated per $DISPLAY -- achieving the same result, but less error prone. Fixes #1054
Thanks for reporting your bug here! The following template will help with
giving as much information as possible so that it's easier to diagnose and
fix.
Upfront Information
Please provide the following information by running the command and providing
the output.
fvwm3 --version
)Debian testing
uname -sp
)Expected Behaviour
Module FvwmMFL gets started during FVWM startup. My startup function:
Actual Behaviour
Module FvwmMFL did not start. This one time, I have never seen that previously. And I could not reproduce it, so I can only provide post-mortem information.
In my journal I see these messages here (note that FVWM runs in debug mode and logs to the journal):
So the module thinks it is already running. Its pid file at that time looked like this:
What I do not understand:
I also tried restarting FVWM (from within FVWM), but that didn't help since the newly started FVWM process obviously inherits the PID of the old one:
Only after manually removing the PID file and then restarting FVWM would the FvwmMFL module start.
Some funny race condition during creation of the PID file? No further ideas here. If you don't have any ideas, either, feel free to close this issue as "not reproducible" ...
Thanks!
The text was updated successfully, but these errors were encountered: