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
suspend/resume failure after several cycles on Yorp #522
@lgirdwood
Not sure whether the relevant error logs are overwrote. I didn't find the log either and that's the reason why I did past the log in comment box.
This issue can easy reproduce with suspend_stress_test tool, this is a buildin tool in chromeOS.
I will reproduce this issue tomorrow and dump the log in time.
This one looks like firmware is not validating DMA channel IDs before dereferencing. i.e. in hda_dma_stop() and other we do not validate channel is valid
@lgirdwood I've added your patch, but the issue cannot be reproduced any more.
Summary:
This issue cannot be reproduced on UP2 now(slept 50 times), but metallic noise was found.
sof-logger is empty. sof-logger -t log is attached below.
dmesg:
[ 1725.525343] PM: suspend entry (deep)
[ 1725.525346] PM: Syncing filesystems ... done.
[ 1725.526265] Freezing user space processes ... (elapsed 0.002 seconds) done.
[ 1725.529255] OOM killer disabled.
[ 1725.529257] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
[ 1725.531416] Suspending console(s) (use no_console_suspend to debug)
[ 1725.640177] HDMI HDA Codec ehdaudio0D2: hdac_hdmi_present_sense: disconnect for pin:port 6:0
[ 1725.782240] sof-audio sof-audio: tag 1 not opened!
[ 1725.782259] sof-audio sof-audio: pcm: trigger stream 0 dir 0 cmd 5
[ 1725.782295] sof-audio sof-audio: ipc tx: 0x60000000: GLB_STREAM_MSG: unknown type
[ 1725.782567] sof-audio sof-audio: error: ipc error for 0x60000000 size 0xc
[ 1725.782584] Port5: ASoC: trigger FE failed -22
[ 1725.782613] sof-audio sof-audio: ipc tx: 0x40010000: GLB_PM_MSG: CTX_SAVE
[ 1725.782802] sof-audio sof-audio: ipc tx succeeded: 0x40010000: GLB_PM_MSG: CTX_SAVE
[ 1725.809053] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 3
[ 1725.809087] sof-audio sof-audio: Debug PCIR: 00000000 at 00000044
[ 1725.809095] sof-audio sof-audio: Debug PCIW: 00000010 at 00000044
[ 1725.869295] ACPI: Preparing to enter system sleep state S3
[ 1725.869887] PM: Saving platform NVS memory
[ 1725.869894] Disabling non-boot CPUs ...
[ 1725.886709] smpboot: CPU 1 is now offline
@markyang I've re-opened as the patch is NOT a fix, but a check for invalid array bounds. This appears to be a race closing a DMA channel prior to D3. Added @mmaka1 for HDA.
@markyang can you describe use case for metallic noise, how reproducible etc.
@lgirdwood please follow the steps below, the metallic noise will occur after sleeping several times.
step 1: run 'aplay -Dhw:0,0 -r 48000 -c 2 -f s16_le -i -vv ~/Music/18_WAV_48000Hz_stereo_16bit.wav' in one Terminal.
step 2: vi suspend_stress.sh
#!/bin/bash
i=0
while [ $i -lt 50 ]
do
rtcwake -m mem -s 3
sleep 3
let i++
done
run 'sudo ./suspend_stress.sh' in another Terminal.
@michalgrodzicki looks like there is sometimes metallic noise after D3 transition. iirc, @mmaka1 found an timing issue where wrong period was being DMAed and this could be happening after D3.
Activity
lgirdwood commentedon Nov 1, 2018
@keqiaozhang how do you know suspend/resume failed ? I cant see anything in the logs.
keqiaozhang commentedon Nov 1, 2018
@lgirdwood
Not sure whether the relevant error logs are overwrote. I didn't find the log either and that's the reason why I did past the log in comment box.
This issue can easy reproduce with suspend_stress_test tool, this is a buildin tool in chromeOS.
I will reproduce this issue tomorrow and dump the log in time.
ranj063 commentedon Nov 1, 2018
@keqiaozhang this is a driver bug. Can you please move it?
keqiaozhang commentedon Nov 2, 2018
This bug is moved to thesofproject/linux#243
markyang commentedon Nov 2, 2018
Summary:
This issue can be reproduced on UP2.
both sof-logger & sof-logger -t are empty.
dmesg:
** 0xbe024307 in sof-apl.lst-master-xcc-43da1696**
Test steps:
i=0
while [ $i -lt 50 ]
do
rtcwake -m mem -s 2
sleep 4
let i++
done
Test env:
sof master: 43da169
sof tool: 937032f
kernel sof-dev: a5ddc3d
tplg: sof-apl-pcm512x.tplg-937032f
Log:
dmesg-apl.log
sof-apl.ldc-master-xcc-43da1696.txt
lgirdwood commentedon Nov 2, 2018
This is also a FW bug so reopened.
This one looks like firmware is not validating DMA channel IDs before dereferencing. i.e. in hda_dma_stop() and other we do not validate channel is valid
This should be validated against correct channel range. Any invalid channels should be logged.
@markyang could you try the following patch. This will display an error if we attempt an invalid channel and will help root cause the issue,
markyang commentedon Nov 7, 2018
@lgirdwood I've added your patch, but the issue cannot be reproduced any more.
Summary:
This issue cannot be reproduced on UP2 now(slept 50 times), but metallic noise was found.
sof-logger is empty. sof-logger -t log is attached below.
dmesg:
Test steps:
i=0
while [ $i -lt 50 ]
do
rtcwake -m mem -s 3
sleep 3
let i++
done
Test env:
sof master: 40c054a
sof tool: 937032f
kernel sof-dev: af44aa9
tplg: sof-apl-pcm512x.tplg-937032f
Log:
dmesg-apl.log
logger-t.txt
lgirdwood commentedon Nov 7, 2018
@markyang I've re-opened as the patch is NOT a fix, but a check for invalid array bounds. This appears to be a race closing a DMA channel prior to D3. Added @mmaka1 for HDA.
@markyang can you describe use case for metallic noise, how reproducible etc.
markyang commentedon Nov 8, 2018
@lgirdwood please follow the steps below, the metallic noise will occur after sleeping several times.
step 1: run 'aplay -Dhw:0,0 -r 48000 -c 2 -f s16_le -i -vv ~/Music/18_WAV_48000Hz_stereo_16bit.wav' in one Terminal.
step 2: vi suspend_stress.sh
run 'sudo ./suspend_stress.sh' in another Terminal.
lgirdwood commentedon Nov 8, 2018
@michalgrodzicki looks like there is sometimes metallic noise after D3 transition. iirc, @mmaka1 found an timing issue where wrong period was being DMAed and this could be happening after D3.
keqiaozhang commentedon Nov 13, 2018
I retested this issue on Yorp with Ranjani's new person kernel branch:https://github.com/ranj063/linux/commits/topic/cros-sof-v4.14-rebase
The suspend/resume can pass more than 100 iterations.
markyang commentedon Nov 14, 2018
Move metallic noise issue on UP2 to #577 .
lgirdwood commentedon Nov 14, 2018
@keqiaozhang can we close then ? or do we need more iterations ?
keqiaozhang commentedon Nov 15, 2018
@lgirdwood
Yes, this issue can be closed. I will check with Naveen about how may iterations do we need to test.