Skip to contentSkip to conversation

: Heavy use of ALSA brings down all applications using libasound (major crash)

ALSA - lib 0001524 [email protected] 1 participant 1 message Nov 2, 2005

lore
Share & tools
lore
#0 lore raw

The following issue has been SUBMITTED.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1524>
======================================================================
Reported By: hhanke
Assigned To:
======================================================================

Project:                    ALSA - lib
Issue ID:                   1524
Category:                   0_general
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             11-02-2005 13:10 CET
Last Modified:              11-02-2005 13:10 CET

======================================================================
Summary: Heavy use of ALSA brings down all applications using
libasound (major crash)
Description:
After heavy use of ALSA combined with openning and closing the device each time before playing a sample and stopping sound playback by snd_pcm_drop sometimes, after a few hours, something very strange happens and it brings all applications using ALSA on that machine down (on SIGSEGV or they just hang and take 100% CPU). After the crash, itt is not possible to start any application using ALSA (e.g. alsaplayer) because they can't open ALSA device, until you kill all the applications that were using ALSA at the time of the crash. Then you can work normally again without the need to restart ALSA, reload the modules or anything

The crash affects all applications using ALSA on that machine (or at least using alsalib) but doesn't affect other applications. I've rulled out running out of memmory and disk space by my tests. The crash affects even ALSA applications that do nothing and just sit idle, even a newly executed alsaplayer not playing any sound, the Festival sound synthesizer who is not doing any sound output in my case, etc. The application that do not crash on SIGSEGV just hang in some strange place (poll(), sleep() etc.) and produce 100% CPU load.

This only happens if some other application is playing sound at the same time
when my test application runs, but is not a DMIX issue since it also happens on machines not using DMIX.

I discovered that if I modify my sound output code in my test program not to call snd_pcm_open/close each time I want to play a sound (and thus many many times) and only use snd_pcm_hw_params_alloc/free, then the bug disappears
(however, this modification is not practically usable since it only works with DMIX enabled drivers).
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
11-02-05 13:10 hhanke New Issue
======================================================================

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php