Repository navigation
Closed
Labels
BYTApplies to Baytrail platformApplies to Baytrail platformP1Blocker bugs or important featuresBlocker bugs or important featuresbugSomething isn't workingSomething isn't workingdriver unload/reloadObserved when unloading/reloading kernel driver modulesObserved when unloading/reloading kernel driver modules
Description
Describe the bug
Can not Removing snd_soc_sst_bytcr_rt5651 while doing load/reload test on byt-rt5651 platform.
To Reproduce
1.sudo ./sof_bootone.sh
Actual result
platform=[byt],codec_module=[snd_soc_rt5651],ignore_error=[no]
Skipping sof_pci_dev, not loaded
Removing sof_acpi_dev
./sof_remove.sh: line 2: 1726 Killed rmmod $module
Removing snd_sof_intel_byt
rmmod: ERROR: Module snd_sof_intel_byt is in use by: sof_acpi_dev
Skipping snd_sof_intel_hsw, not loaded
Removing snd_sof_intel_bdw
rmmod: ERROR: Module snd_sof_intel_bdw is in use by: sof_acpi_dev
Skipping snd_sof_intel_hda_common, not loaded
Skipping snd_sof_intel_hda, not loaded
Removing snd_sof_xtensa_dsp
rmmod: ERROR: Module snd_sof_xtensa_dsp is in use by: sof_acpi_dev
Removing snd_soc_acpi_intel_match
rmmod: ERROR: Module snd_soc_acpi_intel_match is in use by: sof_acpi_dev
Skipping snd_soc_sst_bytcr_rt5640, not loaded
Removing snd_soc_sst_bytcr_rt5651
dmesg
[ 73.175250] BUG: kernel NULL pointer dereference, address: 0000000000000040
[ 73.175258] #PF: supervisor read access in kernel mode
[ 73.175261] #PF: error_code(0x0000) - not-present page
[ 73.175263] PGD 0 P4D 0
[ 73.175268] Oops: 0000 [#1] SMP PTI
[ 73.175273] CPU: 3 PID: 1726 Comm: rmmod Not tainted 5.2.0-rc3-daily-20190625 #3
[ 73.175276] Hardware name: ADI Minnowboard Turbot D0 PLATFORM/MinnowBoard Turbot, BIOS MNW2MAX1.X64.0097.R01.1709211052 09/21/2017
[ 73.175283] RIP: 0010:rt5651_set_jack+0x181/0x2d0 [snd_soc_rt5651]
[ 73.175288] Code: 13 f0 31 c0 5b 5d 41 5c c3 8b bb b8 00 00 00 e8 85 4d 17 f0 48 8d 7b 20 e8 fc de 13 f0 48 8d 7b 40 e8 03 df 13 f0 48 8b 43 10 <f6> 40 40 02 74 44 48 83 7b 18 00 75 3d 48 8b 45 18 ba 00 80 00 00
[ 73.175291] RSP: 0018:ffffb9c501437cc8 EFLAGS: 00010282
[ 73.175294] RAX: 0000000000000000 RBX: ffff9e9436486828 RCX: 0000000000000000
[ 73.175297] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff9e9436486868
[ 73.175300] RBP: ffff9e943683d828 R08: ffff9e947728d240 R09: ffff9e947728d380
[ 73.175302] R10: 0000000000000000 R11: ffffffffb1847968 R12: 0000000000000000
[ 73.175305] R13: ffffffffc05b10c0 R14: 0000000000000001 R15: ffffffffb15bdf17
[ 73.175308] FS: 00007fe4cea31540(0000) GS:ffff9e9474b80000(0000) knlGS:0000000000000000
[ 73.175311] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 73.175314] CR2: 0000000000000040 CR3: 000000003e0fe000 CR4: 00000000001006e0
[ 73.175316] Call Trace:
[ 73.175330] soc_cleanup_component+0xd/0x80 [snd_soc_core]
[ 73.175340] soc_remove_link_components.isra.50+0x4e/0x70 [snd_soc_core]
[ 73.175349] snd_soc_unbind_card.part.56+0x75/0xf0 [snd_soc_core]
[ 73.175358] snd_soc_unregister_card+0x74/0x80 [snd_soc_core]
[ 73.175365] release_nodes+0x121/0x220
[ 73.175372] device_release_driver_internal+0xe3/0x1b0
[ 73.175376] bus_remove_device+0xd6/0x140
[ 73.175381] device_del+0x152/0x370
[ 73.175386] platform_device_del.part.14+0xe/0x60
[ 73.175390] platform_device_unregister+0x17/0x30
[ 73.175397] snd_sof_device_remove+0x50/0x90 [snd_sof]
[ 73.175403] sof_acpi_remove+0x23/0x30 [sof_acpi_dev]
[ 73.175407] platform_drv_remove+0x1b/0x40
[ 73.175412] device_release_driver_internal+0xd3/0x1b0
[ 73.175416] driver_detach+0x37/0x70
[ 73.175420] bus_remove_driver+0x4c/0xc0
[ 73.175426] __x64_sys_delete_module+0x155/0x240
[ 73.175432] do_syscall_64+0x43/0x120
[ 73.175437] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 73.175441] RIP: 0033:0x7fe4ce54f1b7
[ 73.175445] 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
[ 73.175448] RSP: 002b:00007fff4b755738 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
[ 73.175452] RAX: ffffffffffffffda RBX: 00007fff4b755798 RCX: 00007fe4ce54f1b7
[ 73.175454] RDX: 000000000000000a RSI: 0000000000000800 RDI: 000055871125d808
[ 73.175457] RBP: 000055871125d7a0 R08: 00007fff4b7546b1 R09: 0000000000000000
[ 73.175460] R10: 00007fe4ce5cbcc0 R11: 0000000000000206 R12: 00007fff4b755960
[ 73.175462] R13: 00007fff4b7567e3 R14: 000055871125c260 R15: 000055871125d7a0
[ 73.175465] Modules linked in: snd_soc_sst_bytcr_rt5651 sof_acpi_dev(-) snd_sof_intel_byt snd_soc_acpi_intel_match snd_sof_intel_bdw snd_sof_intel_ipc snd_sof snd_seq_midi snd_sof_xtensa_dsp snd_soc_rt5651 snd_seq_midi_event snd_soc_rl6231 snd_soc_acpi snd_rawmidi intel_soc_dts_thermal snd_soc_core snd_seq intel_soc_dts_iosf snd_pcm snd_seq_device intel_powerclamp snd_timer snd mei_txe soundcore mei efivarfs mmc_block i915 drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops igb xhci_pci i2c_algo_bit drm xhci_hcd sdhci_acpi sdhci
[ 73.175495] CR2: 0000000000000040
[ 73.175561] ---[ end trace be2bdbe1b6fd1ff8 ]---
[ 73.175577] RIP: 0010:rt5651_set_jack+0x181/0x2d0 [snd_soc_rt5651]
[ 73.175590] Code: 13 f0 31 c0 5b 5d 41 5c c3 8b bb b8 00 00 00 e8 85 4d 17 f0 48 8d 7b 20 e8 fc de 13 f0 48 8d 7b 40 e8 03 df 13 f0 48 8b 43 10 <f6> 40 40 02 74 44 48 83 7b 18 00 75 3d 48 8b 45 18 ba 00 80 00 00
[ 73.175602] RSP: 0018:ffffb9c501437cc8 EFLAGS: 00010282
[ 73.175617] RAX: 0000000000000000 RBX: ffff9e9436486828 RCX: 0000000000000000
[ 73.175629] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff9e9436486868
[ 73.175642] RBP: ffff9e943683d828 R08: ffff9e947728d240 R09: ffff9e947728d380
[ 73.175654] R10: 0000000000000000 R11: ffffffffb1847968 R12: 0000000000000000
[ 73.175667] R13: ffffffffc05b10c0 R14: 0000000000000001 R15: ffffffffb15bdf17
[ 73.175682] FS: 00007fe4cea31540(0000) GS:ffff9e9474b80000(0000) knlGS:0000000000000000
[ 73.175695] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 73.175707] CR2: 0000000000000040 CR3: 000000003e0fe000 CR4: 00000000001006e0
bisect result
Caused by topic/sof-dev (#1018).
Environment
Firmware: 25bbc9f https://github.com/thesofproject/sof/commits/master
Kernel: 0087d4a https://github.com/thesofproject/linux/commits/topic/sof-dev
Topology: sof-byt-rt5651.tplg
error log
dmesg.log
Metadata
Metadata
Assignees
Labels
BYTApplies to Baytrail platformApplies to Baytrail platformP1Blocker bugs or important featuresBlocker bugs or important featuresbugSomething isn't workingSomething isn't workingdriver unload/reloadObserved when unloading/reloading kernel driver modulesObserved when unloading/reloading kernel driver modules
Activity
keqiaozhang commentedon Jun 26, 2019
This issue also can be reproduced on WHL/I2S mode.
wenqingfu commentedon Jun 26, 2019
3bb936f?
[-][Bug][BYT] Load /reload failed on byt-rt5651 platform.[/-][+][Bug][BYT][WHL] unload /reload audio module failure.[/+]Jiangxinx commentedon Jul 10, 2019
This issue still can be reproduced on daily test.
Environment
Firmware: 34d0db9 https://github.com/thesofproject/sof/commits/master
Kernel: 01373cf https://github.com/thesofproject/linux/commits/topic/sof-dev
Topology: sof-byt-rt5651.tplg
mengdonglin commentedon Aug 7, 2019
WHL RVP (I2S ALC5682 codec) has different failure, tracked by #1110
[-][Bug][BYT][WHL] unload /reload audio module failure.[/-][+][Bug][BYT] unload /reload audio module failure.[/+]juimonen commentedon Aug 16, 2019
@bardliao I don't have rt5651 anymore but I get little bit similar stuff with rt5682:
[ 76.455294] Workqueue: events_power_efficient rt5682_jack_detect_handler [snd_soc_rt5682]
[ 76.455303] RIP: 0010:rt5682_jack_detect_handler+0x4e/0x290 [snd_soc_rt5682]
So some jack_detection functions are not happy when removing modules...
Any idea?
Jiangxinx commentedon Aug 21, 2019
This issue also can be reproduced on rt5682 platform:
Environment
Firmware: db138eb https://github.com/thesofproject/sof/commits/master
Kernel: 2a22b94 https://github.com/thesofproject/linux/commits/topic/sof-dev
Topology: sof-byt-rt5682.tplg
3 remaining items
juimonen commentedon Aug 22, 2019
@Jiangxinx oh, had a really bad copy/paste error... probe was running remove also. Can you please still try again with updated version...
Jiangxinx commentedon Aug 22, 2019
@juimonen OK,no problem.
plbossart commentedon Aug 22, 2019
@Jiangxinx can you confirm #1147 fixes the issue for rt5682. I'd like a check before merging, thank you. Also recheck #1149, it'd be good to submit all machine driver changes upstream in one shot.
Jiangxinx commentedon Aug 23, 2019
Add today's check rerult:
rt5682 with #1147 : pass
rt5651 with #1149 : failed
juimonen commentedon Aug 23, 2019
@Jiangxinx can you try the rt5651 case with updated version of £1149 I just pushed. Sorry for the trouble, I just don't have the platform to test myself...
juimonen commentedon Aug 23, 2019
i meant #1149 :)
Jiangxinx commentedon Aug 23, 2019
@juimonen #1149 still can not work:
juimonen commentedon Aug 23, 2019
@Jiangxinx ok thanks, I'll have to find a better way to test this....
juimonen commentedon Aug 23, 2019
I was able to render @Jiangxinx device remotely unusable, so if someone with rt5651 can try the latest update of #1149 that would be nice. I disassembled the crash to rt5651_support_button_press but not sure my fix will make things better...
wenqingfu commentedon Aug 23, 2019
There is a feature in CI to offline a DUT from pool for dedicated debugging. I sent you and @xiulipan an email.
juimonen commentedon Aug 26, 2019
@Jiangxinx can you still do 1 more round with the latest #1149? I was about to test that when things went wrong... I'll leave you alone after this :)
Jiangxinx commentedon Aug 27, 2019
@juimonen With the latest #1149 ,this issue still exist on rt5651:
Jiangxinx commentedon Aug 27, 2019
Passed with the new #1149 on rt5651 platform.
Jiangxinx commentedon Sep 9, 2019
Closed as #1149 is merged.