A second pulseaudio daemon is spawned after logging out and back in even though one is already running for the user.

Bug #1167192 reported by Neil Wilson
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
Undecided
Luke Yelavich

Bug Description

If I log out on raring and back in again I get:

Apr 10 09:09:52 lenovo-3000-n100 pulseaudio[14091]: [pulseaudio] socket-server.c: bind(): Address already in use
Apr 10 09:09:52 lenovo-3000-n100 pulseaudio[14091]: [pulseaudio] module.c: Failed to load module "module-esound-protocol-unix" (argument: ""): initialization failed.
Apr 10 09:09:52 lenovo-3000-n100 pulseaudio[14091]: [pulseaudio] main.c: Module load failed.
Apr 10 09:09:52 lenovo-3000-n100 pulseaudio[14091]: [pulseaudio] main.c: Failed to initialize daemon.
Apr 10 09:09:52 lenovo-3000-n100 pulseaudio[14088]: [pulseaudio] main.c: Daemon startup failed.

If you check the process list you find another pulse audio running from the previous login session.

This fault disables the sound controls in the interface.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: pulseaudio 1:3.0-0ubuntu4b2
ProcVersionSignature: Ubuntu 3.8.0-17.27-generic 3.8.6
Uname: Linux 3.8.0-17-generic x86_64
ApportVersion: 2.9.2-0ubuntu5
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: neil 11485 F.... pulseaudio
CheckboxSubmission: 55cafa5b8b82ed224cc59d444cb1fc25
CheckboxSystem: 3e53d3ea5811723345f19eff5070f9ab
Date: Wed Apr 10 09:09:26 2013
InstallationDate: Installed on 2012-02-20 (414 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
MarkForUpload: True
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
SourcePackage: pulseaudio
UpgradeStatus: Upgraded to raring on 2013-04-05 (4 days ago)
dmi.bios.date: 04/30/07
dmi.bios.vendor: LENOVO
dmi.bios.version: 63ET62WW
dmi.board.name: CAPELL VALLEY(NAPA) CRB
dmi.board.vendor: LENOVO
dmi.board.version: Not Applicable
dmi.chassis.type: 10
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnLENOVO:bvr63ET62WW:bd04/30/07:svnLENOVO:pn0768BXG:pvr3000N100:rvnLENOVO:rnCAPELLVALLEY(NAPA)CRB:rvrNotApplicable:cvnNoEnclosure:ct10:cvrN/A:
dmi.product.name: 0768BXG
dmi.product.version: 3000 N100
dmi.sys.vendor: LENOVO

Revision history for this message
Neil Wilson (neil-aldur) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Changed in pulseaudio (Ubuntu):
assignee: nobody → Luke Yelavich (themuso)
Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 1167192] [NEW] pulseaudio fails to die properly on logout

A work-around is to remove the pulseaudio-esound-compat package, hopefully you don't use any apps that only support esound right?

Revision history for this message
Luke Yelavich (themuso) wrote :

THe commit 7fad67c46188991c04a42b190349ebb3f4a1756f causes this problem to occur, however the commit is not directly responsible. Rather there is something in our session startup that is not behaving correctly thats causing pulse clients to not find the original pulse daemon. Granted the pulse daemon should really be killed off at logout, and longer term upstart user session jobs will see to that, but for now, we need to find the problem, and at least work around it. Reverting this commit is certainly one option...

David, what do you think?

summary: - pulseaudio fails to die properly on logout
+ A second pulseaudio daemon is spawned after logging out and back in even
+ though one is already running for the user.
Revision history for this message
David Henningsson (diwic) wrote :

This is due to xdg_runtime_dir being deleted on logout. If we then log in again we cannot connect to ourselves ( /run/user/xxx/pulse/native has been deleted), and we're left with stale pulseaudio processes.

Changed in pulseaudio (Ubuntu):
assignee: Luke Yelavich (themuso) → David Henningsson (diwic)
status: Confirmed → In Progress
Revision history for this message
David Henningsson (diwic) wrote :

Hi Luke,

I've spent today working on a fix, which I have now uploaded to our bzr branch. Since this is last minute, could you help test it? I find it working, if you find it working too without causing some other regressions, feel free to upload it.

Thanks.

Changed in pulseaudio (Ubuntu):
assignee: David Henningsson (diwic) → Luke Yelavich (themuso)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:3.0-0ubuntu5

---------------
pulseaudio (1:3.0-0ubuntu5) raring; urgency=low

  * 0022-inotify-wrapper-Quit-daemon-if-pid-file-is-removed.patch:
    Fix stale pulseaudio processes after logout (LP: #1167192)
 -- David Henningsson <email address hidden> Wed, 17 Apr 2013 16:13:04 +0200

Changed in pulseaudio (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
baizon (baizon) wrote :

Updated the system this morning. After reboot the pulseaudio process takes 100% of one cpu core.

Revision history for this message
David Henningsson (diwic) wrote :

@baizon, already on it - filed as bug 1170313

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.