Pulseaudio crashes with pavucontrol

Bug #373450 reported by John Franklin
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: pulseaudio

Description: Ubuntu 9.04
Release: 9.04
--
pulseaudio:
  Installed: 1:0.9.14-0ubuntu20
  Candidate: 1:0.9.14-0ubuntu20
  Version table:
 *** 1:0.9.14-0ubuntu20 0
        500 http://archive.linux.duke.edu jaunty/main Packages
        100 /var/lib/dpkg/status
--
$ pulseaudio
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
I: caps.c: Dropping root privileges.
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
W: alsa-util.c: Cannot find fallback mixer control "PCM" or mixer control is no combination of switch/volume.
W: alsa-util.c: Cannot find fallback mixer control "Mic" or mixer control is no combination of switch/volume.
Soft CPU time limit exhausted, terminating.
E: cpulimit.c: Received request to terminate due to CPU overload.
W: module-rescue-streams.c: Failed to move source output 0 "PulseAudio Volume Control" to alsa_input.pci_10b9_5455_sound_card_0_alsa_capture_0.
W: module-rescue-streams.c: Failed to move source output 1 "PulseAudio Volume Control" to alsa_input.pci_1102_7_sound_card_0_alsa_capture_0.
W: module-rescue-streams.c: Failed to move source output 2 "PulseAudio Volume Control" to auto_null.monitor.
$
--
The error starts at "Soft CPU time limit..." after starting pavucontrol. The problem does not seem to happen when "default-sample-channels = 6" in /etc/pulse/daemon.conf is commented out.
---
$ lspci | grep audio
00:08.0 Multimedia audio controller: ALi Corporation M5455 PCI AC-Link Controller Audio Device (rev 20)
05:06.0 Multimedia audio controller: Creative Labs CA0106 Soundblaster
$
--
This problem also exists when the onboard sound (ALi Corporation M5455 PCI AC-Link Controller Audio Device (rev 20)) is disabled in the BIOS and deleting ~/.pulse ~/.asound* and /etc/asound.conf. This might have been a problem from before upgrading to Jaunty, but I did not use pavucontrol before the upgrade.
I would have included the output from "pulseaudio -vv" but it was too long and scrolled out of the gnome-terminal history buffer. If there is a way to dump "pulseaudio -vv" in a txt file and would be helpful, please let me know. I am including
/var/log/syslog
/var/log/user.log
/etc/pulse/daemon.conf
/etc/pulse/default.pa
Are there any other files which might be helpful?

Revision history for this message
John Franklin (hondaman-nc) wrote :
Revision history for this message
John Franklin (hondaman-nc) wrote :

Sorry, I probably should have included this as well.

$ apt-cache policy pavucontrol
pavucontrol:
  Installed: 0.9.7-1ubuntu3
  Candidate: 0.9.7-1ubuntu3
  Version table:
 *** 0.9.7-1ubuntu3 0
        500 http://archive.linux.duke.edu jaunty/universe Packages
        100 /var/lib/dpkg/status

What other information would be helpful?

Revision history for this message
John Franklin (hondaman-nc) wrote :
Revision history for this message
John Franklin (hondaman-nc) wrote :
Revision history for this message
John Franklin (hondaman-nc) wrote :
Revision history for this message
John Franklin (hondaman-nc) wrote :
Revision history for this message
Sasquatch (sasquatch) wrote :

I have the same issue. When I have pavucontrol running for too long, it will crash PA. Too long is after about 20-30 seconds.

I don't know since when it exactly happened, but I do know that it didn't crash in previous Ubuntu builds. I know for sure that in 1:0.9.14-0ubuntu14, it didn't happen. That was the version I ran from the Jaunty development repo on my Intrepid install (which I still have on a different drive).

This bug is also triggered when using VirtualBox with PulseAudio selected for Host driver. This is the message I got on the terminal:
Soft CPU time limit exhausted, terminating.
E: cpulimit.c: Received request to terminate due to CPU overload.

It crashes without doing anything. Just having pavucontrol open, or start a VM, it just kills PA.

