Repository navigation
Speaker-test hangs on close if rmbox -t open then dsp panic #401
Copy link
Copy link
Closed
Labels
GLKApplies to Gemini Lake platformApplies to Gemini Lake platformP2Critical bugs or normal featuresCritical bugs or normal featuresbugSomething isn't working as expectedSomething isn't working as expectedlinuxProved to be a Linux kernel driver issueProved to be a Linux kernel driver issueverifiedQA/Bug reporter verifies solution worked.QA/Bug reporter verifies solution worked.
Description
Open rmbox -t before running speaker-test then try to close speaker-test via ctrl-c
Speaker-test will hang until rmbox is closed.
Observed on GLK v0.4 drop
If you try and use the speaker again after closing speaker test and rmbox then the DSP panics
[ 101.283585] sof-audio sof-audio: error : DSP panic!
[ 101.283592] sof-audio sof-audio: status: fw entered - code 00000005
[ 101.283711] sof-audio sof-audio: error: runtime exception
[ 101.283714] sof-audio sof-audio: error: trace point 00004000
[ 101.283717] sof-audio sof-audio: error: DSP Firmware Oops
[ 101.283720] sof-audio sof-audio: error: Exception Cause: LoadStorePIFDataErrorCause, Synchronous PIF data error during LoadStore access
[ 101.283723] sof-audio sof-audio: EXCCAUSE 0x0000000d EXCVADDR 0x00002340 PS 0x00070025 SAR 0x00000020
[ 101.283726] sof-audio sof-audio: EPC1 0xbe02041d EPC2 0xbe010bee EPC3 0x00000000 EPC4 0x00000000
[ 101.283729] sof-audio sof-audio: EPC5 0x00000000 EPC6 0x00000000 EPC7 0x00000000 DEPC 0x00000000
[ 101.283732] sof-audio sof-audio: EPS2 0x00060720 EPS3 0x00000000 EPS4 0x00000000 EPS5 0x00000000
[ 101.283735] sof-audio sof-audio: EPS6 0x00000000 EPS7 0x00000000 INTENABL 0x000101d8 INTERRU 0x00000222
[ 101.283738] sof-audio sof-audio: stack dump from 0xbe07fdb0
[ 101.283741] sof-audio sof-audio: 0xbe07fdb0: 0xbe02041d 0x00060d35 0x00000020 0xbe059c04
[ 101.283745] sof-audio sof-audio: 0xbe07fdb4: 0x04000020 0xffffffed 0xffffffb4 0xbe0420a8
[ 101.283748] sof-audio sof-audio: 0xbe07fdb8: 0x0000000d 0x00000000 0xbe0230c2 0xbe0230d8
[ 101.283751] sof-audio sof-audio: 0xbe07fdbc: 0x00212ef2 0x00000000 0x04444469 0x00000000
[ 101.283754] sof-audio sof-audio: 0xbe07fdc0: 0x00212e2c 0x00000000 0x04654443 0x00000000
[ 101.283757] sof-audio sof-audio: 0xbe07fdc4: 0x00212ecf 0x00000000 0x04726573 0x00000000
[ 101.283760] sof-audio sof-audio: 0xbe07fdc8: 0x00212e45 0x00000000 0x03654f70 0x00000000
[ 101.283763] sof-audio sof-audio: 0xbe07fdcc: 0xbe01de68 0xbe07fe70 0xbe07fe90 0xbe059700
[ 101.283766] sof-audio sof-audio: error: waking up any trace sleepers
[ 101.591314] sof-audio sof-audio: error: ipc timed out for 0x60010000 size 0x60
[ 101.591342] sof-audio sof-audio: status: fw entered - code 00000005
[ 101.591507] sof-audio sof-audio: error: runtime exception
[ 101.591510] sof-audio sof-audio: error: trace point 00004000
[ 101.591512] sof-audio sof-audio: error: DSP Firmware Oops
[ 101.591515] sof-audio sof-audio: error: Exception Cause: LoadStorePIFDataErrorCause, Synchronous PIF data error during LoadStore access
[ 101.591519] sof-audio sof-audio: EXCCAUSE 0x0000000d EXCVADDR 0x00002340 PS 0x00070025 SAR 0x00000020
[ 101.591521] sof-audio sof-audio: EPC1 0xbe02041d EPC2 0xbe010bee EPC3 0x00000000 EPC4 0x00000000
[ 101.591524] sof-audio sof-audio: EPC5 0x00000000 EPC6 0x00000000 EPC7 0x00000000 DEPC 0x00000000
[ 101.591527] sof-audio sof-audio: EPS2 0x00060720 EPS3 0x00000000 EPS4 0x00000000 EPS5 0x00000000
[ 101.591530] sof-audio sof-audio: EPS6 0x00000000 EPS7 0x00000000 INTENABL 0x000101d8 INTERRU 0x00000222
[ 101.591532] sof-audio sof-audio: stack dump from 0xbe07fdb0
[ 101.591535] sof-audio sof-audio: 0xbe07fdb0: 0xbe02041d 0x00060d35 0x00000020 0xbe059c04
[ 101.591538] sof-audio sof-audio: 0xbe07fdb4: 0x04000020 0xffffffed 0xffffffb4 0xbe0420a8
[ 101.591541] sof-audio sof-audio: 0xbe07fdb8: 0x0000000d 0x00000000 0xbe0230c2 0xbe0230d8
[ 101.591544] sof-audio sof-audio: 0xbe07fdbc: 0x00212ef2 0x00000000 0x04444469 0x00000000
[ 101.591547] sof-audio sof-audio: 0xbe07fdc0: 0x00212e2c 0x00000000 0x04654443 0x00000000
[ 101.591550] sof-audio sof-audio: 0xbe07fdc4: 0x00212ecf 0x00000000 0x04726573 0x00000000
[ 101.591552] sof-audio sof-audio: 0xbe07fdc8: 0x00212e45 0x00000000 0x03654f70 0x00000000
[ 101.591555] sof-audio sof-audio: 0xbe07fdcc: 0xbe01de68 0xbe07fe70 0xbe07fe90 0xbe059700
[ 101.591558] sof-audio sof-audio: error: waking up any trace sleepers
[ 101.591570] sof-audio sof-audio: error: got wrong posn offset 0x1867b80 for PCM -110
[ 101.591573] sof-audio sof-audio: error: set pcm hw_params after resume
[ 101.591578] Speakers: ASoC: trigger FE failed -110
Reactions are currently unavailable
Metadata
Metadata
Labels
GLKApplies to Gemini Lake platformApplies to Gemini Lake platformP2Critical bugs or normal featuresCritical bugs or normal featuresbugSomething isn't working as expectedSomething isn't working as expectedlinuxProved to be a Linux kernel driver issueProved to be a Linux kernel driver issueverifiedQA/Bug reporter verifies solution worked.QA/Bug reporter verifies solution worked.
Activity
mengdonglin commentedon Sep 29, 2018
@keqiaozhang Could you reproduce this issue on the code base for GLK v0.5 drop?
keqiaozhang commentedon Sep 29, 2018
@mengdonglin
Yes, I can reproduce this issue on the code base of GLK v0.5 drop. I also found if we run speaker-test first then open rmbox, this issue cannot be reproduced, but if we open rmbox first, then run speaker-test and kill it, this issue will be happened.
mengdonglin commentedon Sep 29, 2018
@akloniex @mmaka1 Could you help to evaluate if this issue can be fixed in GLK v0.5 release that still uses rmbox or next release that uses the trace logger?
lgirdwood commentedon Oct 1, 2018
@mengdonglin looks like a driver issue (hang until rmbox closed) and fw issues (panic). Will need someone from driver team to check. However @bardliao trace update may fix driver part.
cujomalainey commentedon Oct 10, 2018
Initial tests show the new logger is not susceptible to this bug. Will keep investigating.
keqiaozhang commentedon Oct 10, 2018
@cujomalainey
Could you share your test branch/commit?
I also tried logger with latest sof master and this issue still exists.
cujomalainey commentedon Oct 10, 2018
There is a chance that it might be working correctly because if the bugs I'm seeing in #473. I'll verify tomorrow when I'm in the office.
cujomalainey commentedon Oct 10, 2018
Yea I'm unable to reproduce on my system and I'm working off the same location as in #473 (so 4.18 kernel, not the 4.14) I'll check this again on 4.14 once we get V0.5.
keqiaozhang commentedon Oct 12, 2018
I still can reproduce this issue with kernel 4.14 +sof-master.
19 remaining items
Jiangxinx commentedon Nov 1, 2018
Not reproduced with kernel branch debug/v4.19-backport, on APL UP2 platfrom.
STEP:
1.sudo sof-logger -l sof-apl.ldc -t -o logger.log
2.aplay -Dhw:0,0 audio.wav
3.close aplay via ctrl-c
4.aplay -Dhw:0,0 audio.wav
Test env:
hardware version: UP2
sof-master: 43da169
soft-master: 4ac9248
kernel debug/v4.19-backport: 925637e3
tplg: sof-apl-pcm512x.tplg
lgirdwood commentedon Nov 1, 2018
@keqiaozhang can you provide dmesg log starting prior to oops and logger to with latest code from today. Thanks
keyonjie commentedon Nov 1, 2018
looks trigger stop ipc is not recieved by FW at this case:
apl-ipc.c: 82 IPC Pen
xiulipan commentedon Nov 1, 2018
@keyonjie
This Pen is actually pretty tricky here. It is caused by DSP->HOST IPC reply IRQ.
There are very strict rules to forbidden HOST to send an IPC to DSP when DSP is not finished the last one, and we also enable a scheduler to handle IPC.
You can add more trace to print the IPC header, to see if we really send a STOP IPC to DSP and the DSP did not handle it due to this IPC Pen
keyonjie commentedon Nov 1, 2018
@ranj063 this issue is related with runtime PM, you can run 'echo on > /sys/bus/pci/devices/0000:00:0e.0/power/control' then you won't see this issue.
we may need to revisit & align on how should we handle trace during suspend/resume, involving both FW and driver side.
keqiaozhang commentedon Nov 1, 2018
In the first run, speaker-test just hang in there, need to stop sof-logger, then speaker-test will stop and exit. there's no obvious error log in demsg, below is the sof-logger output:
sof-logger:
DSP panic happens at the second run.
sof-logger:
dmesg:
ranj063 commentedon Nov 1, 2018
@keyonjie sorry I think I'm missing your point about runtime PM. once we start playback with aplay, the device should be active.
Are you talking about the device being suspended even before we start the logger?
keyonjie commentedon Nov 2, 2018
@ranj063 yes, suspend -> start logger -> start playback.
keyonjie commentedon Nov 6, 2018
thesofproject/linux#248 should be able to fix this.
keyonjie commentedon Nov 20, 2018
thesofproject/linux#248 is closed.
@ranj063 please backport kernel #287 and #237 and then we can revisit this issue, this #401 issue is already fixed on my observation after applied them manually.
mengdonglin commentedon Nov 20, 2018
@ranj063 please @keqiaozhang when the backporting is done, so he can verify the solution.
keqiaozhang commentedon Nov 27, 2018
Confirmed that this issue is fixed with top of cros-sof-v4.14-rebase branch.
Tested with:
kernel-cros-sof-v4.14-rebase: f8f388ef
sof-master: 443233
tplg-master: ad3f3e4