alsa-lib hangs when mounting a partition while playing a sound file using aplay
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 8/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- c, linux
調査の方向性
The hang is reported in snd1_pcm_wait_nocheck in pcm.c, where poll() is called with timeout=-1, while aplay is playing. Start by reproducing it: play a WAV with aplay and mount a UBIFS volume in the background. Done would mean a diagnosis of why the poll descriptors never fire, or a reproducible test case. The thread has no maintainer answer, so this needs kernel and ALSA knowledge rather than a small edit.
索引モデルが issue の本文から書いたものです。
説明
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.
# aplay -D output1 1.wav &
Playing WAVE '1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
#
#
# mount -t ubifs /dev/ubi0_5 /opt/conf/Logging
UBIFS (ubi0:5): background thread "ubifs_bgt0_5" started, PID 190
UBIFS (ubi0:5): UBIFS: mounted UBI device 0, volume 5, name "Logging"
UBIFS (ubi0:5): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
UBIFS (ubi0:5): FS size: 1650688 bytes (1 MiB, 13 LEBs), journal size 1142785 bytes (1 MiB, 8 LEBs)
underrun!!! (at least 0.044 ms loUBIFS (ubi0:5): reserved for root: 0 bytes (0 KiB)
ng)
UBIFS (ubi0:5): media format: w4/r0 (latest is w5/r0), UUID 26A3D522-A34F-4FE4-BF6C-931A9FE59854, small LPT model
#
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:
(gdb) bt
arm-linux-gnueabihf-gdb bin/aplay (wd: ~/home_volume/git_repos/alsa/alsa-install/usr)
(gdb) bt
#0 0x76d96ba4 in ?? ()
**#1 0x76f0e222 in snd1_pcm_wait_nocheck (pcm=0x879280, timeout=-1) at pcm.c:2898**
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) frame 1
#1 0x76f0e222 in snd1_pcm_wait_nocheck (pcm=0x879280, timeout=-1) at pcm.c:2898
2898 err_poll = poll(pfd, npfds, timeout);
(gdb)
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 the timeout = -1 argument, but none of the file descriptors in pfd 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.
- 主要言語
- C
- スター
- 501
- フォーク
- 227
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
alsa-project/alsa-lib のほかの issue
-
USB-Audio: ASUS ROG Zenith II S/PDIF output mapped to wrong PCM device対応中かも @byrcolin が 49 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
alsa-project/alsa-lib#532 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
alsa-project/alsa-lib#530 · リアクション 9 件 ·
-
kernel driver
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
alsa-project/alsa-lib#529 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
alsa-project/alsa-lib#522 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
alsa-project/alsa-lib#519 ·
alsa-project/alsa-lib の issue をすべて見る
似ている issue
-
docs
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
メンテナーはふだん 13 日以内に返信
-
threadpool: a failed `pthread_cond_wait` makes Mlucas hang instead of stopping対応中かも @leinardi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
primesearch/Mlucas#398 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
-
slice
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Life-Framework/Life-Framework#6380 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信