Skip to content

[BUG]DSP panic when suspend-resume on cml-sku0983-sdw and cml-sku0955-hda #4538

Closed

Description

@XiaoyunWu6666

Describe the bug
in inner daily /5449?model=CML_SKU0983_SDW&testcase=check-suspend-resume-50
DSP panic when suspend-resume

To Reproduce
TPLG=/lib/firmware/intel/sof-tplg/sof-cml-rt711-rt1308-mono-rt715.tplg ~/sof-test/test-case/check-suspend-resume.sh -l 50
Reproduction Rate
rather low maybe , cannot reproduce it yet (once I can , I'll update this comment)

Environment
Kernel Branch: topic/sof-dev
Kernel Commit: d54b7803 storage: d54b7803-2
SOF Branch: main
SOF Commit: 52bc39f storage: 52bc39f
Topology: /lib/firmware/intel/sof-tplg/sof-cml-rt711-rt1308-mono-rt715.tplg
Platform: cml-sku0983-sdw

Screenshots or console output
[console]

2021-07-22 23:04:39 UTC [REMOTE_INFO] ===== Round(47/50) =====
2021-07-22 23:04:39 UTC [REMOTE_COMMAND] Run the command: rtcwake -m mem -s 5
rtcwake: assuming RTC uses UTC ...
rtcwake: wakeup from "mem" using /dev/rtc0 at Thu Jul 22 23:04:45 2021
2021-07-22 23:04:46 UTC [REMOTE_COMMAND] sleep for 5
2021-07-22 23:04:51 UTC [REMOTE_INFO] Check for the kernel log status
declare -- cmd="journalctl_cmd --since=@1626995074"
2021-07-22 23:04:51 UTC [ERROR] Caught kernel log error
===========================>>
[ 5561.663293] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: error : DSP panic!
[ 5561.663306] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: ------------[ DSP dump start ]------------
[ 5561.663320] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: status: fw entered - code 00000005
[ 5561.663392] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: error: extended rom status:  0x5 0xdead00b 0x41c0 0x0 0x0 0x0 0x1811102 0x0
[ 5561.663398] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: ------------[ DSP dump end ]------------
<<===========================

Activity

  1. added
    bugSomething isn't working as expected
    CMLApplies to Comet Lake platform
    Intel Linux Daily testsThis issue can be found in internal Linux daily tests
    on Jul 23, 2021
  2. added
    SDWSoundWire
    DSP panicDSP panic observed
    suspend-resumeIssues observed when doing system suspend and resume
    on Jul 27, 2021
  3. keyonjie commented on Aug 16, 2021

    @keyonjie
    Contributor

    @ujfalusi looks we have very limited dmesg log when DSP panic happen now?

    [ 5561.663293] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: error : DSP panic!
    [ 5561.663306] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: ------------[ DSP dump start ]------------
    [ 5561.663320] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: status: fw entered - code 00000005
    [ 5561.663392] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: error: extended rom status:  0x5 0xdead00b 0x41c0 0x0 0x0 0x0 0x1811102 0x0
    [ 5561.663398] kernel: sof-audio-pci-intel-cnl 0000:00:1f.3: ------------[ DSP dump end ]------------
    
  4. ujfalusi commented on Aug 16, 2021

    @ujfalusi
    Contributor

    @keyonjie, by default we are not flooding the kernel log with repeated dumps when the firmware crashes, we print the dsp dump only once and we also print the ipc dump once (separately counted).
    All optional dumps and the dump flood can be re-enabled via module parameter sof_debug with bit 4 is set.

    The dumps have not been changed, we print the same information as before but we have markers around to make them easier to spot.

  5. lgirdwood commented on Aug 16, 2021

    @lgirdwood
    Member

    @ujfalusi does the FW stack and regs get dumped by default (it should not be an option) ?

  6. ujfalusi commented on Aug 16, 2021

    @ujfalusi
    Contributor

    The content of the dump has not been changed and there is no option to change it. The only change is that by default we print the dump (DSP / IPC) once.
    The (HDA) registers will be dumped if the fw_state is SOF_FW_BOOT_COMPLETE, if the dump is called during any other state then the registers are not printed and they were not printed in the past either.

  7. XiaoyunWu6666 commented on Aug 20, 2021

    @XiaoyunWu6666
    ContributorAuthor

    happen in inner daily 5971 on model CML_SKU0983_SDW in testcase check-suspend-resume-50

  8. keqiaozhang commented on Aug 23, 2021

    @keqiaozhang
    Collaborator

    @fredoh9 , can you help to follow up this issue? since we only have one device of this model in JF and it's hard for us reproduce the suspend/resume issue via ssh.

  9. lgirdwood commented on Aug 27, 2021

    @lgirdwood
    Member

    @XiaoyunWu6666 @fredoh9 @aiChaoSONG does our inner daily testing have the capability to dump FW crashes and run the crash dump script on each FW crash. This would be really useful information to attache to the issues. @mengdonglin fyi.
    This FW crash dump script should also be usable in CI too (and also a great help in root causing bugs).

  10. fredoh9 commented on Aug 27, 2021

    @fredoh9
    Contributor

    I can reproduce this on CML_SKU0983_SDW. I think if we use iteration of 50, high chance to reproduce.

    @lgirdwood Where is the crash dump script? And I can try to run the script manually then I can try to integrate to SOF CI test. Do you recommend sof_debug to set bit 4 also?

  11. lgirdwood commented on Aug 28, 2021

    @lgirdwood
    Member

    I can reproduce this on CML_SKU0983_SDW. I think if we use iteration of 50, high chance to reproduce.

    @lgirdwood Where is the crash dump script?

    sof-coredump-reader.py is in sof/tools/coredumper/

    And I can try to run the script manually then I can try to integrate to SOF CI test.

    Great :)

    Do you recommend sof_debug to set bit 4 also?

    What will this do ?

  12. 38 remaining items

  13. ranj063 commented on Oct 15, 2021

    @ranj063
    Collaborator

    hi @keyonjie I tried #4874 , the error did not happen with 100 rounds .But this issue is not 100% manually reproducible .

    @keyonjie #4874 fixes the symptom not the root cause.

  14. keyonjie commented on Oct 18, 2021

    @keyonjie
    Contributor

    hi @keyonjie I tried #4874 , the error did not happen with 100 rounds .But this issue is not 100% manually reproducible .

    @keyonjie #4874 fixes the symptom not the root cause.

    @ranj063 I had the same feeling. But when I am trying it think it louder, maybe the place "assert(task_next);" should be a normal path (Not error path I mean), so actually there is no error if we went there and the "assert" is a false positive.

  15. keyonjie commented on Oct 18, 2021

    @keyonjie
    Contributor

    in today's inner daily test , this happened again . hi @keyonjie I tried #4874 , the error did not happen with 100 rounds .But this issue is not 100% manually reproducible .

    So could you turn #4874 open? (now it is a draft PR) ... so that I can test it more stressfully using CI testplan

    Thanks, @XiaoyunWu6666 the PR is open now.

  16. miRoox commented on Nov 22, 2021

    @miRoox

    cannot be reproduced, close.

  17. lyakh commented on Nov 23, 2021

    @lyakh
    Collaborator

    I think the problem is not about whether or not the task list is empty, but that an EDF software interrupt triggers after resume. IIUC, EDF scheduling is done from software interrupts. As long as an EDF interrupt triggers, edf_scheduler_run() will run. And if the task list is empty, or if tasks on the list aren't suitable to be run, we get an assert(). So the real question seems to be why we're getting a software EDF interrupt after resume? Has it been scheduled before suspend or after resume or is it spurious (unlikely)? Can it be, that it was scheduled before suspend and somehow survived the suspend? If it was correctly scheduled before suspend but just couldn't be processed, it should be safe to drop it after resume. Can we clear the interrupt in scheduler_restore_edf()?

  18. lyakh commented on Nov 24, 2021

    @lyakh
    Collaborator

    An important question: do we know on which core the panic happens? I assume this isn't happening when restoring a secondary core after a D0ix?
    After looking at the code some more, I don't see a good way to clear the EDF (software) interrupt. I think interrupt_mask() would would clear it, as described in an Architecture Specification document, so we could add a

    interrupt_mask();
    interrupt_unmask();
    

    pair of calls to scheduler_init_edf() anywhere before the call to interrupt_enable(), but I'm not 100% sure this would work. E.g. as in #5026 . If that doesn't work, I'd propose to remove the assert() call at least temporarily to win us more time to investigate this properly.

  19. added
    v1.9.2Issues observed on SOF v1.9.2, no in latest main branch
    ADLApplies to Alder Lake platform
    on Nov 29, 2021
  20. mengdonglin commented on Nov 29, 2021

    @mengdonglin
    Collaborator

    This issue can be reproduced on an ADL-P device with https://github.com/thesofproject/sof/releases/tag/v1.9.2, but cannot reproduce with latest main branch

  21. miRoox commented on Dec 6, 2021

    @miRoox

    It was fixed by #4874, the patch was also cherry-picked to stable-v1.9 and stable-v2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ADLApplies to Alder Lake platformCMLApplies to Comet Lake platformDSP panicDSP panic observedIntel Linux Daily testsThis issue can be found in internal Linux daily testsSDWSoundWirebugSomething isn't working as expectedsuspend-resumeIssues observed when doing system suspend and resumev1.9.2Issues observed on SOF v1.9.2, no in latest main branch

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions