Bug 513723

Summary: pulseaudio -k does not kill a running daemon
Product: [Fedora] Fedora Reporter: Abhi <purpose.multi>
Component: pulseaudioAssignee: Lennart Poettering <lpoetter>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 9CC: lkundrak, lpoetter, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-25 11:39:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
log from strace none

Description Abhi 2009-07-24 22:32:55 UTC
Description of problem:
pulseaudio -k does not kill the daemon.

Version-Release number of selected component (if applicable):


How reproducible:
every time

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

<code> ps aux|grep pulseaudio </code> shows a running process for the user. <code pulseaudio -k </code> issued by the same user does not kill the daemon. 
Console output:
<code>
** (process:5802): WARNING **: Error doing GetSessionForUnixProcess on ConsoleKit: org.freedesktop.DBus.GLib.UnmappedError.CkManagerError.Code0: Unable to lookup session information for process '5802'

** (process:5802): CRITICAL **: polkit_session_set_uid: assertion `session != NULL' failed
E: polkit.c: Cannot set UID on session object.
N: main.c: Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary priviliges:
N: main.c: We are not in group 'pulse-rt' and PolicyKit refuse to grant us priviliges. Dropping SUID again.
N: main.c: For enabling real-time scheduling please acquire the appropriate PolicyKit priviliges, or become a member of 'pulse-rt', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.
E: main.c: Failed to kill daemon.
process 5802: dbus_shutdown() called but connections were still live. This probably means the application did not drop all its references to bus connections.
  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted
</code>


Any help would be highly appreciated.

Comment 1 Lennart Poettering 2009-07-25 00:30:28 UTC
Please provide the output of "strace -o foo pulseudio -k" creates in the file 'foo'!

Comment 2 Abhi 2009-07-25 01:03:59 UTC
Created attachment 355122 [details]
log from strace

Just a thought: Could it be possible that the daemon is not killed because I launch pulseaudio without a pid file? If I start it with pid option set, 'pulseaudio -k' does kill it. However, it also produces all the messages, except for "Failed to kill daemon". 
It produces "Cannot set UID on session object" in both cases.

Thanks.

Comment 3 Lennart Poettering 2009-07-25 11:39:07 UTC
Yes, the pid file is necessary for making "-k" work. What's the point of dropping that?

Comment 4 Abhi 2009-07-26 05:48:15 UTC
I am not sure why the pulseaudio is started without the pid file. That piece of code was written by another developer.

However, when I start the pulseaudio daemon with the pid file and try to kill it using "pulseaudio -k", it still produces the warnings and error. Eventually, the daemon is stopped, but I am not sure why its still complaining about setting UID on session object.

** (process:15238): WARNING **: Error doing GetSessionForUnixProcess on ConsoleKit: org.freedesktop.DBus.GLib.UnmappedError.CkManagerError.Code0: Unable to lookup session information for process '15238'

** (process:15238): CRITICAL **: polkit_session_set_uid: assertion `session != NULL' failed
E: polkit.c: Cannot set UID on session object.
N: main.c: Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary priviliges:
N: main.c: We are not in group 'pulse-rt' and PolicyKit refuse to grant us priviliges. Dropping SUID again.
N: main.c: For enabling real-time scheduling please acquire the appropriate PolicyKit priviliges, or become a member of 'pulse-rt', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.
process 15238: dbus_shutdown() called but connections were still live. This probably means the application did not drop all its references to bus connections.
  D-Bus not built with -rdynamic so unable to print a backtrace
Abandon