Re: Suspend/resume error with AWUS036ACM

From: James
Date: Thu May 05 2022 - 22:20:35 EST


What is UBSAN?

Mmm, I got something similar but I upgraded and now I get:
[   53.857635] ================================================================================
[   53.866267] UBSAN: array-index-out-of-bounds in /build/linux-raspi-9eKTPI/linux-raspi-5.15.0/net/mac80211/airtime.c:460:47
[   53.877535] index 15 is out of range for type 'u16 [12]'
[   53.882952] CPU: 3 PID: 104 Comm: kworker/u8:1 Tainted: G C        5.15.0-1006-raspi #6-Ubuntu
[   53.882961] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[   53.882965] Workqueue: mt76 mt76u_tx_status_data [mt76_usb]
[   53.882990] Call trace:
[   53.882992]  dump_backtrace+0x0/0x1f0
[   53.883001]  show_stack+0x24/0x30
[   53.883006]  dump_stack_lvl+0x8c/0xb8
[   53.883011]  dump_stack+0x18/0x34
[   53.883015]  ubsan_epilogue+0x10/0x54
[   53.883019]  __ubsan_handle_out_of_bounds+0x80/0x90
[   53.883026]  ieee80211_get_rate_duration.constprop.0+0x218/0x290 [mac80211]
[   53.883162]  ieee80211_calc_rx_airtime+0xfc/0x160 [mac80211]
[   53.883251]  ieee80211_calc_tx_airtime+0xd0/0x110 [mac80211]
[   53.883338]  mt76x02_send_tx_status+0x17c/0x390 [mt76x02_lib]
[   53.883360]  mt76x02_tx_status_data+0x5c/0x90 [mt76x02_lib]
[   53.883377]  mt76u_tx_status_data+0x88/0x110 [mt76_usb]
[   53.883386]  process_one_work+0x204/0x4c0
[   53.883396]  worker_thread+0x144/0x470
[   53.883401]  kthread+0x12c/0x140
[   53.883407]  ret_from_fork+0x10/0x20
[   53.883428] ================================================================================

ubuntu server 5.15.0-1006-raspi


I was getting:
[   25.597319] ================================================================================
[   25.597344] UBSAN: invalid-load in /build/linux-raspi-9r6HWT/linux-raspi-5.15.0/net/mac80211/status.c:1164:21
[   25.597367] load of value 255 is not a valid value for type '_Bool'
[   25.597382] CPU: 0 PID: 105 Comm: kworker/u8:2 Tainted: G C        5.15.0-1005-raspi #5-Ubuntu
[   25.597397] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[   25.597406] Workqueue: phy0 mt76x02_mac_work [mt76x02_lib]
[   25.597472] Call trace:
[   25.597477]  dump_backtrace+0x0/0x1f0
[   25.597496]  show_stack+0x24/0x30
[   25.597507]  dump_stack_lvl+0x8c/0xb8
[   25.597520]  dump_stack+0x18/0x34
[   25.597530]  ubsan_epilogue+0x10/0x54
[   25.597539]  __ubsan_handle_load_invalid_value+0x80/0x90
[   25.597553]  ieee80211_tx_status_ext+0x54c/0x550 [mac80211]
[   25.597800]  mt76_tx_status_unlock+0x100/0x160 [mt76]
[   25.597854]  mt76_tx_status_check+0x74/0xa4 [mt76]
[   25.597900]  mt76x02_mac_work+0x174/0x2ac [mt76x02_lib]
[   25.597943]  process_one_work+0x204/0x4c0
[   25.597958]  worker_thread+0x144/0x470
[   25.597970]  kthread+0x12c/0x140
[   25.597981]  ret_from_fork+0x10/0x20
[   25.597996] ================================================================================

Everything seems to work.

On 2022-05-05 02:29, Gonsolo wrote:
Hi all.

After a resume I get the following error:

+0,000007] UBSAN: invalid-load in
/build/linux-lowlatency-fSdu7c/linux-lowlatency-5.15.0/net/mac80211/status.c:1164:21
[ +0,000004] load of value 255 is not a valid value for type '_Bool'
[ +0,000004] CPU: 22 PID: 387 Comm: kworker/u256:5 Tainted: P
OE 5.15.0-27-lowlatency #28-Ubuntu
[ +0,000004] Hardware name: To Be Filled By O.E.M. To Be Filled By
O.E.M./X399 Phantom Gaming 6, BIOS P1.31 01/14/2021
[ +0,000003] Workqueue: phy0 mt76x02_mac_work [mt76x02_lib]
[ +0,000014] Call Trace:
[ +0,000003] <TASK>
[ +0,000003] show_stack+0x52/0x58
[ +0,000006] dump_stack_lvl+0x4a/0x5f
[ +0,000007] dump_stack+0x10/0x12
[ +0,000003] ubsan_epilogue+0x9/0x45
[ +0,000002] __ubsan_handle_load_invalid_value.cold+0x44/0x49
[ +0,000004] ieee80211_tx_status_ext.cold+0x4e/0x5f [mac80211]
[ +0,000068] mt76_tx_status_unlock+0x111/0x160 [mt76]
[ +0,000010] mt76_tx_status_check+0x68/0x90 [mt76]
[ +0,000009] mt76x02_mac_work+0x14b/0x240 [mt76x02_lib]
[ +0,000008] process_one_work+0x222/0x3f0
[ +0,000006] worker_thread+0x50/0x3f0
[ +0,000004] ? process_one_work+0x3f0/0x3f0
[ +0,000004] kthread+0x13b/0x160
[ +0,000003] ? set_kthread_struct+0x50/0x50
[ +0,000004] ret_from_fork+0x22/0x30
[ +0,000006] </TASK>
[ +0,000001] ================================================================================

This is a stock Ubuntu Jammy lowlatency kernel (with Nvidia drivers).

I would be happy to provide all the needed information to resolve this.

I also want to note that the device is running quite unstable (lots of
deauthenticating, network lost, etc...).

Regards,
g