Skip to content

[WHL HDA] Kernel panic: failed to unload the sound modules on WHL with HDA #466

Closed

Description

@markyang

Summary:
The kernel panic occurred on WHL with HDA after unloading the sound modules.

dmesg:

[ 1214.208153] sof-audio sof-audio: ipc rx done: 0x600a0007: GLB_STREAM_MSG: POSITION
[ 1214.208350] sof-audio sof-audio: PCM: stream 0 dir 1 DMA position 8640 DAI position 74012160
[ 1214.217113] sof-audio sof-audio: error: failed to find dai HDMI3
[ 1214.217126] sof-audio sof-audio: error: failed to find dai HDMI2
[ 1214.217131] sof-audio sof-audio: error: failed to find dai HDMI1
[ 1214.217137] sof-audio sof-audio: error: failed to find dai HDA Digital
[ 1214.217141] sof-audio sof-audio: error: failed to find dai HDA Analog
[ 1214.217168] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 1
[ 1214.217196] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 1
[ 1214.217217] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 1
[ 1214.217237] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 1
[ 1214.217257] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 1
[ 1214.217294] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 1
[ 1214.217315] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 1
[ 1214.714721] sof-audio sof-audio: pcm: trigger stream 0 dir 1 cmd 0
[ 1214.714766] sof-audio sof-audio: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[ 1215.018594] sof-audio sof-audio: error: ipc timed out for 0x60050000 size 0xc
[ 1215.018613] sof-audio sof-audio: unknown ROM status value ffffffff
[ 1215.019142] sof-audio sof-audio: error: unexpected fault 0xffffffff trace 0xffffffff
[ 1215.019147] sof-audio sof-audio: error: waking up any trace sleepers
[ 1215.019171]  HDA Analog: ASoC: trigger FE failed -110
[ 1215.019186] sof-audio sof-audio: pcm: free stream 0 dir 1
[ 1215.019220] sof-audio sof-audio: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[ 1215.322592] sof-audio sof-audio: error: ipc timed out for 0x60030000 size 0xc
[ 1215.322612] sof-audio sof-audio: unknown ROM status value ffffffff
[ 1215.323141] sof-audio sof-audio: error: unexpected fault 0xffffffff trace 0xffffffff
[ 1215.323146] sof-audio sof-audio: error: waking up any trace sleepers
[ 1215.323183] BUG: unable to handle kernel NULL pointer dereference at 0000000000000088
[ 1215.323187] PGD 0 P4D 0
[ 1215.323195] Oops: 0000 [#1] SMP NOPTI
[ 1215.323202] CPU: 1 PID: 3097 Comm: arecord Not tainted 4.19.0+ #7
[ 1215.323206] Hardware name: Intel Corporation CoffeeLake Client Platform/WhiskeyLake U DDR4 ERB, BIOS CNLSFWR1.R00.X137.B00.1803280218 03/28/2018
[ 1215.323221] RIP: 0010:soc_pcm_hw_free+0x17d/0x1b0 [snd_soc_core]
[ 1215.323226] Code: 48 8b 80 88 00 00 00 48 8b 80 80 00 00 00 48 85 c0 74 08 4c 89 e7 e8 42 3c 9e f4 83 c5 01 39 ab 38 06 00 00 77 c3 49 8b 45 18 <48> 8b 80 88 00 00 00 48 8b 80 80 00 00 00 48 85 c0 74 0b 4c 89 ee
[ 1215.323230] RSP: 0018:ffffad4a42ae7e00 EFLAGS: 00010246
[ 1215.323235] RAX: 0000000000000000 RBX: ffff897b0b27d800 RCX: 0000000000000000
[ 1215.323239] RDX: ffff897b0b2cf0d0 RSI: ffff897b1fdf4a00 RDI: ffff897b0b2cf000
[ 1215.323243] RBP: 0000000000000001 R08: ffffffffb500ba00 R09: 0000000000000000
[ 1215.323247] R10: ffffad4a42ae7bf0 R11: 00000000001481e7 R12: ffff897b0b2cf000
[ 1215.323251] R13: ffff897b1fdf4f80 R14: ffff897b0b27d818 R15: 0000000000000001
[ 1215.323255] FS:  00007fcb57e07740(0000) GS:ffff897b23a40000(0000) knlGS:0000000000000000
[ 1215.323259] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1215.323263] CR2: 0000000000000088 CR3: 000000025faf0006 CR4: 00000000003606e0
[ 1215.323267] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1215.323271] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1215.323274] Call Trace:
[ 1215.323289]  dpcm_fe_dai_hw_free+0x6c/0xe0 [snd_soc_core]
[ 1215.323300]  snd_pcm_release_substream.part.52+0x3f/0xa0 [snd_pcm]
[ 1215.323310]  snd_pcm_release+0x9b/0xb0 [snd_pcm]
[ 1215.323319]  __fput+0xd5/0x1d0
[ 1215.323329]  task_work_run+0x79/0xa0
[ 1215.323336]  exit_to_usermode_loop+0x91/0xa0
[ 1215.323342]  do_syscall_64+0xdb/0xf0
[ 1215.323352]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1215.323357] RIP: 0033:0x7fcb571f5ab7
[ 1215.323363] Code: 10 e9 67 ff ff ff 0f 1f 44 00 00 48 8b 15 c9 f3 2c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff e9 6b ff ff ff b8 0b 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 f3 2c 00 f7 d8 64 89 01 48
[ 1215.323367] RSP: 002b:00007ffdd8e30e08 EFLAGS: 00000202 ORIG_RAX: 000000000000000b
[ 1215.323372] RAX: 0000000000000000 RBX: 00005574ba357d00 RCX: 00007fcb571f5ab7
[ 1215.323376] RDX: 0000000000000010 RSI: 0000000000001000 RDI: 00007fcb57e18000
[ 1215.323380] RBP: 0000000000000000 R08: 00007fcb577b5588 R09: 00000000ffffffed
[ 1215.323383] R10: 00007fcb579f1020 R11: 0000000000000202 R12: 00005574ba357d00
[ 1215.323387] R13: 00005574ba357d00 R14: 7ffffffff72d53fe R15: 0000000000000780
[ 1215.323391] Modules linked in: snd_soc_skl_hda_dsp snd_soc_hdac_hdmi snd_soc_dmic snd_hda_codec_realtek snd_hda_codec_generic sof_pci_dev(-) snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_intel_hda snd_sof_intel_byt snd_sof_nocodec snd_sof_xtensa_dsp snd_sof snd_soc_acpi_intel_match snd_soc_acpi snd_hda_ext_core snd_soc_core snd_hda_codec snd_hwdep iwlmvm snd_hda_core snd_pcm x86_pkg_temp_thermal intel_lpss_pci intel_lpss iwlwifi mfd_core efivarfs sdhci_pci xhci_pci cqhci xhci_hcd sdhci
[ 1215.323439] CR2: 0000000000000088
[ 1215.323444] ---[ end trace 744b0374dc1b4051 ]---
[ 1215.323456] RIP: 0010:soc_pcm_hw_free+0x17d/0x1b0 [snd_soc_core]
[ 1215.323461] Code: 48 8b 80 88 00 00 00 48 8b 80 80 00 00 00 48 85 c0 74 08 4c 89 e7 e8 42 3c 9e f4 83 c5 01 39 ab 38 06 00 00 77 c3 49 8b 45 18 <48> 8b 80 88 00 00 00 48 8b 80 80 00 00 00 48 85 c0 74 0b 4c 89 ee
[ 1215.323464] RSP: 0018:ffffad4a42ae7e00 EFLAGS: 00010246
[ 1215.323469] RAX: 0000000000000000 RBX: ffff897b0b27d800 RCX: 0000000000000000
[ 1215.323473] RDX: ffff897b0b2cf0d0 RSI: ffff897b1fdf4a00 RDI: ffff897b0b2cf000
[ 1215.323476] RBP: 0000000000000001 R08: ffffffffb500ba00 R09: 0000000000000000
[ 1215.323480] R10: ffffad4a42ae7bf0 R11: 00000000001481e7 R12: ffff897b0b2cf000
[ 1215.323484] R13: ffff897b1fdf4f80 R14: ffff897b0b27d818 R15: 0000000000000001
[ 1215.323488] FS:  00007fcb57e07740(0000) GS:ffff897b23a40000(0000) knlGS:0000000000000000
[ 1215.323492] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1215.323496] CR2: 0000000000000088 CR3: 000000025faf0006 CR4: 00000000003606e0
[ 1215.323500] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1215.323503] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Test steps:

  1. aplay -l # OK
  2. sudo modprobe -r sof_pci_dev snd_sof_nocodec snd_sof_intel_hda_common snd_sof_intel_hda snd_sof_xtensa_dsp snd_sof snd_soc_acpi_intel_match snd_soc_acpi snd_soc_skl_hda_dsp snd_soc_hdac_hdmi snd_soc_hdac_hda snd_hda_codec_realtek snd_hda_codec_generic snd_hda_ext_core snd_hda_codec snd_hwdep snd_hda_core snd_soc_core snd_pcm_dmaengine snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device snd_timer snd soundcore

