Discussion:
Kernel hang on i386 running 6.1.3
Bob Nestor
2014-04-18 18:08:59 UTC
Permalink
I'm not sure this is a bug, but I've been seeing the kernel hang on my i386 system running 6.1.3. I've isolated it to the hostapd setup. My system has a D-Link AirPlus XtremeG DWL-G520 wireless card with H/W version A3 and F/W version 2.36.

I noticed some traffic a year or so ago that someone was reporting similar problems with an atheros device on 6.0, but never saw a resolution.

The ath man page indicates that the A1 version of the AR5212 card isn't supported and I assume that's referring to the H/W version. My card does run outside of the kernel hangs, although it spits out the "device timeout" message. This also happens on a DWA-556 card running on an amd64 system but these messages don't appear to seriously impact use of the systems.

What I've finally isolated things down to is the WEP/WPA/WPA2 setup. All three modes do work, but setting the "wpa=3" parameter in the hostapd.conf file causes the kernel to hang solid within about 2 hours. Sometimes the hang occurs while booting, sometimes the system runs fine for up to 2 hours before hanging. In all cases this is without any active network connections on the wireless interface.

Setting the parameter to "wpa=1" for WPA or setting it to "wpa=2" for WPA2 both work fine and the system is able to stay up and running for over 12 hours. But setting it to "3" for both WPA and WPA2 causes the hang. Not using any hostapd setup I believe defaults to WEP and that also works just fine.

Using the "wpa=3" on an amd64 system running 5.1 with the D-Link DWA-556 doesn't cause a problem.

If someone thinks this is really a bug and would like me to run tests I'd be happy to. Although so far I've never been able to get a dump or get into the kernel debugger.
Christos Zoulas
2014-04-19 01:10:22 UTC
Permalink
Post by Bob Nestor
I'm not sure this is a bug, but I've been seeing the kernel hang on my
i386 system running 6.1.3. I've isolated it to the hostapd setup. My
system has a D-Link AirPlus XtremeG DWL-G520 wireless card with H/W
version A3 and F/W version 2.36.
I noticed some traffic a year or so ago that someone was reporting
similar problems with an atheros device on 6.0, but never saw a
resolution.
The ath man page indicates that the A1 version of the AR5212 card isn't
supported and I assume that's referring to the H/W version. My card
does run outside of the kernel hangs, although it spits out the "device
timeout" message. This also happens on a DWA-556 card running on an
amd64 system but these messages don't appear to seriously impact use of
the systems.
What I've finally isolated things down to is the WEP/WPA/WPA2 setup.
All three modes do work, but setting the "wpa=3" parameter in the
hostapd.conf file causes the kernel to hang solid within about 2 hours.
Sometimes the hang occurs while booting, sometimes the system runs fine
for up to 2 hours before hanging. In all cases this is without any
active network connections on the wireless interface.
Setting the parameter to "wpa=1" for WPA or setting it to "wpa=2" for
WPA2 both work fine and the system is able to stay up and running for
over 12 hours. But setting it to "3" for both WPA and WPA2 causes the
hang. Not using any hostapd setup I believe defaults to WEP and that
also works just fine.
Using the "wpa=3" on an amd64 system running 5.1 with the D-Link DWA-556
doesn't cause a problem.
If someone thinks this is really a bug and would like me to run tests
I'd be happy to. Although so far I've never been able to get a dump or
get into the kernel debugger.
Are you running out of memory? Is there a leak perhaps in the kernel?

christos
Bob Nestor
2014-04-21 00:22:36 UTC
Permalink
I was monitoring memory when the system hung and it didn't appear to run out of memory. I've been able to do some more testing and it appears the problem is really just my crappy DWL-G520 card. I've now seen some hangs in all modes so I'm now trying to hunt down another PCI wireless card that is supported. That's not easy as it appears most manufacturers have moved to a newer set of chips that aren't supported in NetBSD drivers (yet). Between wikidevi.com and Google I've been able to locate some potential candidates that might be available locally though.

So sorry for the false alarm on hostapd. The problem appears to be in the ath driver with the A3 firmware in the DWL-G520. Or it may just be really crappy firmware in the card itself.
Rhialto
2014-04-21 16:00:53 UTC
Permalink
Post by Bob Nestor
So sorry for the false alarm on hostapd. The problem appears to be in
the ath driver with the A3 firmware in the DWL-G520. Or it may just
be really crappy firmware in the card itself.
On my amd64 laptop, which has some ath variant, I get freezes too. I
don't even need to use the interface.

It happens after some random time. I can avoid it by either disabling
ath0, or ACPI (strange enough). Since I prefer cabled network anyway, the
choice is abvious which one to disable (but if I take it somewhere, it
would be nice if it worked, of course).

There is no problem witn Linux on the same machine (dual boot).

-Olaf.
--
___ Olaf 'Rhialto' Seibert -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl -- 'this bath is too hot.'
Bob Nestor
2014-04-21 16:33:18 UTC
Permalink
I believe the NetBSD ath source, and in fact most of the wireless support, was originally imported from FreeBSD. It appears that last changes in NetBSD were done about 3 years ago. A quick check of FreeBSD shows they've made changes as recently as three months ago. In fact the ath driver in FreeBSD 10.0 claims to support *all* Atheros devices except those based on the AR5005VL chipset. Wish I was capable of importing the FreeBSD wireless code back into NetBSD as it sure would bring the system up to date and make it much more capable of supporting a lot of the newer wireless devices now on the market.

All the cards that I've found and tried to use that didn't work with NetBSD would have worked with FreeBSD based on my reading of the Version and Device codes.
Martin Husemann
2014-04-21 17:00:04 UTC
Permalink
Note that it isn't that simple - the FreeBSD 802.11 stack is quite different.
In NetBSD-current there is also the athn(4) driver, which supports different
atheros chips.

Can you break into ddb when it hangs?

Martin
Bob Nestor
2014-04-21 17:10:25 UTC
Permalink
Yeah, I didn't think it was simple but it's a nice thought.

I haven't been able to get into ddb when it hangs. I thought this might be because of the setting on onpanic in sysctl.conf, but setting it to "1" didn't help and I noticed after the system comes up that someplace it gets reset back to "0". Didn't think at the time to set it manually back to "1" after the system is up.

The good news (for me) is I found a card at MicroCenter that works. It's a TP-Link TL-WN951N with a Vendor/Device code of 168c/0029, so it's still using the ath driver but it's using a different set of code. Version 1 of this card has a Vendor/Device code of 168c/0023 and this new card is labeled as having Version 3.2 firmware.

I'm not sure it's worth the effort to try and find out what's wrong with the code or DWL-G520 card that I have, but if someone wants to try I'm willing to donate it to them. It's of no use to me now.

-bob
Post by Martin Husemann
Note that it isn't that simple - the FreeBSD 802.11 stack is quite different.
In NetBSD-current there is also the athn(4) driver, which supports different
atheros chips.
Can you break into ddb when it hangs?
Martin
Riccardo Mottola
2014-04-27 13:13:21 UTC
Permalink
Hi,
Post by Bob Nestor
All the cards that I've found and tried to use that didn't work with NetBSD would have worked with FreeBSD based on my reading of the Version and Device codes.
Hmm, I bought off e-bay a PCMCIA card to use with my laptop(s) which
don't have integrated Wireless, I tried it and it doesn't work on linux,
and on any BSD.. it is ath based! I'm not sure exactly which chipset it
has, it is surely atheros.

I bought then another card, again ath based, which doesn't work on linux
(although it gets recognized, but I think it loads bad firmware or
initializes it badly because it never connects although the device
exists) connects sometimes in OpenBSD and if it does it works... I don't
remember what exactly the problem on NetBSD was, but I wasn't lucky either.

I then stopped buying cards, because it is hard to know before what
chipset you will get!

If I can give more information to get them better supported I'd be happy.

Riccardo
Riccardo Mottola
2014-04-27 23:07:06 UTC
Permalink
Hi,

slightly hijacking your thread here....
Post by Bob Nestor
All the cards that I've found and tried to use that didn't work with NetBSD would have worked with FreeBSD based on my reading of the Version and Device codes.
I have a D-Link DWL G650M, inserting that one just gives me:
(manufacturer 0x0, product 0x0) Atheros Communications product 0x0020
(ethernet network, revision 0x01) at cardbus0 function 0 not configured


I have then a NEC Aterm WL54AG, inserting that seems more reassuring:

ath0 at cardbus0 function 0
ath0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps
24Mbps 36Mbps 48Mbps 54Mbps
ath0: turboA rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: mac 5.6 phy 4.1 radio 3.6

however, if I power it up, configure nwid and newkey, then run dhclient,
I get a valid address (dhclient succeeded) but then I cannot ping nor
use the network and get these errors:

ath0: device timeout (txq 1, txintrperiod 5)
ath0: device timeout (txq 1, txintrperiod 4)
ath0: device timeout (txq 1, txintrperiod 3)
ath0: device timeout (txq 1, txintrperiod 2)
ath0: deleting keyix 0 w/o power
ath0: detached

The last one is probably when I removed it and put in another card to
actually get the information and type this message.

Riccardo

Loading...