Strangely, the version I installed in a VM has 1:0.9.14-0ubuntu20.1, which would indicate is newer than the one reported here. But it was installed before Jaunty was final, so how come?
The packages were still saved in /var/cache/apt/archives, and checking their date with ls -l, I see that the .20 build was released on April 9, while the .20.1 build was released on April 27.
Another check on the releases, shows that .20.1, which seems to have a fix for this, is in the -proposed repo.

I will update to the proposed release and report back if it's fixed there.

Revision history for this message
Sasquatch (sasquatch) wrote :

Updating did not work. It still crashes when pavucontrol is running and 6 channels in /etc/pulse/daemon.conf is set.

Revision history for this message
John Franklin (hondaman-nc) wrote :

Okay, I finally figured out how to dump to a file. The daemon/pavucontrol crash around line 538 which says

Soft CPU time limit exhausted, terminating.
E: cpulimit.c: Received request to terminate due to CPU overload.

Is there no information or interest in this bug/problem at this time?

Revision history for this message
Sasquatch (sasquatch) wrote :

I've done some testing myself, and I thought it was the version of pulseaudio, and it's components, like pavucontrol. Since I didn't have any issues with the Jaunty build on my Intrepid, I downgraded the lot to the same version as my intrepid install. That is, PA 0.9.14-0ubuntu14 and pavucontrol 0.9.7-1ubuntu1, instead of Ubuntu build 3 from the repo. This did not help.
I did not change the additional libraries for the programs, only the pulseaudio libs.

I'm about to add the karmic repo and install PA from there, just to see if it's fixed there or not.

I really hate it that PA crashes when you want to change the volume of an application. You have to do that really fast, within a few seconds, else you have to start everything all over (PA, the audio program, etc.).

Revision history for this message
John Franklin (hondaman-nc) wrote :

Sasquatch, see if this helps any, go to terminal and type:
pulseaudio -k; pulseaudio -vvv > ~/pa.log 2>&1
This will output ~/pa.log until pavucontrol is opened and crashes pulseaudio. Would you post that pa.log file here? I cannot tell you much about pacmd because the literature is vague, but pacmd maybe able help a little. It is a cli for pulseaudio daemon. Caution, when entering and exit the pacmd environment, will cause pulseaudio daemon to exit and restart. Can use "pacmd help" for help instead of "pacmd --help".

Revision history for this message
Sasquatch (sasquatch) wrote :

Done that, here's the log file. I will now update to the Karmic release. First I didn't think the CPU was overloaded, but I didn't pay attention to the actual load. Now I see that the CPU is overloaded the moment you start the volume control.

Will report again if Karmic has fixed this.

Revision history for this message
Sasquatch (sasquatch) wrote :

I've updated, and it didn't work.

I've attached a second log file of that run, where I killed pulseadio manually. I now have changed one setting in daemon.conf which might be useful to stop this behaviour. The setting is "no-cpu-limit = yes". With this setting, your CPU will be overloaded for a few seconds, and after the time it would usually crash PA, it will drop to normal, without killing PA.

I will now downgrade again to the Jaunty version of PA, as there are some issues with the Karmic release. The channel volume is reset whenever PA is called or closed. Could also be a setting, changing it to system instance, like I had before, might do the trick too.

Revision history for this message
John Franklin (hondaman-nc) wrote :

Great sasquatch. Will you post your findings after you have "downgrade again to the Jaunty version of PA", set the "no-cpu-limit = yes", and restarted your computer? I am going to try the "no-cpu-limit" setting right now.

Revision history for this message
Sasquatch (sasquatch) wrote :

Same behaviour. CPU gets overloaded but it doesn't crash.
Only downside, when I start a VM, my CPU stays overloaded until I close it again. But at least it closes normally again.

Revision history for this message
John Franklin (hondaman-nc) wrote :

That sounds good. What do you mean VM? Virtual Machine? Volume Monitor? ???

Revision history for this message
Sasquatch (sasquatch) wrote :

Just like I said earlier, I run virtual machines using VirtualBox.

