Bug 255012 - iwn driver kernel panic
Summary: iwn driver kernel panic
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-wireless (Nobody)
URL:
Keywords: crash
Depends on:
Blocks: 277512 278175
  Show dependency treegraph
 
Reported: 2021-04-12 17:44 UTC by Nathaniel Barragan
Modified: 2024-04-04 21:13 UTC (History)
4 users (show)

See Also:


Attachments
Screenshot of backtrace (185.25 KB, image/jpeg)
2021-04-12 17:47 UTC, Nathaniel Barragan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nathaniel Barragan 2021-04-12 17:44:56 UTC
The iwn driver, after a few hours of use, will kernel panic with a page fault. It would seem that it occurs in iwn_rx_compressed_ba(). This is reproducable.

Steps to reproduce:
1. Connect to an AP (in my case it's using wpa_supplicant using WPA2 PSK)
2. Allow traffic to flow in and out of the interface (In this case, you can just ping an address, and to speed up the process, put a wait time of 0.1 is what I do to reproduce, but this happens during normal usage as well)
3. Wait for kernel panic.



Attached is a screenshot of the backtrace (please excuse the quality, I only had a phone camera available), and am available to help as needed, although response may take anywhere from instant to a few days. No longer than 3 days usually.
Comment 1 Nathaniel Barragan 2021-04-12 17:47:08 UTC
Created attachment 224058 [details]
Screenshot of backtrace
Comment 2 Nathaniel Barragan 2021-04-12 17:52:46 UTC
System Specs: Lenovo ThinkPad T61 with Intel PRO/Wireless 4965 AG
Comment 3 david 2021-04-12 17:55:09 UTC
Hmm...  I use an iwn(4) NIC on my laptop, on which I track head (and stable/12 and (since it was branches) stable/13) daily, performing source-based updates in-place.  And when clang/llvm gets rebuilt, it's running head solidly for quite a while....  I have no iwn-related panics at all in the last couple of years that I recall, and no panics recently.

Most recent:
FreeBSD g1-55.catwhisker.org 14.0-CURRENT FreeBSD 14.0-CURRENT #210 main-n246006-5e98cae661f3: Mon Apr 12 05:32:14 PDT 2021     root@g1-55.catwhisker.org:/common/S4/obj/usr/src/amd64.amd64/sys/CANARY  amd64 1400008 1400008

FreeBSD g1-55.catwhisker.org 13.0-STABLE FreeBSD 13.0-STABLE #205 stable/13-n245198-659d71186597: Mon Apr 12 05:53:14 PDT 2021     root@g1-55.catwhisker.org:/common/S3/obj/usr/src/amd64.amd64/sys/CANARY  amd64 1300500 1300500

FreeBSD g1-55.catwhisker.org 12.2-STABLE FreeBSD 12.2-STABLE #1005 stable/12-n232956-5fb6cfadcd9: Mon Apr 12 03:35:30 PDT 2021     root@g1-55.catwhisker.org:/common/S1/obj/usr/src/amd64.amd64/sys/CANARY  amd64 1202505 1202505

And:

iwn0@pci0:3:0:0:        class=0x028000 card=0x11218086 chip=0x422b8086 rev=0x35 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Centrino Ultimate-N 6300'
    class      = network

g1-55(12.2-S)[10] ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 3c:a9:f4:ba:87:c4
        inet 172.17.1.55 netmask 0xffff0000 broadcast 172.17.255.255
        groups: wlan
        ssid lmdhw-net channel 149 (5745 MHz 11a) bssid 04:18:d6:21:22:1f
        regdomain FCC country US authmode WPA2/802.11i privacy ON
        deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 23 bmiss 10
        mcastrate 6 mgmtrate 6 scanvalid 60 wme roaming MANUAL
        parent interface: iwn0
        media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11a
        status: associated
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


[while running stable/12]
Comment 4 Bjoern A. Zeeb freebsd_committer freebsd_triage 2021-04-12 18:27:49 UTC
(In reply to david from comment #3)

David is on 11a;  try setting mod to 11a and forget about 11n and s if the problem goes away.
Comment 5 Nathaniel Barragan 2021-04-12 19:48:26 UTC
I am also on 11a and I still have this issue.
Comment 6 Nathaniel Barragan 2022-02-22 01:30:38 UTC
I went back to FreeBSD and installed it again. I have not moved over to CURRENT yet, but I can say with confidence that this does not happen on STABLE.
Comment 7 Bjoern A. Zeeb freebsd_committer freebsd_triage 2022-02-22 08:25:47 UTC
(In reply to Nathaniel Barragan from comment #6)

There is very little difference between stable and current (make sure your kernel has the same debug options enabled maybe; I can never remember if they are enabled by default on a stable branch in GENERIC as well).

Should you move forward to CURRENT and try again let us know how it goes.
Comment 8 Graham Perrin freebsd_committer freebsd_triage 2022-10-16 07:00:39 UTC
(In reply to Bjoern A. Zeeb from comment #7)

> … difference between stable and current (… debug options … I can 
> never remember if they are enabled by default on a stable branch in 
> GENERIC as well). …

Key phrase, in main: 


# For full debugger support use (turn off in stable branch):


Most recently (12th August) for amd64, a main view of the 
twelve options that are _not always_ needed: 

<https://github.com/freebsd/freebsd-src/blob/6a70a0c8bfa6fe8a2739527e5c822aec985e83e9/sys/amd64/conf/GENERIC#L96-L108>


So, for example, in stable/13 for amd64 we see the 
two options, alone, that are _always_ needed: 

<https://github.com/freebsd/freebsd-src/blob/0ca1220443695c79849bf0807306d0864acbabb9/sys/amd64/conf/GENERIC#L92-L94>


options 	KDB			# Enable kernel debugger support.
options 	KDB_TRACE		# Print a stack trace for a panic.


HTH

Graham

=============
Notes to self
=============

After not easily finding a GitHub method to compare the same file in two branches, I took a hint from <https://stackoverflow.com/a/59315113/38108> for a web-based view of differences. Then, taking a hint from <https://juplo.de/compare-two-files-in-different-branches-with-git/>: 

git -C /usr/src diff remotes/origin/main:sys/amd64/conf/GENERIC remotes/origin/stable/13:sys/amd64/conf/GENERIC | less

Context (my configuration): 

% git -C /usr/src config --get remote.origin.url
https://github.com/grahamperrin/freebsd-src.git
% git -C /usr/src config --get remote.upstream.url
https://github.com/freebsd/freebsd-src.git
%