-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alsa-lib hangs when mounting a partition while playing a sound file using aplay #321
Comments
It looks like a driver (kernel) issue. The poll() should return with an error. You can also check the stream status in |
Thanks for replying, @perexg . Unfortunately I do not see anything listed under the
Am I missing something? Best regards. |
Nevermind, it was my fault. I forgot I had to enable some CONFIG_SND* configuration options in in the kernel menuconfig. So here is the output:
At least it mentions that the playback stream status is RUNNING. Besides configuration parameters, the rest of the files didn't offer any other useful information. Do you have any other idea that may cause this? Thanks a lot again. |
More news, I just took some traces with the help of trace-cmd and here are the results:
|
Hello,
I'm using alsa-lib to add sound playback functionality to a Embedded Linux system.
Recently I noticed that whenever I mount a UBI partition while there is a sound file being played back with the help of the aplay command, the aplay process hangs forever and the sound playback stops immediately.
I also prepared a small video that captures the exact moment where the issue is reproduced in case you want it to see it in action:
https://www.youtube.com/watch?v=M9bW2k2CTVs
The only way to recover from this scenario is to kill the stuck aplay process manually and execute it again.
Last time I tried to debug this, I attached the gdbserver to the still stuck aplay process and backtrace showed the following information:
It is clear to me that the
poll
function is waiting for something to change in the file descriptors and it waits infinitely due to thetimeout = -1
argument, but none of the file descriptors inpfd
ever change or become ready after the mount command is executed during the sound playback.I'm currently using both alsa-lib and alsa-utils v1.2.6. The SoC is an NXP i.MX6 Solo which includes an Armv7-A 32bits Cortex-A9 Core CPU Platform. Linux Kernel BSP is based on 4.14.98.
Most likely this is an issue with my system configuration, but since you guys are more familiar with alsa than anyone on the planet, I thought you might have some ideas to troubleshoot and debug this because I currently do not have any clue.
Do you know what could cause this behavior?
Is there any possibility that there is an issue in alsa-lib?
Do you have any suggestions to debug and troubleshoot the error to get more information?
Any help will be really appreciated.
Thanks a lot. Best regards.
The text was updated successfully, but these errors were encountered: