Bug 284171

Summary: Hangs on startup
Product: [Fedora] Fedora Reporter: Bastien Nocera <bnocera>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: drepper.fsp, hduston, lpoetter, pierre-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.6.90-14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-19 03:26:01 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 295891    

Description Bastien Nocera 2007-09-09 18:03:15 EDT
pulseaudio-module-zeroconf-0.9.7-0.11.svn20070907.fc8
pulseaudio-lib-0.9.7-0.11.svn20070907.fc8
pulseaudio-0.9.7-0.11.svn20070907.fc8
pulseaudio-module-x11-0.9.7-0.11.svn20070907.fc8
pulseaudio-debuginfo-0.9.7-0.11.svn20070907.fc8
pulseaudio-esound-compat-0.9.7-0.11.svn20070907.fc8
pulseaudio-utils-0.9.7-0.11.svn20070907.fc8
pulseaudio-module-gconf-0.9.7-0.11.svn20070907.fc8
alsa-plugins-pulseaudio-1.0.14-2.fc8
pulseaudio-lib-glib2-0.9.7-0.11.svn20070907.fc8

Pulseaudio is started at the beginning of the session by gnome-session, under
the name 'esd' (I have "enable software sound mixing" turned on), but can't be
connected to, as it's hung. It's not killable, without using -9, and running esd
again by hand after killing it works fine.

hadess    2777  0.0  0.1  29788  2896 ?        Tl   20:40   0:00
/usr/bin/pulseaudio --log-target=syslog

(gdb) thread apply all bt

Thread 3 (Thread -1213232240 (LWP 2783)):
#0  0x0012d402 in __kernel_vsyscall ()
#1  0x00197119 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x001928ed in _L_lock_728 () from /lib/libpthread.so.0
#3  0x00192798 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x00119e88 in _dl_lookup_symbol_x () from /lib/ld-linux.so.2
#5  0x0011dc52 in _dl_fixup () from /lib/ld-linux.so.2
#6  0x00123450 in _dl_runtime_resolve () from /lib/ld-linux.so.2
#7  0x00438507 in thread_func (userdata=0x877aa20) at modules/module-alsa-sink.c:660
#8  0x0017123e in internal_thread_func (userdata=0x8785df0) at
pulsecore/thread-posix.c:79
#9  0x0019053b in start_thread () from /lib/libpthread.so.0
#10 0x003440ee in clone () from /lib/libc.so.6

Thread 2 (Thread -1223750768 (LWP 2784)):
#0  0x0012d402 in __kernel_vsyscall ()
#1  0x00197119 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x001928ed in _L_lock_728 () from /lib/libpthread.so.0
#3  0x00192798 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x00119e88 in _dl_lookup_symbol_x () from /lib/ld-linux.so.2
#5  0x0011dc52 in _dl_fixup () from /lib/ld-linux.so.2
#6  0x00123450 in _dl_runtime_resolve () from /lib/ld-linux.so.2
#7  0x004433b5 in thread_func (userdata=0x8786b10) at
modules/module-alsa-source.c:643
#8  0x0017123e in internal_thread_func (userdata=0x8789f20) at
pulsecore/thread-posix.c:79
#9  0x0019053b in start_thread () from /lib/libpthread.so.0
#10 0x003440ee in clone () from /lib/libc.so.6

Thread 1 (Thread -1208969536 (LWP 2777)):
#0  0x0012d402 in __kernel_vsyscall ()
#1  0x0018fa7b in __wait_lookup_done () from /lib/libpthread.so.0
#2  0x001218dd in add_to_global () from /lib/ld-linux.so.2
#3  0x00121d76 in dl_open_worker () from /lib/ld-linux.so.2
#4  0x0011ddc6 in _dl_catch_error () from /lib/ld-linux.so.2
#5  0x00121412 in _dl_open () from /lib/ld-linux.so.2
#6  0x00245c8d in dlopen_doit () from /lib/libdl.so.2
#7  0x0011ddc6 in _dl_catch_error () from /lib/ld-linux.so.2
#8  0x0024630c in _dlerror_run () from /lib/libdl.so.2
#9  0x00245bc4 in dlopen@@GLIBC_2.1 () from /lib/libdl.so.2
#10 0x001a87fd in ?? () from /usr/lib/libltdl.so.3
#11 0x001a67b0 in ?? () from /usr/lib/libltdl.so.3
#12 0x001a86de in ?? () from /usr/lib/libltdl.so.3
#13 0x001a709a in ?? () from /usr/lib/libltdl.so.3
#14 0x001a7226 in ?? () from /usr/lib/libltdl.so.3
#15 0x001a7f23 in ?? () from /usr/lib/libltdl.so.3
#16 0x001a896c in lt_dlopenext () from /usr/lib/libltdl.so.3
#17 0x0015326c in pa_module_load (c=0x8771d98, name=0x8787120
"module-esound-protocol-unix", argument=0x0) at pulsecore/module.c:80
#18 0x001429c7 in pa_cli_command_load (c=0x8771d98, t=0x8773118, buf=0x8772fa0,
fail=0x8770850) at pulsecore/cli-command.c:346
#19 0x001403e0 in pa_cli_command_execute_line_stateful (c=0x8771d98,
s=0xbfa82888 "load-module module-esound-protocol-unix", buf=0x8772fa0,
fail=0x8770850, ifstate=0xbfa82884)
    at pulsecore/cli-command.c:1171
#20 0x00140974 in pa_cli_command_execute_file (c=0x8771d98, fn=0x8770910
"/etc/pulse/default.pa", buf=0x8772fa0, fail=0x8770850) at
pulsecore/cli-command.c:1216
#21 0x0804dca6 in main (argc=Cannot access memory at address 0x80
) at daemon/main.c:684
#0  0x0012d402 in __kernel_vsyscall ()

Let me know if you need more debug info. I'm running this on an x86 Intel
dual-core U2500.
Comment 1 Lennart Poettering 2007-09-10 15:47:29 EDT
As Jakub just mentioned on IRC this seems to be a glibc issue, reassigning.
Comment 2 Jakub Jelinek 2007-09-10 16:02:55 EDT
As THREAD_GSCOPE_WAIT is invoked with dl_load_scope lock held, I'm afraid
add_dependency needs to THREAD_GSCOPE_RESET_FLAG () before trying to acquire
that lock and THREAD_GSCOPE_SET_FLAG () after it acquired it, well, we could
__rtld_lock_trylock_recursive it first.  The tricky part is that when not
guarded in between THREAD_GSCOPE_{,RE}_SET_FLAG (), the global scope could have
changed (that one is easy to detect) but also some scope could have changed
and we'd need to recurse if we detect that.
Comment 3 Jakub Jelinek 2007-09-19 03:26:01 EDT
Should be fixed in glibc-2.6.90-14 in rawhide.  Please give it a shot.
Comment 4 Lennart Poettering 2007-09-23 20:16:00 EDT
OK, I tried to reproduce this with your newer glibc. I started and stopped
PulseAudio 1000 times in a row, and flushed buffers in between. Everything
worked fine, hence I think this bug can be closed.

Thanks for the quick fix.
Comment 5 Lennart Poettering 2007-09-23 20:16:23 EDT
*** Bug 301721 has been marked as a duplicate of this bug. ***