Test env:
sof master: ba4054b
kernel sof-dev: 3c3e8ea (compiled with config-daily-hda-20181218-1.txt)
tplg: sof-hda-generic.tplg (attached)

Log:
dmesg-whl.txt
config-daily-hda-20181218-1.txt
sof-hda-generic.tplg.txt

Activity

  1. changed the title [-]kernel panic: kernel panic: failed to unload the sound modules on WHL with HDA[/-] [+]Kernel panic: failed to unload the sound modules on WHL with HDA[/+] on Dec 18, 2018
  2. added
    bugSomething isn't working
    WHLApplies to WhiskeyLake platform
    on Dec 18, 2018
  3. wenqingfu commented on Jan 25, 2019

    @wenqingfu

    I think this is yet another issue that we should gracefully fail out with "device busy" in load/unload tests. @RanderWang @mengdonglin a good team discussion topic

  4. wenqingfu commented on Mar 9, 2019

    @wenqingfu

    @RanderWang reminder. Maybe it's gone now? I doubt it'll be WHL specific..? if you want someone to pick up, please let me know. thanks!

  5. RanderWang commented on Mar 11, 2019

    @RanderWang

    @wenqingfu Yingjiang is working on it.

  6. zhuyingjiang commented on Mar 11, 2019

    @zhuyingjiang

    @RanderWang This is a WHL specific issue, I am not working on that before. but anyway, I can take it.

  7. self-assigned this
    on Mar 13, 2019
  8. plbossart commented on Mar 24, 2019

    @plbossart
    Member

    @RanderWang @zhuyingjiang there's been no progress since December, can someone clarify if the issue still exists after all the HDaudio and IPC changes?

  9. RanderWang commented on Mar 25, 2019

    @RanderWang

    @plbossart I tried latest code and still got panic. I will work on it this week.

  10. RanderWang commented on Mar 25, 2019

    @RanderWang

    [ 69.483386] Hardware name: Intel Corporation WhiskeyLake Client Platform/WhiskeyLake U DDR4 ERB, BIOS CNLSFWR1.R00.X188.B03.1902131435 02/13/2019
    [ 69.483873] RIP: 0010:soc_pcm_hw_free+0x17d/0x1b0 [snd_soc_core]
    [ 69.484095] Code: 48 8b 80 88 00 00 00 48 8b 80 80 00 00 00 48 85 c0 74 08 4c 89 e7 e8 82 48 d1 f4 83 c5 01 39 ab 38 06 00 00 77 c3 49 8b 45 18 <48> 8b 80 88 00 00 00 48 8b 80 80 00 00 00 48 85 c0 74 0b 4c 89 ee
    [ 69.484782] RSP: 0018:ffffab2d01ab7e00 EFLAGS: 00010246
    [ 69.484976] RAX: 0000000000000000 RBX: ffff9dd8602be800 RCX: ffff9dd85f696c00
    [ 69.485244] RDX: ffff9dd85f71cb40 RSI: ffff9dd85f08fb80 RDI: ffffffffc0332820
    [ 69.485504] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
    [ 69.485765] R10: ffff9dd85fa91810 R11: 0000000000000001 R12: ffff9dd84a428800
    [ 69.486157] R13: ffff9dd861a8c900 R14: ffff9dd8602be818 R15: 0000000000000000
    [ 69.486584] FS: 00007f2a73d9e740(0000) GS:ffff9dd863ac0000(0000) knlGS:0000000000000000
    [ 69.487059] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [ 69.487399] CR2: 0000000000000088 CR3: 0000000260998002 CR4: 00000000003606e0
    [ 69.487817] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [ 69.488235] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [ 69.488653] Call Trace:
    [ 69.488872] dpcm_fe_dai_hw_free+0x6c/0xe0 [snd_soc_core]
    [ 69.489137] snd_pcm_release_substream.part.50+0x3f/0xa0 [snd_pcm]
    [ 69.489403] snd_pcm_release+0x9b/0xb0 [snd_pcm]
    [ 69.489580] __fput+0xa7/0x1f0
    [ 69.489703] task_work_run+0x79/0xa0
    [ 69.489841] exit_to_usermode_loop+0x91/0xa0
    [ 69.490003] do_syscall_64+0xdb/0xf0
    [ 69.490141] entry_SYSCALL_64_after_hwframe+0x44/0xa9
    [ 69.490339] RIP: 0033:0x7f2a7318cab7

  11. RanderWang commented on Mar 26, 2019

    @RanderWang

    It is discussed by #707.

  12. zhuyingjiang commented on Mar 28, 2019

    @zhuyingjiang

    @RanderWang I think this issue is not what #707 is discussing, #707 is about removing the modules the same time do playing. as the test step here is only "aplay -L", this is a bug unload the module when it is not playing.

  13. RanderWang commented on Mar 28, 2019

    @RanderWang

    please check the dmesg log. It is caused by removing modules when playing music

  14. zhuyingjiang commented on Mar 28, 2019

    @zhuyingjiang

    @markyang The test steps and the log seems are not accordingly, could you clarify?

  15. changed the title [-]Kernel panic: failed to unload the sound modules on WHL with HDA[/-] [+][WHL HDA] Kernel panic: failed to unload the sound modules on WHL with HDA[/+] on Apr 2, 2019
  16. added
    HDAApplies to HD-Audio bus for codec connection
    on Apr 8, 2019
  17. mengdonglin commented on May 7, 2019

    @mengdonglin

    @bardliao Is this issue fixed by you?

  18. bardliao commented on May 8, 2019

    @bardliao
    Collaborator

    @mengdonglin No, I didn't work on it. But I didn't see the issue on CFL with latest kernel. @markyang Could you check it with latest kernel? Thanks.

  19. wenqingfu commented on May 8, 2019

    @wenqingfu

    @stevyan @ClarexZhou please re-test. thanks!

  20. ClarexZhou commented on May 9, 2019

    @ClarexZhou

    Error not seen on WHL. Modules unload and reload works OK

    Environment
    Rander UCM https://github.com/RanderWang/intel-UCM  
    Kernel repo:c99938c https://github.com/thesofproject/linux/tree/release/sof-v5.0
    Firmware repo: 05d4e19 https://github.com/thesofproject/sof/commits/master |  
    Topology: https://github.com/thesofproject/sof/commits/master . Same as above SOF repo
    file: tools/topology/sof-hda-generic.m4, sof-hda-generic-2ch.tplg

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

Metadata

Metadata

Assignees

Labels

HDAApplies to HD-Audio bus for codec connectionP2Critical bugs or normal featuresWHLApplies to WhiskeyLake platformbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions