Description of problem: The pulseaudio daemon keeps crashing/exiting. Sounds stops working properly as a result. Version-Release number of selected component (if applicable): pulseaudio-0.9.8-5.fc8 How reproducible: It's been behaving like this ever since I upgraded to 0.9.8. Steps to Reproduce: 1. Start daemon 2. Start Rythmbox, play radio station 3. Leave it running 4. After a few hours, sounds stops Additional info: To help diagnose the problem, I have started the pulseaudio daemon on the command line, with the -vv option. I'll attach the output (all the way to the point it exists) since it might be too big to inline here.
Created attachment 298843 [details] Log of complete session of 'pulseaudio -vv'
Dimi: I'm wondering whether you're running another sound daemon in parallel? Please look if a system-wide pulseaudio or esd is not running. Also, what is your hadrware configuration that might influence this, such as sound hardware and cpu? Does pulseaudio daemon proceed co consume large amount of CPU time when run with --no-cpu-limit?
There shouldn't be any other sound server on the system. It's true, the Sound Preferences applet has Enable Software sound mixing (ESD) but AFAIK this is how one enables pulseaudio :) However, there's no esd running: [dimi@dimi ~]$ ps aux | grep esd root 4114 0.0 0.1 21876 3508 ? SN Mar21 0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd dimi 26428 0.0 0.0 396 104 pts/4 R+ 11:21 0:00 grep esd Also, I just have the one pulseaudio daemon that I started with -vv after the regular one exited: [dimi@dimi ~]$ ps aux | grep pulseaudio dimi 24834 0.9 0.1 56496 4480 pts/8 Sl+ Mar22 24:56 pulseaudio -vv dimi 26390 0.0 0.0 4044 660 pts/4 R+ 11:18 0:00 grep pulseaudio This last one lasted longer than the others, which used to exit after a few hours. This one has been up for almost 24h, but truth be told, I wasn't much at the computer over the weekend, so I didn't play that much music. I seem to remember seeing pulseaudio just take a lot of my CPU after hours of listening to music, to the point where I had to restart my session. I don't know why that was happening. I've restarted it now with the --no-cpu-limit option, see what happens. As for my hardware, I have Intel Core Duo 6400 @ 2.13GHz with 4GB of RAM.
Yes, I just experienced the following: I was listening to some local MP3s in Rythmbox, when pulseaudio daemon spiked to 100% CPU usage all of a sudden, stayed there for a bit, then died. Music stopped playing (of course), and Rythmbox started eating 100%CPU too, so I had to kill it.
Dimi: Nothing better comes to my mind, than trying to get a backtrace and eventually a core dump from pulseaudio when it enters this state. Would it be possible for you to install pulseaudio-debuginfo and either get a core dump with gcore, and then load it in gdb and get a stack trace, or attach gdb to pulse daemon with gdb -p and get a stack trace that way? (having a core dump would be preferred). Thanks
Lubomir, I'm afraid that would be close to impossible to do, as it is not easy to get it in that state, and it stays there only very little. I can isntall the debug-info, but how would that help? A better way would be to instrument pulseaudio to dump core instead of exiting, and then we can gather that info. If I get a complied .rpm with such a modification, I'd be more than willing to give it a spin.
So I changed the exit() to abort() in case the limit is triggered, and commited the change to rawhide. The build for Fedora 8 is here: http://koji.fedoraproject.org/koji/taskinfo?taskID=534654 Please try that one. To obtain the core file, you'll likely add something like this to your /etc/security/limits.conf: * - core unlimited Thanks!
OK, got it and running it now. BTW, where will I find the core dump?
$ ls -l /proc/`pidof pulseaudio`/cwd lrwxrwxrwx 1 lkundrak lkundrak 0 2008-03-27 21:02 /proc/19289/cwd -> / $ Uff, seems like pulseaudio chdirs to / upon startup. Would you mind adding yourself to acl of / (assuming you know what does it mean)?
I know, but never used them in Linux before... I did: [root@dimi ~]# setfacl -m u:dimi:rwx / So now I have" [root@dimi ~]# getfacl / getfacl: Removing leading '/' from absolute path names # file: . # owner: root # group: root user::rwx user:dimi:rwx group::r-x mask::rwx other::r-x Not that I much like that...
This morning I had no sound (I did for the last few days). Sure enough, pulseaudio was gone: [root@dimi ~]# ps aux | grep pulse root 5895 0.0 0.0 4044 664 pts/6 R+ 11:22 0:00 grep pulse [root@dimi ~]# But I could find no core file in /: [root@dimi ~]# ls -a / . .. .autofsck .autorelabel bin boot dev etc home lib lost+found media misc mnt net opt proc root sbin selinux .spamassassin srv .suspended sys tmp usr var I have the right permissions: [root@dimi ~]# getfacl / getfacl: Removing leading '/' from absolute path names # file: . # owner: root # group: root user::rwx user:dimi:rwx group::r-x mask::rwx other::r-x The right limits: [root@dimi ~]# grep core /etc/security/limits.conf # - core - limits the core file size (KB) #* soft core 0 * - core unlimited BTW, do I need to reboot to have these limits applied? I have the correct one installed: [root@dimi ~]# rpm -qa | grep pulse pulseaudio-libs-0.9.8-5.fc8.abort1 pulseaudio-module-jack-0.9.8-5.fc8.abort1 pulseaudio-module-zeroconf-0.9.8-5.fc8.abort1 pulseaudio-module-x11-0.9.8-5.fc8.abort1 pulseaudio-libs-glib2-0.9.8-5.fc8.abort1 pulseaudio-utils-0.9.8-5.fc8.abort1 pulseaudio-debuginfo-0.9.8-5.fc8.abort1 pulseaudio-core-libs-0.9.8-5.fc8.abort1 pulseaudio-module-bluetooth-0.9.8-5.fc8.abort1 pulseaudio-libs-zeroconf-0.9.8-5.fc8.abort1 pulseaudio-module-lirc-0.9.8-5.fc8.abort1 pulseaudio-0.9.8-5.fc8.abort1 pulseaudio-module-gconf-0.9.8-5.fc8.abort1 alsa-plugins-pulseaudio-1.0.15-3.fc8.1 pulseaudio-esound-compat-0.9.8-5.fc8.abort1 I have restarted it with -vv in a terminal. Do I need to tweak anything else?
OK, the thing keeps dying, yet I found no core file anywhere (I even rebooted the box in the meantime). It is interesting to note that it seems pulseaudio dies sometimes during the night when no music is playing. For example, last night I _paused_ Rythmbox before going to bed, in the morning the daemon was dead. However, I started it in a console with -vv, to get more info (still no core file anywhere that I can find). These are the last few lines: I: sink-input.c: Created input 99 "ALSA Playback" on alsa_output.pci_8086_284b_alsa_playback_0 with sample spec s16le 2ch 44100Hz and channel map front-left,front-right D: memblockq.c: memblockq requested: maxlength=52920, tlength=35280, base=4, prebuf=33516, minreq=1764 D: memblockq.c: memblockq sanitized: maxlength=52920, tlength=35280, base=4, prebuf=33516, minreq=1764 I: sink-input.c: Freeing output 99 "ALSA Playback" I: module-volume-restore.c: Restoring sink for <pulsecore/protocol-native.c$ALSA plug-in [rhythmbox]> I: module-volume-restore.c: Restoring volume for <pulsecore/protocol-native.c$ALSA plug-in [rhythmbox]> D: module-suspend-on-idle.c: Sink alsa_output.pci_8086_284b_alsa_playback_0 becomes busy. I: sink-input.c: Created input 100 "ALSA Playback" on alsa_output.pci_8086_284b_alsa_playback_0 with sample spec s16le 2ch 44100Hz and channel map front-left,front-right D: memblockq.c: memblockq requested: maxlength=52920, tlength=35280, base=4, prebuf=33516, minreq=1764 D: memblockq.c: memblockq sanitized: maxlength=52920, tlength=35280, base=4, prebuf=33516, minreq=1764 I: sink-input.c: Freeing output 100 "ALSA Playback" I: module-volume-restore.c: Restoring sink for <pulsecore/protocol-native.c$ALSA plug-in [rhythmbox]> I: module-volume-restore.c: Restoring volume for <pulsecore/protocol-native.c$ALSA plug-in [rhythmbox]> D: module-suspend-on-idle.c: Sink alsa_output.pci_8086_284b_alsa_playback_0 becomes busy. I: sink-input.c: Created input 101 "ALSA Playback" on alsa_output.pci_8086_284b_alsa_playback_0 with sample spec s16le 2ch 44100Hz and channel map front-left,front-right D: memblockq.c: memblockq requested: maxlength=52920, tlength=35280, base=4, prebuf=33516, minreq=1764 D: memblockq.c: memblockq sanitized: maxlength=52920, tlength=35280, base=4, prebuf=33516, minreq=1764 D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Device, path=/org/freedesktop/Hal/devices/usb_device_47f_ca1_00100_0429034410003_V060000A_if3_logicaldev_input, member=Condition Soft CPU time limit exhausted, terminating. Hard CPU time limit exhausted, terminating forcibly. Aborted
for me, gdm starts its own pulseaudio, while my gnome starts another. and, true, mine pulse crashes when using some multimedia app. for rhythmbox, causes memory leak.
What kind of soundcard is this? Which driver does this use? Does it need the "multi" plugin from ALSA?
[root@dimi ~]# lspci | grep -i audio 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02) [root@dimi ~]# lsmod | grep -i snd snd_hda_intel 297441 5 snd_seq_dummy 6725 0 snd_usb_audio 79681 4 snd_seq_oss 31553 0 snd_seq_midi_event 9665 1 snd_seq_oss snd_seq 48945 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event snd_pcm_oss 44353 0 snd_mixer_oss 17217 3 snd_pcm_oss snd_pcm 70981 4 snd_hda_intel,snd_usb_audio,snd_pcm_oss snd_timer 21317 2 snd_seq,snd_pcm snd_usb_lib 18241 1 snd_usb_audio snd_rawmidi 22465 1 snd_usb_lib snd_page_alloc 11593 2 snd_hda_intel,snd_pcm snd_seq_device 10317 4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi snd_hwdep 10693 2 snd_hda_intel,snd_usb_audio snd 48325 26 snd_hda_intel,snd_seq_dummy,snd_usb_audio,snd_seq_oss,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_usb_lib,snd_rawmidi,snd_seq_device,snd_hwdep soundcore 9505 3 snd
Lennart, I have no idea what this "multi" plugin for ALSA is. You mentioned aplay -v, this is what I have: [dimi@dimi ~]$ aplay -v ~/music/Smooth.mp3 Playing raw data '/home/dimi/music/Smooth.mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono ALSA <-> PulseAudio PCM I/O Plugin Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : U8 subformat : STD channels : 1 rate : 8000 exact rate : 8000 (8000/1) msbits : 8 buffer_size : 4000 period_size : 1000 period_time : 125000 tick_time : 0 tstamp_mode : NONE period_step : 1 sleep_min : 0 avail_min : 1000 xfer_align : 1000 start_threshold : 4000 stop_threshold : 4000 silence_threshold: 0 silence_size : 0 boundary : 2097152000
Are you using stock PA config files? Or did you modify them in any way?
AFAIR I am using stock PA config files. I'm fairly certain I did not touch them by hand, but it's been a long time and I can not be 100% sure. Just let me know if you need to look at any of them.
Di you toggle any of the checkboxes of paprefs?
All are checked with the exception of first one "Show notifications for discovered servers" which is unchecked.
paprefs, not padevchooser. padevchooser is mostly obsolete.
Nothing is checked, except under "Simultaneous Output" the "Add virtual output device for ...". But it had the exact same problem when this was unchecked.
Make sure to disable simultaneous output. Edit deamon.conf and enable 'no-cpu-limit'. This will cause PA to continue running when we eat 100% CPU. Then, try to reproduce the issue and paste the output of "ls" in "pacmd". (pacmd might take a while to start when we use 100% CPU, so please be patient, it should react eventually)
Created attachment 312309 [details] Out of "ls" in "pacmd"
Hm, I think this was not quite right: this time around it was mixer_applet2 (gnome-applets-2.20.1-1.fc8) that was using 100% CPU. Also, I have noticed that lately PA no longer crashes so easily, I can now listen for hours on end without it dying. Unfortunately I can say more than this as I have given up music on my box for more than a month, so I'm not quite sure when the problem got fixed. I'll keep an eye open, as I now run PA with the "no-cpu-limit" option.
Closing this bug now.