[Re: Crash when snd_pcm_open is called from a thread with "pulse" as playback]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,
I'd need the help of some alsa developpers regarding the bug report :https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4426
We've made a few progress on it, but we are stuck again.
Basically, it seems that calling snd_config_update_free_global() from apthread causes the program to crash when the thread terminates.


Questions are:
Should config_update_free_global NOT be called from a thread ?
In other words, is the following code valid (though dumb :=)) ?Or is there some reason for it to crash ?


**********************************#include <pthread.h>#include <alsa/asoundlib.h>void * threadWork(void *arg) {    snd_pcm_t *playback_handle;    if (snd_pcm_open (&playback_handle, "default",SND_PCM_STREAM_PLAYBACK, 0) < 0)        fprintf (stderr, "error\n";    snd_pcm_close(playback_handle);
    snd_config_update_free_global();    return NULL;}int main() {    pthread_attr_t attr;    pthread_attr_init(&attr);    pthread_t threadid;    pthread_create( &threadid, &attr, threadWork, NULL);    return EXIT_SUCCESS;}**********************************

I thank you much,
Nicolas




---------------------------- Message original ----------------------------Objet:    Crash when snd_pcm_open is called from a thread with "pulse" as     playbackDe:       castagne@xxxxxxxxxxx:     Mer 4 mars 2009 8:20À:       alsa-devel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi folks,
I hope I post on the correct mail list...I've read somewhere that I should report bugs on a list, and not only onthe Tracker. That's the aim of this message.

On all my Fedora 10 machines,whenever       snd_pcm_openhas been called from a pthread using "pulse" as playbackthen the program crashes when the thread terminates.
Crash in __nptl_deallocate_tsd
However, AFAIK, one should be able to call snd_pcm_open from a thread.
The full bug report is there, with a very simple sample code :https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4426
I think this bug relates directly to alsa.I hope this report is useful.

Best-Nicolas

_______________________________________________Alsa-devel mailing listAlsa-devel@xxxxxxxxxxxxxxxxxxxx://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux