User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111217 Fedora/3.0.4-1.fc10 Firefox/3.0.4 If connection to a PulseAudio daemon fails, then the the Java runtime throws an exception, which is expected. But then the Java runtime crashes on exit. This happens only when using the ALSA api which redirects to PulseAudio. It doesnt happen when using the PulseAudio api directly. It seems to be very similar to 460666: segfault/corrpution in pthread_create.c Reproducible: Always Steps to Reproduce: 1. chmod 000 ~/.pulse/* so that the pulseaudio daemon fails to start (kill any instances running) 2. compile and run the attached program a. javac Mixers.java b. java Mixers 3. press enter to end the program Actual Results: JVM crashes Expected Results: JVM shuts down noramlly Relevant Packages: pulseaudio-0.9.13-6.fc10.i386 alsa-plugins-pulseaudio-1.0.18-1.rc3.fc10.i386 alsa-lib-1.0.18-6.rc3.fc10.i386 java-1.6.0-openjdk-1.6.0.0-7.b12.fc10.i386
Created attachment 327461 [details] test program
Created attachment 327462 [details] backtrace
Shouldn´t this be opened against the jvm?
Hi Eric. I am an IcedTea developer and I came across this bug when playing around with pulseaudio. I could be totally wrong about this being an alsa-plugins (or pulseaudio) bug, but I dont think that the JVM was the cause of the problem. Here is my reasoning: 1) The JVM crashes on exit, not when it's using the alsa api. 2) The error appears to be in pthread_create.c (in libpthread.so) and native threads are not directly used by java when it interacts with alsa. Any problem with Java Threads would not cause the JVM to crash with stack corruption. 3) the gdb backtrace shows the problem to be #13 <signal handler called> #14 0x082ca300 in ?? () #15 0x007cc5ca in __nptl_deallocate_tsd () at pthread_create.c:154 #16 start_thread (arg=0x161b90) at pthread_create.c:304 which indicates that there is some problem with Thread Specific Data. PulseAudio has had problems like this before but they were fixed: http://www.redhat.com/archives/fedora-extras-commits/2008-November/msg00096.html. Also, this crash only happens when spawning the pulseaudio daemon fails. If pulseaudio is already running or is spawned successfully, then there are no crashes. Anyway, I am not sure at all what the problem is, or what I can do to fix it. Any help will be appreciated. If you still think this is opened against the wrong package, let me know.
Thank you for your analysis, I am reassigning this one to Lennard, from the upstream project.
This may be related to https://bugzilla.redhat.com/show_bug.cgi?id=482797
Defintely a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=482797 See there for simple test code.
Hmm, I cannot reproduce this here. Does this still happen with 0.9.14?
Hmm, tried on both x86-64 and i386 now with no luck.
I can reproduce this on i386 with pulseaudio-0.9.14-1.fc10.i386 :(
Can reproduce the bug with the same version of pulseaudio, Fedora 10 up to date, on my 3 machines that all differ in audio and processor/motherboard hardware.
Oups sorry, the latest comment was for Bug 482797...
Does JVM call snd_config_update_free_global or snd_dlobj_cache_cleanup()?
OK, I think I know what's going on here: libpulse.so installs a TLS destructor but then gets unloaded so that the destructor function is called without existing in memory anymore, thus triggering a segfault. This has been fixed in PA 0.9.16 now, we link everything with -z nodelete.