However, there is a difference between the Karmic build and the Jaunty version. In Karmic, the CPU went back to normal after a while, but with the Jaunty release, this doesn't happen.

Revision history for this message
John Franklin (hondaman-nc) wrote :

Sasquatch, are you familiar with PPA's? I do not know everything there is to know about them, but often the packages not yet release (still developing) are in here. Pulseaudio update here resolved this issue for me. Let me know if this works for you.

https://launchpad.net/~themuso/+archive/ppa

Revision history for this message
Sasquatch (sasquatch) wrote :

Which packages did you install from that PPA? All of the PulseAudio ones, or only the pavucontrol?

I have added some PPA's myself, so I know what they are.

Revision history for this message
John Franklin (hondaman-nc) wrote :

Sasquatch, I searched the PPA and realized it was mostly just pulseaudio packages, so through Synaptic Package Manager, I just installed all of the ones which were upgradeable.

Revision history for this message
Sasquatch (sasquatch) wrote :

With the updated pavucontrol, what happens if you change the balanced volume of your channels (lets say, you turn the front speakers down a bit to 80% and leave the rest at 100%), and open a new audio application or change the volume of a running app? Does that reset your channel volumes to the same level? It did with the Karmic version I ran, which happens to be the same version as in that PPA.

Revision history for this message
Sasquatch (sasquatch) wrote :

Since you didn't respond, I tried it myself. Got a few updates, which I luckily managed to revert. It didn't help a thing. Same junk as with the karmic release, my nicely balanced channels are gone the moment you start an app, or change the volume of one in the volume control. And as I said, the overload only happens for a few seconds, after which it then returns to normal level, when it would normally crash due to CPU overload.

You might as well have added the Karmic repo, put some apt-priority in place to make sure you don't upgrade your whole system to Karmic and upgrade from there.

Revision history for this message
John Franklin (hondaman-nc) wrote :

Sasquatch, I did not notice a problem like that. However, when I did set the volume in the playback section of navucontrol I noticed it screwed with the volumes of the output devices. Sounds similar, but not quite the same. At any rate, this is not a big issue for me. I realize Ubuntu is moving toward the latest version of pulseaudio and that it will consume the time of the programmers who can help with audio. Maybe it would be better to help with the future (which relieves the problem I was having) release and not only help the release, but also get my problems solved at the same time. I am sorry it did not work for you.

Revision history for this message
Sasquatch (sasquatch) wrote :

I found out why PA takes up so much CPU. I noticed it only by accident, and with the help of the new pavucontrol (0.9.8). When you set PA to use 6 channels, it also sets that for input. So your mic would record with 6 channels, not just 2. In the new pavucontrol, you can change the configuration on the fly. On the last tab, you have a dropdown box with the options to put the system in 5.1 analogue output with 5.1 analogue input, 5.1 analogue output with stereo input etc. When I had it set to use stereo input, no CPU usage, but when I changed it to 5.1 input, the CPU went crazy again.

So all that remains with the jaunty version is to figure out how to set the input to use only 2 channels, instead of 6.

Revision history for this message
Sasquatch (sasquatch) wrote :

I talked to Alam Lenny on IRC about PulseAudio, and my initial problem with 0.9.15 is solved. By setting flat-volumes = no to daemon.conf, my volume doesn't get reset when a new stream is opened, nor does the volume change on app level in pavucontrol reset it.
The fix for this bug is to install PulseAudio 0.9.15, along with pavucontrol 0.9.8 and configure it for 5.1 output and stereo input.

Revision history for this message
John Franklin (hondaman-nc) wrote :

With the PPA I have not had much trouble. I did set flat-volumes = no in daemon.conf just now, I will see if I still get crazy volume actions. In the pavucontrol configuration, I had set them to "Output Analog Stereo" and "Output Analog Surround 5.1" without any inputs because I do not record or need a mic/line in. I may in the future, but not to date. Thank you for the information, and let me know if you have any more significant revelations or problems.

Daniel T Chen (crimsun)
Changed in pulseaudio (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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