Closed
Description
Summary:
Kernel panic occurred after unloading and reloading SOF modules 18 times on APL with PCM512x.
BTW: no logger info, because of the following error:
error: Unable to open in file /sys/kernel/debug/sof/etrace
dmesg:
[ 394.718892] sof-audio sof-audio: error: failed to find dai HDMI3
[ 394.718907] sof-audio sof-audio: error: failed to find dai HDMI2
[ 394.718911] sof-audio sof-audio: error: failed to find dai HDMI1
[ 394.718915] sof-audio sof-audio: error: failed to find dai Port5
[ 394.740774] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 1
[ 394.740810] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 1
[ 394.740841] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 1
[ 394.740853] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 1
[ 394.774181] sof-audio sof-audio: warn: can't find PCM with DAI ID 3
[ 394.774204] sof-audio sof-audio: warn: can't find PCM with DAI ID 2
[ 394.774211] sof-audio sof-audio: warn: can't find PCM with DAI ID 1
[ 394.774220] sof-audio sof-audio: warn: can't find PCM with DAI ID 0
[ 394.774362] sof-audio sof-audio: free topology...
[ 394.774790] ------------[ cut here ]------------
[ 394.774793] kernel BUG at mm/slub.c:3901!
[ 394.774806] invalid opcode: 0000 [#1] SMP NOPTI
[ 394.774810] CPU: 3 PID: 6430 Comm: rmmod Not tainted 4.19.0-daily-20190102 #334
[ 394.774812] Hardware name: AAEON UP-APL01/UP-APL01, BIOS UPA1AM36 04/10/2018
[ 394.774821] RIP: 0010:kfree+0x113/0x160
[ 394.774823] Code: 18 48 89 da 4c 89 e6 e8 2b d9 a5 00 48 8b 45 00 48 85 c0 75 e4 e9 0e ff ff ff 49 8b 02 f6 c4 80 75 0a 49 8b 42 08 a8 01 75 02 <0f> 0b 49 8b 02 31 f6 f6 c4 80 74 05 41 0f b6 72 51 5b 5d 41 5c 4c
[ 394.774826] RSP: 0018:ffffa7d840dd3bd0 EFLAGS: 00010246
[ 394.774829] RAX: ffffe95405889248 RBX: ffffa251b84c5c80 RCX: ffffa251b84c5c98
[ 394.774831] RDX: 0000000000000000 RSI: ffffa251b84c5c98 RDI: 00005daf40000000
[ 394.774832] RBP: ffffa251b85a30a8 R08: ffffa251b84c5c98 R09: 0000000000000000
[ 394.774834] R10: ffffe95405e13140 R11: ffffa251b9803601 R12: ffffffffc0541685
[ 394.774836] R13: dead000000000100 R14: ffffa251b84c5d00 R15: 0000000000000000
[ 394.774838] FS: 00007f10f7751540(0000) GS:ffffa251bbb80000(0000) knlGS:0000000000000000
[ 394.774840] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 394.774842] CR2: 000055699fb76290 CR3: 000000015cfe4000 CR4: 00000000003406e0
[ 394.774844] Call Trace:
[ 394.774854] hdac_hdmi_dev_remove+0xb5/0x1c0 [snd_soc_hdac_hdmi]
[ 394.774860] device_release_driver_internal+0x17d/0x240
[ 394.774864] bus_remove_device+0xd7/0x120
[ 394.774868] device_del+0x133/0x350
[ 394.774874] snd_hdac_device_unregister+0x19/0x30 [snd_hda_core]
[ 394.774880] snd_hdac_ext_bus_device_remove+0x2a/0x60 [snd_hda_ext_core]
[ 394.774887] hda_dsp_remove+0x30/0x150 [snd_sof_intel_hda_common]
[ 394.774893] sof_remove+0x6f/0x80 [snd_sof]
[ 394.774897] platform_drv_remove+0x1e/0x40
[ 394.774900] device_release_driver_internal+0x17d/0x240
[ 394.774902] bus_remove_device+0xd7/0x120
[ 394.774905] device_del+0x133/0x350
[ 394.774908] platform_device_del.part.12+0x19/0x70
[ 394.774911] platform_device_unregister+0xe/0x20
[ 394.774914] sof_pci_remove+0x26/0x40 [sof_pci_dev]
[ 394.774919] pci_device_remove+0x36/0xb0
[ 394.774922] device_release_driver_internal+0x17d/0x240
[ 394.774925] driver_detach+0x2d/0x60
[ 394.774927] bus_remove_driver+0x47/0xa0
[ 394.774930] pci_unregister_driver+0x1d/0x90
[ 394.774935] __x64_sys_delete_module+0x155/0x210
[ 394.774939] do_syscall_64+0x43/0xf0
[ 394.774944] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 394.774948] RIP: 0033:0x7f10f72711b7
[ 394.774951] Code: 73 01 c3 48 8b 0d d1 8c 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 8c 2c 00 f7 d8 64 89 01 48
[ 394.774952] RSP: 002b:00007ffe41a12f58 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
[ 394.774955] RAX: ffffffffffffffda RBX: 00007ffe41a12fb8 RCX: 00007f10f72711b7
[ 394.774957] RDX: 000000000000000a RSI: 0000000000000800 RDI: 00005573980c8808
[ 394.774959] RBP: 00005573980c87a0 R08: 00007ffe41a11ed1 R09: 0000000000000000
[ 394.774961] R10: 00007f10f72edcc0 R11: 0000000000000206 R12: 00007ffe41a13180
[ 394.774962] R13: 00007ffe41a137a4 R14: 00005573980c7260 R15: 00005573980c87a0
[ 394.774965] Modules linked in: snd_soc_sst_bxt_pcm512x snd_soc_hdac_hdmi snd_soc_dmic sof_pci_dev(-) snd_sof_intel_hda_common 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_hda_core snd_soc_pcm512x_i2c snd_soc_pcm512x snd_soc_core snd_pcm x86_pkg_temp_thermal intel_lpss_pci intel_lpss mfd_core efivarfs mmc_block sdhci_pci cqhci xhci_pci sdhci xhci_hcd [last unloaded: snd_pcm]
[ 394.774991] ---[ end trace 2e2b4d4a97ad39f8 ]---
[ 394.774994] RIP: 0010:kfree+0x113/0x160
[ 394.774996] Code: 18 48 89 da 4c 89 e6 e8 2b d9 a5 00 48 8b 45 00 48 85 c0 75 e4 e9 0e ff ff ff 49 8b 02 f6 c4 80 75 0a 49 8b 42 08 a8 01 75 02 <0f> 0b 49 8b 02 31 f6 f6 c4 80 74 05 41 0f b6 72 51 5b 5d 41 5c 4c
[ 394.774998] RSP: 0018:ffffa7d840dd3bd0 EFLAGS: 00010246
[ 394.775000] RAX: ffffe95405889248 RBX: ffffa251b84c5c80 RCX: ffffa251b84c5c98
[ 394.775002] RDX: 0000000000000000 RSI: ffffa251b84c5c98 RDI: 00005daf40000000
[ 394.775004] RBP: ffffa251b85a30a8 R08: ffffa251b84c5c98 R09: 0000000000000000
[ 394.775006] R10: ffffe95405e13140 R11: ffffa251b9803601 R12: ffffffffc0541685
[ 394.775007] R13: dead000000000100 R14: ffffa251b84c5d00 R15: 0000000000000000
[ 394.775010] FS: 00007f10f7751540(0000) GS:ffffa251bbb80000(0000) knlGS:0000000000000000
[ 394.775012] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 394.775013] CR2: 000055699fb76290 CR3: 000000015cfe4000 CR4: 00000000003406e0
Test steps:
1. sof_bootloop.sh(input 100 times)
2. aplay -l
aplay: device_list:270: no soundcards found...
Test env:
sof master: a2e6f82
kernel sof-dev: 62aa569
tplg: sof-apl-pcm512x.tplg