You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[APL][Random] 'ipc timed out for 0x30200000' after S3 without playback/capture. (5%) #876
Summary:
'ipc timed out for 0x30200000' after S3 without playback/capture. Note: Following ipc message id occurred for different attempt times: 0x30200000, 0x30030000, 0x50010000, 0x30010000 ...
To reproduce
sudo ./stress-s3.sh 100 0 0
Actual result
error: ipc timed out for 0x30200000 size 36
Reproduce rate: 5%
Test recipe
date: 2019-04-26
sof (master): 6a84b4e
linux (topic/sof-dev): f7e9d4a
topology: sof-apl-pcm512x.tplg, sof-apl-nocodec.tplg
@stevyan would you be able to check if this PR thesofproject/sof#1343 fixes the problem on APL. I was able to run a 100 iterations stress test with nocodec with this.
both the 2 failed log show we have ipc timeout at runtime resume, so I am curious if we can reproduce it once we disable runtime suspend:
echo on > /sys/bus/pci/devices/0000:00:0e.0/power/control
@stevyan after I disabled runtime suspend, I can't duplicate the issue with 2000 iteration finished. @ranj063 looks there is some corner cases left in our runtime suspend/resume?
@keyonjie there is aboslutely no difference in sequence between runtime suspend/resume and system suspend/resume in SOF. So I dont know how this test is helpful in identifying the problem
@keyonjie there is aboslutely no difference in sequence between runtime suspend/resume and system suspend/resume in SOF. So I dont know how this test is helpful in identifying the problem
I meant doing suspend at SOF runtime-suspended case:
to response to S3 enter command, we wake up it to the active status, and then suspend it.
The issue happens at this waking up.
Daily test result: can still be reproduced on apl_up2_nocodec platform, the rate is 17/100.
By the way, I can't reproduce it on apl_up2_pcm512x platform within 100 times.
To reproduce
sudo ./stress-s3.sh 100 0 0
Test Recipe
sof (master): de5bba4
linux (topic/sof-dev): 1071743
topology: sof-apl-pcm512x.tplg, sof-apl-nocodec.tplg
Can you share the config for kernel? I'm getting different error message altogether for this (log attached). This happens always on first iteration of stress-s3.sh
Sometimes during an S3 stress test the whole system hangs, requiring a hard reset
In about 20-40% of the cases when an IPC timeout occurs, the logger returns an empty trace
Even in "normal" cases, when upon an IPC timeout a trace can be retrieved, it is often incomplete. But this might have a logical explanation, related to the IPC timeout itself
The driver performs the DSP initialisation, including sending a topology to it
Sending the topology involves a strictly serialised repeating "sending of IPC -> waiting for reply" sequence
At some point one of IPC replies fails to arrive, which means there is no interrupt and the interrupt registers don't show any bits set, when checked after the timeout expiration (@lgirdwood that's an answer to your question)
The DSP log looks either completely or "almost" completely normal: it receives the last IPC and sends a reply.
To me this looks like the hardware is failing to execute the IPC transfer from the DSP to the host. This also seems to be an intermittent failure, because if it is ignored, after it communication with the DSP is possible again. What is the procedure for debugging such cases? I've been told we don't have JTAG access to the DSP, maybe only to the SoC. I'm not sure if we have any GPIOs or other pins available to toggle them from both the DSP and thee host side to check them with a scope. Maybe we could write some data in the mailbox from the DSP side to check it from the host side? E.g. after each received and answered IPC start a periodic task, writing an IPC counter and a repeat counter into the mailbox and then check them on the host side when the timeout expires...
@lyakh
Yes, every time you will get DSP reset after a suspend/resume. And we will power off the DSP so everything in memory window is gone. If you would like to have some count, make it in some register. There are few registers that are not using, or you can just use some bits of the register.
@xiulipan I'm not trying to keep the counter across suspends, I'm trying to send it from the DSP to the host. Can I use registers for that too without disturbing the IPC? Which ones?
Activity
ranj063 commentedon Apr 29, 2019
@stevyan would you be able to check if this PR thesofproject/sof#1343 fixes the problem on APL. I was able to run a 100 iterations stress test with nocodec with this.
mengdonglin commentedon Apr 29, 2019
May relevant to #1254
stevyan commentedon Apr 29, 2019
this error still can be observed after patched the PR thesofproject/sof#1343 on APL nocodec. Iterations target: 500 times, failed at the 213rd.
Test Recipe
date: 2019-04-29
sof (master): be1331a ( + PR thesofproject/sof#1343)
linux (topic/sof-dev): af71673
topology: sof-apl-nocodec.tplg
dmesg log
test_213_fail.log
keyonjie commentedon Apr 29, 2019
hi @stevyan can you share your ./stress-s3.sh please, I want to duplicate it on my side.
keyonjie commentedon Apr 29, 2019
btw, @stevyan can you paste the sof-logger error log(without -t) also for the error case?
stevyan commentedon Apr 29, 2019
test script attached, e.g.: #sudo ./stress-s3.sh 500 0 0
stress-s3.sh
keyonjie commentedon Apr 29, 2019
both the 2 failed log show we have ipc timeout at runtime resume, so I am curious if we can reproduce it once we disable runtime suspend:
echo on > /sys/bus/pci/devices/0000:00:0e.0/power/control
keyonjie commentedon Apr 30, 2019
@stevyan after I disabled runtime suspend, I can't duplicate the issue with 2000 iteration finished.
@ranj063 looks there is some corner cases left in our runtime suspend/resume?
ranj063 commentedon Apr 30, 2019
@keyonjie there is aboslutely no difference in sequence between runtime suspend/resume and system suspend/resume in SOF. So I dont know how this test is helpful in identifying the problem
keyonjie commentedon Apr 30, 2019
I meant doing suspend at SOF runtime-suspended case:
to response to S3 enter command, we wake up it to the active status, and then suspend it.
The issue happens at this waking up.
ranj063 commentedon Apr 30, 2019
Yes, but what i meant was that waking up from runtime suspend or waking up from S3 are exactly the same in the SOF driver.
Jiangxinx commentedon May 6, 2019
Daily test result: can still be reproduced on apl_up2_nocodec platform, the rate is 17/100.
By the way, I can't reproduce it on apl_up2_pcm512x platform within 100 times.
To reproduce
Test Recipe
sof (master): de5bba4
linux (topic/sof-dev): 1071743
topology: sof-apl-pcm512x.tplg, sof-apl-nocodec.tplg
wwittbrx commentedon May 6, 2019
Can you share the config for kernel? I'm getting different error message altogether for this (log attached). This happens always on first iteration of stress-s3.sh
Recipe
Kernel
1071743
FW and TPLG
thesofproject/sof@de5bba4
sof-apl-nocodec.tplg
Reproduction steps
Logs and files
test_1_fail.log
19 remaining items
lyakh commentedon May 10, 2019
Three more observations:
lyakh commentedon May 11, 2019
Traces seem to be corrupted sometimes:
where the last line should print the return code from
ipc_cmd()for the pipeline-completion IPC, which can only return 0 or a negative error code.lyakh commentedon May 13, 2019
I'm looking for new ideas. I see the following:
To me this looks like the hardware is failing to execute the IPC transfer from the DSP to the host. This also seems to be an intermittent failure, because if it is ignored, after it communication with the DSP is possible again. What is the procedure for debugging such cases? I've been told we don't have JTAG access to the DSP, maybe only to the SoC. I'm not sure if we have any GPIOs or other pins available to toggle them from both the DSP and thee host side to check them with a scope. Maybe we could write some data in the mailbox from the DSP side to check it from the host side? E.g. after each received and answered IPC start a periodic task, writing an IPC counter and a repeat counter into the mailbox and then check them on the host side when the timeout expires...
lyakh commentedon May 13, 2019
I'm trying to exchange some data over the DSP-to-host mailbox, using e.g.
on the DSP side and
on the host side, but not getting the expected result...
xiulipan commentedon May 13, 2019
@lyakh
Yes, every time you will get DSP reset after a suspend/resume. And we will power off the DSP so everything in memory window is gone. If you would like to have some count, make it in some register. There are few registers that are not using, or you can just use some bits of the register.
lyakh commentedon May 14, 2019
@xiulipan I'm not trying to keep the counter across suspends, I'm trying to send it from the DSP to the host. Can I use registers for that too without disturbing the IPC? Which ones?
lyakh commentedon May 14, 2019
For the record: following @lgirdwood 's idea to switch over from MSI to "legacy" interrupt mode didn't fix the problem.
lyakh commentedon May 14, 2019
update: mailbox is working now.
lyakh commentedon May 14, 2019
500 iterations - check. I think I've fixed it, expect a patch soon.
wenqingfu commentedon May 14, 2019
please keep the test running while cooking your patch. last year we did 10k iterations to truly prove it's gone :)
lyakh commentedon May 15, 2019
fixed by #943
xiulipan commentedon May 15, 2019
@lyakh It seems we have a patch for this in FW now thesofproject/sof#1441
wenqingfu commentedon May 22, 2019
close