[Bug 407674] New: alsa/pulseaudio hangs when draining pcm
https://bugzilla.novell.com/show_bug.cgi?id=407674 Summary: alsa/pulseaudio hangs when draining pcm Product: openSUSE 11.1 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Sound AssignedTo: tiwai@novell.com ReportedBy: rkvinge@novell.com QAContact: qa@suse.de Found By: --- Created an attachment (id=226812) --> (https://bugzilla.novell.com/attachment.cgi?id=226812) Repro (C code) Repro: Download attached file. gcc -g pulse-audio-alsa-threaded.c -o pulse-audio-alsa-threaded -I/usr/include/alsa -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lasound -lglib-2.0 /pulse-audio-alsa-threaded Expected behaviour: A bunch of output (descending numbers) should be printed. When it reaches 0 (or close to 0), the program should exit. Actual behaviour: Program hangs after printing "Writing 100" Running with gdb gives these stack traces: (...) Writing 100 ^C Program received signal SIGINT, Interrupt. [Switching to Thread 0x4035d8d0 (LWP 6968)] 0xffffe430 in __kernel_vsyscall () (gdb) t a a bt Thread 3 (Thread 0x4091cb90 (LWP 6972)): #0 0xffffe430 in __kernel_vsyscall () #1 0x402681c7 in *__GI___poll (fds=0x8055c70, nfds=2, timeout=99) at ./sysdeps/unix/sysv/linux/poll.c:87 #2 0x40598b82 in poll_func (ufds=0x8055c70, nfds=2, timeout=99, userdata=0x804c4a8) at pulse/thread-mainloop.c:72 #3 0x4058aae9 in pa_mainloop_poll (m=0x8055a80) at pulse/mainloop.c:853 #4 0x4058c2d3 in pa_mainloop_iterate (m=0x8055a80, block=1, retval=0x0) at pulse/mainloop.c:919 #5 0x4058c3a4 in pa_mainloop_run (m=0x8055a80, retval=0x0) at pulse/mainloop.c:937 #6 0x40598933 in thread (userdata=0x8050ef8) at pulse/thread-mainloop.c:91 #7 0x405b9f42 in internal_thread_func (userdata=0x8050f18) at pulsecore/thread-posix.c:73 #8 0x402ed175 in start_thread (arg=0x4091cb90) at pthread_create.c:297 #9 0x40271dce in clone () from /lib/libc.so.6 Thread 2 (Thread 0x4055eb90 (LWP 6971)): #0 0xffffe430 in __kernel_vsyscall () #1 0x402f0c15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0x4027e2ed in __pthread_cond_wait (cond=0x804c4c8, mutex=0x804c4a8) at forward.c:139 #3 0x405b8e4c in pa_cond_wait (c=0x7, m=0xfffffe00) at pulsecore/mutex-posix.c:129 #4 0x4059825f in pa_threaded_mainloop_wait (m=0x8050ef8) at pulse/thread-mainloop.c:200 #5 0x40022eba in pulse_wait_operation () from /usr/lib/alsa-lib/libasound_module_pcm_pulse.so #6 0x40021f28 in ?? () from /usr/lib/alsa-lib/libasound_module_pcm_pulse.so #7 0x400c4ac9 in ?? () from /usr/lib/libasound.so.2 #8 0x4007b6c1 in snd_pcm_drop () from /usr/lib/libasound.so.2 #9 0x0804920a in loop (context=0x0) at pulse-audio-alsa-threaded.c:158 #10 0x402ed175 in start_thread (arg=0x4055eb90) at pthread_create.c:297 #11 0x40271dce in clone () from /lib/libc.so.6 Thread 1 (Thread 0x4035d8d0 (LWP 6968)): #0 0xffffe430 in __kernel_vsyscall () #1 0x402ed707 in pthread_join (threadid=1079372688, thread_return=0x0) at pthread_join.c:89 #2 0x08049278 in main () at pulse-audio-alsa-threaded.c:170 Notes: Changing "int samples_per_write = 100;" to anything >= 160 works, sometimes numbers just below 160 work too, but that's more random. Changing "int sending = samples * 10;" to less than 10 sometimes causes the hang to disappear too (haven't tried > 10) rolf@linux:/etc> rpm -qa | grep pulse libpulse0-0.9.10-26.1 pulseaudio-module-zeroconf-0.9.10-26.1 pulseaudio-debuginfo-0.9.10-26.1 pulseaudio-utils-0.9.10-26.1 pulseaudio-module-bluetooth-0.9.10-26.1 pulseaudio-debugsource-0.9.10-26.1 libpulsecore4-0.9.10-26.1 pulseaudio-module-gconf-0.9.10-26.1 pulseaudio-module-lirc-0.9.10-26.1 libpulse-mainloop-glib0-0.9.10-26.1 alsa-plugins-pulse-1.0.16-57.1 pulseaudio-module-x11-0.9.10-26.1 libpulse-browse0-0.9.10-26.1 pulseaudio-0.9.10-26.1 pulseaudio-esound-compat-0.9.10-26.1 Removing /etc/asound-pulse.conf makes the hang go away. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=407674 User rkvinge@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=407674#c1 --- Comment #1 from Rolf Bjarne Kvinge <rkvinge@novell.com> 2008-07-09 11:21:06 MDT --- snd_pcm_close calls snd_pcm_drop, so commenting out the call to snd_pcm_drop doesn't change anything. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=407674 User tiwai@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=407674#c2 Takashi Iwai <tiwai@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #2 from Takashi Iwai <tiwai@novell.com> 2008-07-10 09:31:52 MDT --- This must be a deadlock in pulse plugin. I'll investigate it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=407674 User tiwai@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=407674#c3 Takashi Iwai <tiwai@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |rkvinge@novell.com --- Comment #3 from Takashi Iwai <tiwai@novell.com> 2008-07-16 07:46:47 MDT --- Hmm, I can't reproduce this any more on FACTORY... Could check again after updating packages? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=407674 User rkvinge@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=407674#c4 --- Comment #4 from Rolf Bjarne Kvinge <rkvinge@novell.com> 2008-07-16 08:38:33 MDT --- neither 'zypper dup' nor 'zypper lu' shows any new pulseaudio-related packages. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=407674 User rkvinge@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=407674#c5 --- Comment #5 from Rolf Bjarne Kvinge <rkvinge@novell.com> 2008-07-16 08:39:33 MDT --- rolf@linux:> rpm -qa | grep pulse libpulse0-0.9.10-26.1 pulseaudio-module-zeroconf-0.9.10-26.1 pulseaudio-debuginfo-0.9.10-26.1 pulseaudio-utils-0.9.10-26.1 pulseaudio-module-bluetooth-0.9.10-26.1 pulseaudio-debugsource-0.9.10-26.1 libpulsecore4-0.9.10-26.1 pulseaudio-module-gconf-0.9.10-26.1 pulseaudio-module-lirc-0.9.10-26.1 libpulse-mainloop-glib0-0.9.10-26.1 alsa-plugins-pulse-1.0.16-57.1 pulseaudio-module-x11-0.9.10-26.1 libpulse-browse0-0.9.10-26.1 pulseaudio-0.9.10-26.1 pulseaudio-esound-compat-0.9.10-26.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=407674 User tiwai@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=407674#c6 --- Comment #6 from Takashi Iwai <tiwai@novell.com> 2008-07-16 09:33:58 MDT --- Did you take from FACTORY? Also don't forget to reset NEEDINFO. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=407674 User rkvinge@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=407674#c7 Rolf Bjarne Kvinge <rkvinge@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED Info Provider|rkvinge@novell.com | Resolution| |FIXED --- Comment #7 from Rolf Bjarne Kvinge <rkvinge@novell.com> 2008-07-17 23:21:39 MDT --- After finally finishing a 1.1 GB dl to update to Factory it seems to be fixed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=407674 User rkvinge@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=407674#c8 --- Comment #8 from Rolf Bjarne Kvinge <rkvinge@novell.com> 2008-07-17 23:22:51 MDT --- And for the record these are the packages I have installed now: rolf@linux:~/test> rpm -qa | grep pulse libpulse-devel-doc-0.9.10-0.pm.1 libpulse-mainloop-glib0-0.9.10-34 libpulse-browse0-0.9.10-34 pulseaudio-module-x11-0.9.10-34 libpulse0-0.9.10-34 pulseaudio-module-bluetooth-0.9.10-34 pulseaudio-module-gconf-0.9.10-34 pulseaudio-utils-0.9.10-34 pulseaudio-debuginfo-0.9.10-34 alsa-plugins-pulse-1.0.17-2 pulseaudio-module-lirc-0.9.10-34 pulseaudio-debugsource-0.9.10-34 pulseaudio-esound-compat-0.9.10-34 libpulsecore4-0.9.10-34 pulseaudio-0.9.10-34 pulseaudio-module-zeroconf-0.9.10-34 libpulse-devel-0.9.10-34 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com