[Bug 1002492] New: checkproc: can not get session id for process 5378!
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 Bug ID: 1002492 Summary: checkproc: can not get session id for process 5378! Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.1 Hardware: x86-64 OS: openSUSE 42.1 Status: NEW Severity: Minor Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: jdelvare@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Every time I log into gnome, the following error message is logged in the journal: checkproc[1942]: checkproc: can not get session id for process 5378! Note that the process number of checkproc changes every time, however the problematic process number is always 5378, which I find rather suspicious. By the time I start a shell, there is no process 5378... if there ever was. The message immediately following this one in the journal is always: org.a11y.Bus[1952]: Activating service name='org.a11y.atspi.Registry' but there is no proof these are related. So I have no idea who is producing the error message. I believe such error message need to be improved to mention the name of both the calling service/process and some information about the process it looks for. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 Jean Delvare <jdelvare@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fbui@suse.com, | |lnussel@suse.com, | |werner@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 http://bugzilla.opensuse.org/show_bug.cgi?id=1002492#c1 --- Comment #1 from Franck Bui <fbui@suse.com> --- Hi Jean, maybe enabling systemd debug logs might give a hint (add systemd.log_level=debug to the kernel command line) ? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 http://bugzilla.opensuse.org/show_bug.cgi?id=1002492#c2 --- Comment #2 from Jean Delvare <jdelvare@suse.com> --- Franck, thanks for the suggestion, but setting systemd log level to debug did not add any message to the journal. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 http://bugzilla.opensuse.org/show_bug.cgi?id=1002492#c3 --- Comment #3 from Jean Delvare <jdelvare@suse.com> --- Created attachment 695428 --> http://bugzilla.opensuse.org/attachment.cgi?id=695428&action=edit Excerpt of the journal (as root) When run as root, journalctl shows a second checkproc error, for another pair of PIDs (which does change from one login to the next.) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 http://bugzilla.opensuse.org/show_bug.cgi?id=1002492#c4 --- Comment #4 from Jean Delvare <jdelvare@suse.com> --- # grep -r -l checkproc /etc/init.d/ /etc/init.d/dbus /etc/init.d/esound /etc/init.d/dvb /etc/init.d/lirc /etc/init.d/postfix # chkconfig | grep " on" avahi-daemon on dbus on postfix on # -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 http://bugzilla.opensuse.org/show_bug.cgi?id=1002492#c5 Jean Delvare <jdelvare@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|bnc-team-screening@forge.pr |xorg-maintainer-bugs@forge. |ovo.novell.com |provo.novell.com --- Comment #5 from Jean Delvare <jdelvare@suse.com> --- Franck helped me debug this and we have our suspect. checkproc is looking for gpg-agent, and is called by /etc/X11/xdm/sys.xsession. I looked in my ~/.gnupg to understand what was going on and found I have 2 agent.info* files: -rw-r--r-- 1 jdelvare users 50 Feb 7 2014 .gnupg/agent.info -rw-r--r-- 1 jdelvare users 50 Oct 3 18:11 .gnupg/agent.info-endymion:0 As you can see, the most recent file has the machine name and display appended. The "agent.info" file is old and should not be used any longer. However /etc/X11/xdm/sys.xsession is still reading it. It contains: GPG_AGENT_INFO=/tmp/gpg-UoEUHL/S.gpg-agent:5378:1 That file does not exist, and neither does the PID. I'm not too familiar with gpg-agent (*euphemism*) but I'd say /etc/X11/xdm/sys.xsession should try ~/.gnupg/agent.info-endymion:0 first if that's the new way to name the file, and only use ~/.gnupg/agent.info as a fallback. Or maybe to be on the safe side, if both files exist the most recent file should be used. In an ideal world I would expect the old file to be cleaned up automatically at some point. Users shouldn't have to carry old stuff forever. But I can live with whatever solution does not trigger an error. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 http://bugzilla.opensuse.org/show_bug.cgi?id=1002492#c6 --- Comment #6 from Jean Delvare <jdelvare@suse.com> --- I guess I can solve my problem locally by manually deleting the old file. But in the interest of all other users I'd prefer the bug to be fixed. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 http://bugzilla.opensuse.org/show_bug.cgi?id=1002492#c7 --- Comment #7 from Jean Delvare <jdelvare@suse.com> --- Having read the code, I now understand that the checkproc failures are actually expected. Even if I delete agent.info, I guess the agent.info-endymion:0 check would fail too after a reboot, as a new gpg-agent process has to be started at that point. So most likely the real fix here would be redirect checkproc's stderr to /dev/null so that the error messages don't get logged. Why journalctl only shows the first error when I'm not root would be a separate issue. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 http://bugzilla.opensuse.org/show_bug.cgi?id=1002492#c8 --- Comment #8 from Jean Delvare <jdelvare@suse.com> --- It turns out checkproc isn't writing to stderr. It's writing to the system log directly, and there doesn't seem to be any way to tell it not to :-( So no easy way to fix this. We could either implement option -q in checkproc (which is currently ignored) to skip warnings, or implement a new checkproc option to decide where to log the messages, instead of the current auto-detection. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 http://bugzilla.opensuse.org/show_bug.cgi?id=1002492#c9 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sndirsch@suse.com Assignee|xorg-maintainer-bugs@forge. |werner@suse.com |provo.novell.com | --- Comment #9 from Stefan Dirsch <sndirsch@suse.com> --- Let's assign this one to Werner. He's the author of checkproc after all. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 http://bugzilla.opensuse.org/show_bug.cgi?id=1002492#c13 --- Comment #13 from Jean Delvare <jdelvare@suse.com> --- (In reply to Dr. Werner Fink from comment #12)
The only idea I have is to check if the process its self exists and if not to skip the session test.
I was thinking along the same lines. It is a perfectly valid use case that the process doesn't exist, actually the whole point of calling checkproc is that the process may or may not exist. So no error nor warning should be logged in this case. I agree that we should not look for a session id for a process that doesn't exist, it doesn't make sense. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1002492 http://bugzilla.opensuse.org/show_bug.cgi?id=1002492#c14 --- Comment #14 from Jean Delvare <jdelvare@suse.com> --- A quick fix would be to check for errno when getsid() fails, and skip the warning if errno == ESRCH. (I have to admit I have no idea why checkproc checks the session ID in the first place, given that we are not passing option -i.) -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com