-
Notifications
You must be signed in to change notification settings - Fork 236
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
Also log command line for still running process #1255
Also log command line for still running process #1255
Conversation
@@ -177,6 +177,8 @@ def orphansKill(rootToKill, manual_forced=False): | |||
root = os.readlink("/proc/%s/root" % fn) | |||
if compare_two_paths_cached(root, rootToKill, path_cache): | |||
getLog().warning("Process ID %s still running in chroot. Killing with %s...", fn, killsig) | |||
with open("/proc/%s/cmdline" % fn) as f: | |||
getLog().warning("Process is %s", f.readline()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Can this end up with any exception that would potentially skip the os.kill()
call?
7242087
to
1d6502b
Compare
Looking deeper, "cmdline" is a list of strings, with NUL as separator...
Should be
|
Could this work?
|
Ok, thank you for your idea here! I'm trying to finalize this in #1268, feedback is welcome. |
For now we have in log
This is not easy to debug, especially as the process is killed, so doesn't exist anymore
With this PR we have
Which may be more useful
NOTICE: my python skill are close to 0, so this is mostly a RFE ;)
Perhaps a single line will be preferred (with cmdline instead of pid) ?