[Stress test] HDA-DMA preload timeout causes IPC timeout when running multiple pipelines #1050
Copy link
Copy link
Closed
Labels
GLKApplies to Gemini Lake platformApplies to Gemini Lake platformbugSomething isn't working as expectedSomething isn't working as expected
Description
This is more like a regression. We met this issue before, but fixed on glk branch.
How to reproduce:
- run test scripts under tools/test/qa/tests/stability_test/:
./multiplex_pipeline-test.sh pcm0p pcm1p - or use audiofuntest tool, test script as below:
#!/bin/bash
int=0
while [ $int -lt 100000 ]
do
echo "Test $int"
audiofuntest -P "aplay -D hw:0,0 -r 48000 -f s16 -t raw -c 2 -B 0 -" -R "arecord -D hw:0,99 -r 48000 -f s16 -t raw -c 4 -B 0 -" -r 48000 -T 5 -a 0 -m "0,1" -c 4 -g 100
if [ $? != 0 ]; then
echo "test failed at $int."
exit 1
fi
sleep 0.2
echo $int
let int++
done
error message:
aplay: pcm_write:2051: write error: Input/output error
dmesg:
[ 303.909613] sof-audio-pci 0000:00:0e.0: pcm: trigger stream 99 dir 1 cmd 0
[ 303.909678] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60050000
[ 304.212216] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x60050000 size 0xc
[ 304.212267] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[ 304.212439] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[ 304.212444] sof-audio-pci 0000:00:0e.0: error: waking up any trace sleepers
[ 304.212477] DMIC01: ASoC: trigger FE failed -110
[ 304.212527] sof-audio-pci 0000:00:0e.0: pcm: free stream 99 dir 1
[ 304.516128] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x60030000 size 0xc
[ 304.516158] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[ 304.516328] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[ 304.516334] sof-audio-pci 0000:00:0e.0: error: waking up any trace sleepers
[ 304.517561] sof-audio-pci 0000:00:0e.0: pcm: close stream 99 dir 1
[ 305.131853] sof-audio-pci 0000:00:0e.0: pcm: trigger stream 0 dir 0 cmd 0
[ 305.435650] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x60050000 size 0xc
[ 305.435681] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[ 305.435850] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[ 305.435856] sof-audio-pci 0000:00:0e.0: error: waking up any trace sleepers
[ 305.435889] Speakers: ASoC: trigger FE failed -110
[ 305.435941] sof-audio-pci 0000:00:0e.0: pcm: free stream 0 dir 0
[ 305.739373] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x60030000 size 0xc
[ 305.739401] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[ 305.739591] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[ 305.739594] sof-audio-pci 0000:00:0e.0: error: waking up any trace sleepers
[ 305.751792] sof-audio-pci 0000:00:0e.0: pcm: close stream 0 dir 0
[ 308.058380] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x40010000 size 0x4c
[ 308.058431] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[ 308.058606] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[ 308.058632] sof-audio-pci 0000:00:0e.0: error: ctx_save ipc error during suspend -110
[ 308.058692] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x1010303 successful
[ 308.059772] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x303 successful
[ 308.059791] sof-audio-pci 0000:00:0e.0: DSP core(s) enabled? 0 : core_mask 3
[ 308.059827] sof-audio-pci 0000:00:0e.0: Debug PCIR: 00000010 at 00000044
Trace:
No obverses trace error, trace log is attached.
Test recipe:
sof-master: 82d29e0
kernel: topic/cros-sof-v4.14-rebase-b61733c
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
GLKApplies to Gemini Lake platformApplies to Gemini Lake platformbugSomething isn't working as expectedSomething isn't working as expected
Activity
Jiangxinx commentedon Feb 26, 2019
This issue can also be reproduced on UP2 with PCM512x.
No dmesg error trace, but there're some error trace logs.
sof-logger:
step:
Test env:
sof master: 82d29e0
kernel sof-dev: ee19d24
tplg: sof-apl-pcm512x.tplg
wwittbrx commentedon Feb 26, 2019
I think this commit 3dbd1fb reintroduced this, please check. @slawblauciak may have more info on this.
keyonjie commentedon Feb 26, 2019
@RanderWang here the BF bit not set error we met:
0 1 DMA 109193447.343750 109193448.000000 intel/cavs/hda-dma.c:346 hda-dmac: 5 preload timeoutplbossart commentedon Feb 26, 2019
Can we please make sure this test is run by the QA team on a regular basis? Between broken scripts and regressions something is not quite right here.
keqiaozhang commentedon Feb 27, 2019
@plbossart
We will add this test to our daily test basis and @stevyan is working on the broken scripts under tools/test/qa/tests/.
lgirdwood commentedon Mar 11, 2019
@keqiaozhang there have been a few recent component and pipeline updates. Can you re-check.
keqiaozhang commentedon Mar 12, 2019
@lgirdwood
This issue still can be reproduced with latest code base. Error trace logs are same.
Test recipe:
sof master: 2dbe69
kernel cros-sof-v4.14-rebase: b178744d
ranj063 commentedon Mar 12, 2019
@keqiaozhang would it be possible to try this with linux PR#695?
lgirdwood commentedon Mar 12, 2019
@dabekjakub looks like a HDA DMA timeout is being cascaded into other timeouts.
[-][Stress test] IPC times out when running multiple pipelines[/-][+][Stress test] HDA-DMA preload timeout causes IPC timeout when running multiple pipelines[/+]lgirdwood commentedon Mar 12, 2019
@slawblauciak looks like @RanderWang is also working on this within kernel too. thesofproject/linux#705. Can you guys align as this may need kernel and FW fix. Thanks
keqiaozhang commentedon Mar 12, 2019
@ranj063
There're some conflicts when applying PR#695 to cros-sof-v4.14-rebase.
So I applied this PR to sof-dev branch and tested this issue on GLK chromebook with UbuntuOS.
This PR can reduce the probability of this issue but can't not be completely fixed. Before the probability is about 15%, now is reduce to 1%.
ranj063 commentedon Mar 12, 2019
@keqiaozhang thanks for checking
RanderWang commentedon Mar 20, 2019
fixed by ASoC:sof:hda: fix hda preload issue thesofproject/linux#705