Bug 482797
Summary: | Seg fault using pthread, snd_pcm_open, and "pulse" playback | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Catagne <nicolas.castagne> | ||||||||||
Component: | alsa-lib | Assignee: | Jaroslav Kysela <jkysela> | ||||||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||
Severity: | urgent | Docs Contact: | |||||||||||
Priority: | low | ||||||||||||
Version: | 10 | CC: | dwmw2, eric.moret, hdegoede, jakub, jgronman, jkysela, lpoetter, nicolas.castagne | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | i386 | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: |
Fedora 10, up to date (all upgrade installed)
|
Story Points: | --- | ||||||||||
Clone Of: | 477203 | Environment: | |||||||||||
Last Closed: | 2009-09-07 22:36:46 UTC | Type: | --- | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
Description
Catagne
2009-01-28 09:07:21 UTC
Created attachment 330215 [details]
gdb trace
I've looked further into the bug. It turns out that the problem originates in alsa's snd_pcm_open when opening the playback device "pulse" Included a newer, very very simple sample code. Hope this helps. Created attachment 333317 [details]
Very simple sample code, with snd_pcm_open
Very simple sample code, demonstrating that the bug originate in
snd_pcm_open
when using "pulse" playback.
Could you please open a bug with upstream and post the upstream bug number here for monitoring. Alsa bug report : https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4426 Since this may be due to pulseaudio also (sorry, but I really can't figure out if the problem originates in pulse audio or alsa), i also opened a pulseaudio ticked. Pulse audio report : http://pulseaudio.org/ticket/506 Hmm, tried on both x86-64 and i386 to reproduce this now with no luck. Can reproduce the crash with the pulseaudio pulseaudio-0.9.14-1, Fedora 10 up to date, on 3 machines that differ in audio and processor/motherboard hardware. After having upgraded again Fedora 10, the sample code "Very simple sample code, with snd_pcm_open" does not crash anymore. Conversely, the sample code "Sample program that causes the segfault", that uses portaudio, still crashes on my 3 Fedora10 machines. Yet another note. I've tried again to isolate the problem. I think the problem comes from a call to snd_config_update_free_global(). I don't know whether : - the call to snd_config_update_free_global() made by portaudio is wrong - or the call to snd_config_update_free_global() made by portaudio is correct, but the problem originates in alsalib itself. I upload new sample codes TestPaQt06.tar.gz There you'll find : 1- a sample program that uses alsa that exhibits the problem. The code may be wrong since I am not used to alsa, but the problem is there. 2- a sample program that uses portaudio that exhibits the problem. To compile the latest, just use the latest portaudio snapshot. There is a "hack" for the portaudio program : in portaudio, file portaudio/src/hostapi/alsa/pa_linux_alsa.c comment the call to snd_config_update_free_global() Just comment this line to make the bug disapear. Hope it helps. Created attachment 334129 [details]
New sample program
1- a sample program that uses alsa that exhibits the problem. The code may be wrong since I am not used to alsa, but the problem is there.
2- a sample program that uses portaudio that exhibits the problem.
To compile the latest, just use the latest portaudio snapshot.
There is a "hack" for the portaudio program :
in portaudio,
file portaudio/src/hostapi/alsa/pa_linux_alsa.c
comment the call to snd_config_update_free_global()
Just comment this line to make the bug disapear.
*** Bug 490196 has been marked as a duplicate of this bug. *** Copying Hans, the new portaudio maintainer (thanks for volunteering!) :-) The problem might be that snd_dlobj_cache_cleanup() is not thread-safe? A crash in __nptl_deallocate_tsd typically means using pthread_key_create with a destructor, but forgetting to pthread_key_delete it in library destructors and the library being dlclosed (so it is not mapped any longer). This is fixed now. the PA libs are now marked NODELETE so this shouldn't happen anymore. |