2018-09-10 20:40:06

by David Poole

[permalink] [raw]
Subject: desktop hard lock up (kernel panic) with Alfa AWUSB036ACM and wireless-testing 72d1e548defbf

Start wpa_supplicant
Attach to a Cisco AP (haven't tried too many other APs yet). Desktop
locks up hard. I have some shell scripts I use start wpa_supp and run
wpa_cli (I'm not going through the GNOME ui or other).

(Occurs to me I need to verify I didn't have the system's
wpa_supplicant running... I forget to kill the systemd started wpa_supp
before starting mine.)

Captured a kernel oops (attached) with netconsole. Same kernel with my
2nd wifi (an Intel 8265 PCI-e card) works.

Running:
git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-
testing.git 72d1e548defbf75c6bb42fc99276cd88fda7dda0


I can 'iw dev scan' & scan through wpa_supplicant with the card fairly
successfully. I haven't tried monitor mode. Have recreated the oops a
couple times.


Alfa AWUSB036ACM

Bus 001 Device 004: ID 0e8d:7612 MediaTek Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0e8d MediaTek Inc.
idProduct 0x7612
bcdDevice 1.00
iManufacturer 2 MediaTek Inc.
iProduct 3 Wireless
iSerial 4 000000000

phy#0
Interface wlp0s20f0u1u2
ifindex 5
wdev 0x1
addr 00:c0:ca:95:78:45
type managed
txpower 24.00 dBm
phy#1
Unnamed/non-netdev interface
wdev 0x100000002
addr 60:f6:77:b0:21:e3
type P2P-device
txpower 0.00 dBm
Interface wlp2s0
ifindex 4
wdev 0x100000001
addr 60:f6:77:b0:21:e2
type managed
txpower 0.00 dBm




Attachments:
kernel-panic.txt (14.55 kB)
phy-info.txt (6.22 kB)
dmsg.log (63.33 kB)
smime.p7s (5.07 kB)
Download all attachments

2018-09-10 22:28:16

by David Poole

[permalink] [raw]
Subject: Re: desktop hard lock up (kernel panic) with Alfa AWUSB036ACM and wireless-testing 72d1e548defbf

On Mon, 2018-09-10 at 19:27 +0200, Lorenzo Bianconi wrote:
> >
> > Start wpa_supplicant
> > Attach to a Cisco AP (haven't tried too many other APs yet).
> > Desktop
> > locks up hard. I have some shell scripts I use start wpa_supp and
> > run
> > wpa_cli (I'm not going through the GNOME ui or other).
> >
> > (Occurs to me I need to verify I didn't have the system's
> > wpa_supplicant running... I forget to kill the systemd started
> > wpa_supp
> > before starting mine.)
> >
> > Captured a kernel oops (attached) with netconsole. Same kernel with
> > my
> > 2nd wifi (an Intel 8265 PCI-e card) works.
> >
> > Running:
> > git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-
> > testing.git 72d1e548defbf75c6bb42fc99276cd88fda7dda0
> >
> >
> > I can 'iw dev scan' & scan through wpa_supplicant with the card
> > fairly
> > successfully. I haven't tried monitor mode. Have recreated the oops
> > a
> > couple times.
> >
> >
> > Alfa AWUSB036ACM
> >
>
> Hi David,
>
> according to the kernel log you provided the crash occurs in
> ieee80211_wake_txqs().
> Could you please run gdb in order to identify the point where NULL
> pointer dereference occurs? E.g:
>
> $gdb mac80211.ko
> $info address ieee80211_wake_txqs
> $l*(<func addr>+<offset>)
> offset is 0x1e3 in your log
>
> Regards,
> Lorenzo
>

Hello. Here's the requested info.

...trillian:wireless-testing% gdb ./net/mac80211/mac80211.ko
[...]
(gdb) info address ieee80211_wake_txqs
Symbol "ieee80211_wake_txqs" is a function at address 0x35890.
[...]
(gdb) l*(0x35890+0x1e3)
0x35a73 is in ieee80211_wake_txqs (net/mac80211/util.c:269).
264 for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++)
{
265 struct ieee80211_txq *txq = sta-
>sta.txq[i];
266
267 txqi = to_txq_info(txq);
268
269 if (ac != txq->ac)
270 continue;
271
272 if
(!test_and_clear_bit(IEEE80211_TXQ_STOP_NETIF_TX,
273 &txqi->flags))


Attachments:
smime.p7s (5.07 kB)

2018-09-17 13:41:16

by Lorenzo Bianconi

[permalink] [raw]
Subject: Re: desktop hard lock up (kernel panic) with Alfa AWUSB036ACM and wireless-testing 72d1e548defbf

>
> Hello. Here's the requested info.
>
> ...trillian:wireless-testing% gdb ./net/mac80211/mac80211.ko
> [...]
> (gdb) info address ieee80211_wake_txqs
> Symbol "ieee80211_wake_txqs" is a function at address 0x35890.
> [...]
> (gdb) l*(0x35890+0x1e3)
> 0x35a73 is in ieee80211_wake_txqs (net/mac80211/util.c:269).
> 264 for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++)
> {
> 265 struct ieee80211_txq *txq = sta-
> >sta.txq[i];
> 266
> 267 txqi = to_txq_info(txq);
> 268
> 269 if (ac != txq->ac)
> 270 continue;
> 271
> 272 if
> (!test_and_clear_bit(IEEE80211_TXQ_STOP_NETIF_TX,
> 273 &txqi->flags))

It should be fixed here:
https://marc.info/?l=linux-kernel&m=153694084922438&w=2
--
UNIX is Sexy: who | grep -i blonde | talk; cd ~; wine; talk; touch;
unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp;
umount; make clean; sleep

2018-09-10 22:22:47

by Lorenzo Bianconi

[permalink] [raw]
Subject: Re: desktop hard lock up (kernel panic) with Alfa AWUSB036ACM and wireless-testing 72d1e548defbf

>
> Start wpa_supplicant
> Attach to a Cisco AP (haven't tried too many other APs yet). Desktop
> locks up hard. I have some shell scripts I use start wpa_supp and run
> wpa_cli (I'm not going through the GNOME ui or other).
>
> (Occurs to me I need to verify I didn't have the system's
> wpa_supplicant running... I forget to kill the systemd started wpa_supp
> before starting mine.)
>
> Captured a kernel oops (attached) with netconsole. Same kernel with my
> 2nd wifi (an Intel 8265 PCI-e card) works.
>
> Running:
> git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-
> testing.git 72d1e548defbf75c6bb42fc99276cd88fda7dda0
>
>
> I can 'iw dev scan' & scan through wpa_supplicant with the card fairly
> successfully. I haven't tried monitor mode. Have recreated the oops a
> couple times.
>
>
> Alfa AWUSB036ACM
>

Hi David,

according to the kernel log you provided the crash occurs in
ieee80211_wake_txqs().
Could you please run gdb in order to identify the point where NULL
pointer dereference occurs? E.g:

$gdb mac80211.ko
$info address ieee80211_wake_txqs
$l*(<func addr>+<offset>)
offset is 0x1e3 in your log

Regards,
Lorenzo

2018-09-18 00:36:11

by David Poole

[permalink] [raw]
Subject: Re: desktop hard lock up (kernel panic) with Alfa AWUSB036ACM and wireless-testing 72d1e548defbf

On Mon, 2018-09-17 at 10:14 +0200, Lorenzo Bianconi wrote:
> >
> > Hello. Here's the requested info.
> >
> > ...trillian:wireless-testing% gdb ./net/mac80211/mac80211.ko
> > [...]
> > (gdb) info address ieee80211_wake_txqs
> > Symbol "ieee80211_wake_txqs" is a function at address 0x35890.
> > [...]
> > (gdb) l*(0x35890+0x1e3)
> > 0x35a73 is in ieee80211_wake_txqs (net/mac80211/util.c:269).
> > 264 for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++)
> > {
> > 265 struct ieee80211_txq *txq = sta-
> > > sta.txq[i];
> >
> > 266
> > 267 txqi = to_txq_info(txq);
> > 268
> > 269 if (ac != txq->ac)
> > 270 continue;
> > 271
> > 272 if
> > (!test_and_clear_bit(IEEE80211_TXQ_STOP_NETIF_TX,
> > 273 &txqi->flags))
>
> It should be fixed here:
> https://marc.info/?l=linux-kernel&m=153694084922438&w=2

Worked! Continuing to test.




Attachments:
smime.p7s (5.07 kB)