| Summary: | Kernel hangs due to broadcom wifi driver | ||
|---|---|---|---|
| Product: | Fedora | Reporter: | ycollette <ycollette.nospam> |
| Component: | broadcom-wl | Assignee: | NVieville <nicolas.vieville> |
| Status: | ASSIGNED --- | ||
| Severity: | enhancement | CC: | akarypid |
| Priority: | P1 | ||
| Version: | f39 | ||
| Hardware: | All | ||
| OS: | GNU/Linux | ||
| namespace: | |||
|
Description
ycollette
2024-07-03 09:42:14 CEST
Hello, Thank for reporting this issue. As my old laptop (Lenovo Ideapad U160 - 2011) uses this Broadcom module too, I can see the same warning, but I didn't notice any hang. It happens one time while booting the OS when loading for the first time the wl module (dmesg shows the same warning you posted). It doesn't appear later. Reading this warning seems to show that "the unpatched return thunk in use that should not happen!" is triggered by the getvar function called from the wl_module_init function. If wl_module_init function is part of the source code of the archive provided by Broadcom, the getvar function is located in the binary blob provided in this archive. There is no easy mean to patch it. Maybe we should play with compile time parameters (gcc ones) like the KCSAN_SANITIZE one, but I'm still trying to understand how this could work and how to achieve this, if possible. As an attempt to lowdown the warnings you hit and the hangs that seem to be triggered at the same time, I wonder if you could provide the configuration of your wireless device according to power: iw dev your_wireless_device_name get power_save If this command returns that Power save is on, maybe you should give a try to disable it, and see if the warnings and the hangs decrease. Not sure about that, but see it as an attempt to smooth your user experience and not fixing the root cause of the problem. For my part, on my laptop I totally disabled this wireless device ability to be powered off to take care of power consumption, as it produce more problems while trying to wake-up the wireless device and to get up network functionalities than the benefit one can hope. To do so replace "get" by "set" from the command above and add "off" at the end of it. Recall the previous command to verify. Thank you very much again for reporting this issue, and feel free to make any comment about these subjects. I'll try to post any progress if any on this issue on this bug report. Cordially, -- NVieville Here is the result of the iw command: $ iw dev wlp2s0 get power_save Power save: off (In reply to ycollette from comment #2) > Here is the result of the iw command: > > $ iw dev wlp2s0 get power_save > Power save: off Thank you very much for your feedback. Sorry that nothing at all could be done for the moment concerning the issue you met. Still looking for a workaround. Cordially, -- NVieville Hello,
I have a Yoga Pro 9 16IMH9 (type 83DN) model with an Nvidia 4060 that does NOT have a Broadcom chipset. Unfortuantely I am getting a similar error:
```
Jul 07 14:59:23 myhostname kernel: ------------[ cut here ]------------
Jul 07 14:59:23 myhostname kernel: Unpatched return thunk in use. This should not happen!
Jul 07 14:59:23 myhostname kernel: WARNING: CPU: 4 PID: 1103 at arch/x86/kernel/cpu/bugs.c:3023 __warn_thunk+0x2a/0x40
Jul 07 14:59:23 myhostname kernel: Modules linked in: wl(POE+) bluetooth(+) intel_uncore(+) snd_soc_acpi mac80211 soundwire_bus wmi_bmof processor_thermal_device_pci pcspkr processor_thermal_d>
Jul 07 14:59:23 myhostname kernel: scsi_dh_alua sunrpc kvmfr(OE) loop dm_multipath nfnetlink zram dm_crypt xe drm_gpuvm drm_exec gpu_sched drm_suballoc_helper drm_ttm_helper hid_sensor_hub in>
Jul 07 14:59:23 myhostname kernel: Unloaded tainted modules: nvidia_peermem(POE):1
Jul 07 14:59:23 myhostname kernel: CPU: 4 PID: 1103 Comm: (udev-worker) Tainted: P OE 6.9.7-200.fc40.x86_64 #1
Jul 07 14:59:23 myhostname kernel: Hardware name: LENOVO 83DN/LNVNB161216, BIOS NKCN25WW 02/05/2024
Jul 07 14:59:23 myhostname kernel: RIP: 0010:__warn_thunk+0x2a/0x40
Jul 07 14:59:23 myhostname kernel: Code: 66 0f 1f 00 0f 1f 44 00 00 80 3d 01 19 77 02 00 74 05 c3 cc cc cc cc 48 c7 c7 68 86 b3 a8 c6 05 ec 18 77 02 01 e8 b6 51 0c 00 <0f> 0b c3 cc cc cc cc 66>
Jul 07 14:59:23 myhostname kernel: RSP: 0018:ffffa93241a97af0 EFLAGS: 00010282
Jul 07 14:59:23 myhostname kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000027
Jul 07 14:59:23 myhostname kernel: RDX: ffff918a9f0218c8 RSI: 0000000000000001 RDI: ffff918a9f0218c0
Jul 07 14:59:23 myhostname kernel: RBP: ffffa93241a97b40 R08: 0000000000000000 R09: ffffa93241a97a80
Jul 07 14:59:23 myhostname kernel: R10: ffffffffa8b3869f R11: 0000000000000000 R12: ffffffffc64ffbb8
Jul 07 14:59:23 myhostname kernel: R13: ffffa93241a97b88 R14: 00007fd9582a307d R15: ffffa93241a97c18
Jul 07 14:59:23 myhostname kernel: FS: 00007fd957aba980(0000) GS:ffff918a9f000000(0000) knlGS:0000000000000000
Jul 07 14:59:23 myhostname kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jul 07 14:59:23 myhostname kernel: CR2: 00007feb136ef3bc CR3: 0000000112dd0003 CR4: 0000000000f70ef0
Jul 07 14:59:23 myhostname kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Jul 07 14:59:23 myhostname kernel: DR3: 0000000000000000 DR6: 00000000ffff07f0 DR7: 0000000000000400
Jul 07 14:59:23 myhostname kernel: PKRU: 55555554
Jul 07 14:59:23 myhostname kernel: Call Trace:
Jul 07 14:59:23 myhostname kernel: <TASK>
Jul 07 14:59:23 myhostname kernel: ? __warn_thunk+0x2a/0x40
Jul 07 14:59:23 myhostname kernel: ? __warn.cold+0x8e/0xe8
Jul 07 14:59:23 myhostname kernel: ? __warn_thunk+0x2a/0x40
Jul 07 14:59:23 myhostname kernel: ? report_bug+0xff/0x140
Jul 07 14:59:23 myhostname kernel: ? handle_bug+0x3c/0x80
Jul 07 14:59:23 myhostname kernel: ? exc_invalid_op+0x17/0x70
Jul 07 14:59:23 myhostname kernel: ? asm_exc_invalid_op+0x1a/0x20
Jul 07 14:59:23 myhostname kernel: ? __warn_thunk+0x2a/0x40
Jul 07 14:59:23 myhostname kernel: warn_thunk_thunk+0x1a/0x30
Jul 07 14:59:23 myhostname kernel: getvar+0x20/0x70 [wl]
Jul 07 14:59:23 myhostname kernel: ? __UNIQUE_ID_vermagic434+0x56cd7fc90ebc/0x56cd7fc90ebc [wl]
Jul 07 14:59:23 myhostname kernel: wl_module_init+0x17/0xa0 [wl]
Jul 07 14:59:23 myhostname kernel: ? do_one_initcall+0x58/0x310
Jul 07 14:59:23 myhostname kernel: ? do_init_module+0x90/0x250
Jul 07 14:59:23 myhostname kernel: ? __do_sys_init_module+0x17a/0x1b0
Jul 07 14:59:23 myhostname kernel: ? do_syscall_64+0x82/0x160
Jul 07 14:59:23 myhostname kernel: ? vfs_read+0x237/0x360
Jul 07 14:59:23 myhostname kernel: ? syscall_exit_to_user_mode_prepare+0x149/0x170
Jul 07 14:59:23 myhostname kernel: ? syscall_exit_to_user_mode+0x75/0x230
Jul 07 14:59:23 myhostname kernel: ? do_syscall_64+0x8e/0x160
Jul 07 14:59:23 myhostname kernel: ? do_user_addr_fault+0x34e/0x620
Jul 07 14:59:23 myhostname kernel: ? exc_page_fault+0x7e/0x180
Jul 07 14:59:23 myhostname kernel: ? entry_SYSCALL_64_after_hwframe+0x76/0x7e
Jul 07 14:59:23 myhostname kernel: </TASK>
Jul 07 14:59:23 myhostname kernel: ---[ end trace 0000000000000000 ]---
```
Are you sure this is a Broadcom issue? My lpaptop has:
```
02:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 01)
Subsystem: Dell Wireless 1704 802.11n + BT 4.0
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at f1900000 (64-bit, non-prefetchable) [size=32K]
Capabilities: <access denied>
Kernel driver in use: wl
Kernel modules: bcma, wl
```
Hello Alex,
> I have a Yoga Pro 9 16IMH9 (type 83DN) model with an Nvidia 4060 that does
> NOT have a Broadcom chipset. Unfortuantely I am getting a similar error:
>
> [...]
>
> Are you sure this is a Broadcom issue? My lpaptop has:
>
>
> ```
> 02:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142
> 802.11b/g/n (rev 01)
> Subsystem: Dell Wireless 1704 802.11n + BT 4.0
> Flags: bus master, fast devsel, latency 0, IRQ 16
> Memory at f1900000 (64-bit, non-prefetchable) [size=32K]
> Capabilities: <access denied>
> Kernel driver in use: wl
> Kernel modules: bcma, wl
As you can see in the information you provided, even if your wireless device is known as "Dell Wireless 1704", the real wireless chipset is known as BCM43142, which a Broadcom device and your kernel has done a good job by loading the wl driver ("Kernel driver in use: wl") that you probably installed from rpmfusion repository.
In order to be sure of this, could you please provide the result of the command line below, typed in a root console (terminal):
dnf list installed "*kmod-wl*"
Some kmod-wl* and the akmod-wl packages should be listed.
Please feel free to make any comment about these subjects.
Cordially,
--
NVieville
My apologies. I was on the original Fedora thread https://discussion.fedoraproject.org/t/kernel-hangs-since-some-recent-fedora-kernels/120846 Unfortunately I copy pasted the infromation of the original user with the Dell machine. My machine (Yoga Pro 9 16IMH9 (type 83DN) model) actually has this adapter: ``` 00:14.3 Network controller: Intel Corporation Meteor Lake PCH CNVi WiFi (rev 20) Subsystem: Intel Corporation Wi-Fi 6E AX211 160MHz Flags: bus master, fast devsel, latency 0, IRQ 18, IOMMU group 13 Memory at 4203304000 (64-bit, non-prefetchable) [size=16K] Capabilities: <access denied> Kernel driver in use: iwlwifi Kernel modules: iwlwifi, wl ``` Sorry for the confusion, I simply grabbed the incorrect lspci output from the original post... Here is what I get on every boot on my machine: ``` Jul 07 17:51:28 myhostname kernel: ------------[ cut here ]------------ Jul 07 17:51:28 myhostname kernel: Unpatched return thunk in use. This should not happen! Jul 07 17:51:28 myhostname kernel: WARNING: CPU: 6 PID: 1132 at arch/x86/kernel/cpu/bugs.c:3023 __warn_thunk+0x2a/0x40 Jul 07 17:51:28 myhostname kernel: Modules linked in: btmtk(+) rapl(+) soundwire_generic_allocation videobuf2_common(+) fat(+) wl(POE+) bluetooth intel_cstate mac80211 intel_uncore snd_soc_acp> Jul 07 17:51:28 myhostname kernel: brcmfmac brcmutil cfg80211 rfkill auth_rpcgss scsi_dh_rdac scsi_dh_emc scsi_dh_alua sunrpc kvmfr(OE) loop dm_multipath nfnetlink zram dm_crypt xe drm_gpuvm > Jul 07 17:51:28 myhostname kernel: Unloaded tainted modules: nvidia_peermem(POE):1 Jul 07 17:51:28 myhostname kernel: CPU: 6 PID: 1132 Comm: (udev-worker) Tainted: P OE 6.9.7-200.fc40.x86_64 #1 Jul 07 17:51:28 myhostname kernel: Hardware name: LENOVO 83DN/LNVNB161216, BIOS NKCN25WW 02/05/2024 Jul 07 17:51:28 myhostname kernel: RIP: 0010:__warn_thunk+0x2a/0x40 Jul 07 17:51:28 myhostname kernel: Code: 66 0f 1f 00 0f 1f 44 00 00 80 3d 01 19 77 02 00 74 05 c3 cc cc cc cc 48 c7 c7 68 86 b3 ab c6 05 ec 18 77 02 01 e8 b6 51 0c 00 <0f> 0b c3 cc cc cc cc 66> Jul 07 17:51:28 myhostname kernel: RSP: 0018:ffffb869c1c6bb30 EFLAGS: 00010282 Jul 07 17:51:28 myhostname kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000027 Jul 07 17:51:28 myhostname kernel: RDX: ffff8f4fdf1218c8 RSI: 0000000000000001 RDI: ffff8f4fdf1218c0 Jul 07 17:51:28 myhostname kernel: RBP: ffffb869c1c6bb80 R08: 0000000000000000 R09: ffffb869c1c6bac0 Jul 07 17:51:28 myhostname kernel: R10: ffffffffabb3869f R11: 0000000000000000 R12: ffffffffc6350bb8 Jul 07 17:51:28 myhostname kernel: R13: ffffb869c1c6bbc8 R14: 00007ffa2d1fa07d R15: ffffb869c1c6bc58 Jul 07 17:51:28 myhostname kernel: FS: 00007ffa2c71d980(0000) GS:ffff8f4fdf100000(0000) knlGS:0000000000000000 Jul 07 17:51:28 myhostname kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Jul 07 17:51:28 myhostname kernel: CR2: 000055bf08475058 CR3: 0000000108538003 CR4: 0000000000f70ef0 Jul 07 17:51:28 myhostname kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 Jul 07 17:51:28 myhostname kernel: DR3: 0000000000000000 DR6: 00000000ffff07f0 DR7: 0000000000000400 Jul 07 17:51:28 myhostname kernel: PKRU: 55555554 Jul 07 17:51:28 myhostname kernel: Call Trace: Jul 07 17:51:28 myhostname kernel: <TASK> Jul 07 17:51:28 myhostname kernel: ? __warn_thunk+0x2a/0x40 Jul 07 17:51:28 myhostname kernel: ? __warn.cold+0x8e/0xe8 Jul 07 17:51:28 myhostname kernel: ? __warn_thunk+0x2a/0x40 Jul 07 17:51:28 myhostname kernel: ? report_bug+0xff/0x140 Jul 07 17:51:28 myhostname kernel: ? handle_bug+0x3c/0x80 Jul 07 17:51:28 myhostname kernel: ? exc_invalid_op+0x17/0x70 Jul 07 17:51:28 myhostname kernel: ? asm_exc_invalid_op+0x1a/0x20 Jul 07 17:51:28 myhostname kernel: ? __warn_thunk+0x2a/0x40 Jul 07 17:51:28 myhostname kernel: warn_thunk_thunk+0x1a/0x30 Jul 07 17:51:28 myhostname kernel: getvar+0x20/0x70 [wl] Jul 07 17:51:28 myhostname kernel: ? orc_header+0x1644/0x1644 [wl] Jul 07 17:51:28 myhostname kernel: wl_module_init+0x17/0xa0 [wl] Jul 07 17:51:28 myhostname kernel: ? do_one_initcall+0x58/0x310 Jul 07 17:51:28 myhostname kernel: ? do_init_module+0x90/0x250 Jul 07 17:51:28 myhostname kernel: ? __do_sys_init_module+0x17a/0x1b0 Jul 07 17:51:28 myhostname kernel: ? do_syscall_64+0x82/0x160 Jul 07 17:51:28 myhostname kernel: ? __lruvec_stat_mod_folio+0x68/0xa0 Jul 07 17:51:28 myhostname kernel: ? set_ptes.isra.0+0x28/0x90 Jul 07 17:51:28 myhostname kernel: ? do_anonymous_page+0x410/0x770 Jul 07 17:51:28 myhostname kernel: ? pmdp_collapse_flush+0x10/0x60 Jul 07 17:51:28 myhostname kernel: ? __handle_mm_fault+0xc61/0xe10 Jul 07 17:51:28 myhostname kernel: ? _raw_spin_lock_irqsave+0x3d/0x50 Jul 07 17:51:28 myhostname kernel: ? __count_memcg_events+0x69/0x100 Jul 07 17:51:28 myhostname kernel: ? count_memcg_events.constprop.0+0x1a/0x30 Jul 07 17:51:28 myhostname kernel: ? handle_mm_fault+0x1f0/0x300 Jul 07 17:51:28 myhostname kernel: ? do_user_addr_fault+0x34e/0x620 Jul 07 17:51:28 myhostname kernel: ? exc_page_fault+0x7e/0x180 Jul 07 17:51:28 myhostname kernel: ? entry_SYSCALL_64_after_hwframe+0x76/0x7e Jul 07 17:51:28 myhostname kernel: </TASK> Jul 07 17:51:28 myhostname kernel: ---[ end trace 0000000000000000 ]--- ``` The concern on the original thread is that there may be a more general (rather than Broadcom-specific) issue here. It was suggested that I add this information to the bugzilla just in case this is the case. Note that I do have the kernel module package you mentioned: ``` > rpm -qa | grep kmod-wl kmod-wl-6.9.7-200.fc40.x86_64-6.30.223.271-51.fc40.x86_64 ``` Here is the lsmod output where wl is actually present: ``` > lsmod | grep wl iwlmvm 860160 0 wl 6520832 0 mac80211 1744896 1 iwlmvm snd_soc_tas2781_fmwlib 61440 1 snd_hda_scodec_tas2781_i2c snd_soc_tas2781_comlib 24576 2 snd_soc_tas2781_fmwlib,snd_hda_scodec_tas2781_i2c crc8 12288 2 snd_soc_tas2781_fmwlib,snd_soc_tas2781_comlib iwlwifi 540672 1 iwlmvm cfg80211 1421312 5 wl,iwlmvm,brcmfmac,iwlwifi,mac80211 rfkill 40960 10 iwlmvm,bluetooth,ideapad_laptop,cfg80211 ``` I am on Bluefix-DX which is a Fedora-Silverblue derivative. (In reply to Alex from comment #7) > Note that I do have the kernel module package you mentioned: > > ``` > > rpm -qa | grep kmod-wl > kmod-wl-6.9.7-200.fc40.x86_64-6.30.223.271-51.fc40.x86_64 > ``` > > Here is the lsmod output where wl is actually present: > > ``` > > lsmod | grep wl > iwlmvm 860160 0 > wl 6520832 0 As you can see here, the Broadcom wl module is loaded even if your wireless device uses the iwlwifi one. This explain why you see the same message in your logs as ycollette. Still don't know why it is loaded. Maybe you'll find why by exploring your configuration files. If you are sure that no Broadcom device (wireless or bluetooth) on your laptop needs this module, maybe you should remove completely the concerned packages of your system and see what happens. dnf remove akmod-wl "kmod-wl*" broadcom-wl in a root console should achieve this goal. Hope this will help you to fix this issue for your case. We, with Broadcom devices, are still searching for a workaround. Thank you for your feedback. Cordially, -- NVieville Sent a mail to opensource@broadcom.com to see if they can release the sources of the driver as open source ... Finger crossed. |