doh...I don't know why I didn't think of that...

Good news, with 'ifconfig iwn0 debug' set, once the strange behavior
starts, I see LOTS of repeated messages, the pattern happens about
once every 4 seconds, and dumps the following into /var/log/messages:

...
# continuous spamming of /var/log/messages from after the network has
been in the troubled/failed state for a while
Sep 10 09:00:06 e530c /bsd: iwn0: SCAN -> AUTH
Sep 10 09:00:06 e530c /bsd: iwn0: sending auth to 80:2a:a8:57:5e:17 on
channel 6 mode 11g
Sep 10 09:00:10 e530c /bsd: iwn0: AUTH -> SCAN
Sep 10 09:00:11 e530c /bsd: iwn0: end active scan
Sep 10 09:00:11 e530c /bsd: iwn0: - 00:0d:67:7d:a9:41    1  +173 54M
ess  privacy   rsn! "XFINITY"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 00:0d:67:7d:a9:42    1  +173 54M
ess       no!  rsn! "xfinitywifi"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 00:0d:67:7d:a9:43    1  +172 54M
ess       no!  rsn! "CableWiFi"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 00:0d:67:7d:a9:48    1  +175 54M
ess  privacy   rsn  ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 00:11:32:5f:d5:cb    9  +171 54M
ess  privacy   rsn  "CBArchitectural"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 00:1d:d4:3a:46:e0    1  +170 54M
ess  privacy   rsn  "HOME-46E2"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 08:86:3b:b6:2f:80    1  +177 54M
ess  privacy   rsn  "belkin.f80"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 10:86:8c:53:a7:84   11  +175 54M
ess  privacy   rsn  "Bentley"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 10:86:8c:77:cc:2c   11  +194 54M
ess  privacy   rsn  "Rivera-2.4"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 12:86:8c:53:a7:84   11  +172 54M
ess  privacy   rsn  ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 14:59:c0:69:7b:23    6  +182 54M
ess  privacy   rsn  "My WiFi"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 20:b0:01:40:f2:7c   11  +187 54M
ess  privacy   rsn  "CenturyLink3466"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 20:c9:d0:1a:88:91    1  +173 54M
ess  privacy   rsn  "Byron Bentley's N
etwork"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 22:86:8c:77:cc:2c   11  +191 54M
ess       no!  rsn! "xfinitywifi"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 24:de:c6:7e:1c:42    1  +172 54M
ess  privacy   rsn  "foss-vessel"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 24:de:c6:7e:1c:43    1  +174 54M
ess  privacy   rsn  "foss-guest"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 28:80:88:14:76:53   11  +172 54M
ess  privacy   rsn  "NETGEAR51"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 28:80:88:ec:b7:ba    1  +192 54M
ess  privacy   rsn  "Elephants1008_EXT
"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 32:86:8c:53:a7:84   11  +172 54M
ess  privacy   rsn  ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 32:86:8c:77:cc:2c   11  +190 54M
ess  privacy   rsn  ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 3c:7a:8a:9a:5a:d8   11  +171 54M
ess  privacy   rsn  "5ADA-2.4"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 40:b0:34:e1:fb:78    1  +174 54M
ess  privacy   rsn  "DIRECT-77-HP ENVY
 4520 series"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 4e:7a:8a:9a:5a:d8   11  +170 54M
ess       no!  rsn! "xfinitywifi"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 50:95:51:c7:c9:db   11  +173 54M
ess  privacy   rsn  "broadway-2.4"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 52:86:8c:53:a7:84   11  +172 54M
ess  privacy   rsn! ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 52:86:8c:77:cc:2c   11  +190 54M
ess  privacy   rsn! ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 60:38:e0:0e:be:02   11  +170 54M
ess  privacy   rsn  "Linksys02322"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 62:95:51:c7:c9:db   11  +170 54M
ess       no!  rsn! "xfinitywifi"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 70:e4:22:b5:1d:80    6  +172 54M
ess  privacy   rsn! 0x00!
Sep 10 09:00:11 e530c /bsd: iwn0: - 72:95:51:c7:c9:db   11  +172 54M
ess  privacy   rsn  ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 74:85:2a:e5:f4:c8    6  +182 54M
ess  privacy   rsn  "Idontknow"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 7e:85:2a:e5:f4:c8    6  +183 54M
ess       no!  rsn! "xfinitywifi"!
Sep 10 09:00:11 e530c /bsd: iwn0: + 80:2a:a8:57:5e:17    6  +201 54M
ess  privacy   rsn  "SV2"
Sep 10 09:00:11 e530c /bsd: iwn0: - 80:37:73:e0:a3:c4   11  +170 54M
ess  privacy   rsn  "DarneilleGraham-Back"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 82:2a:a8:57:5e:17    6  +203 54M
ess  privacy   rsn  ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 82:85:2a:e5:f4:c8    6  +182 54M
ess  privacy   rsn  ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 84:1b:5e:d8:fe:f0    7  +186 54M
ess  privacy   rsn  "Trevman"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 8a:85:2a:e5:f4:c8    6  +182 54M
ess  privacy   rsn! ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 8c:0f:6f:e7:84:18    1  +191 54M
ess  privacy   rsn  "Elephants1008"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 8c:0f:6f:eb:24:78   11  +201 54M
ess  privacy   rsn  "Cleveland-Bales Casa"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 90:c7:92:4f:28:80    1  +175 54M
ess  privacy   rsn  "HOME-2882"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 92:95:51:c7:c9:db   11  +172 54M
ess  privacy   rsn! ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 96:0f:6f:e7:84:18    1  +191 54M
ess       no!  rsn! "xfinitywifi"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 96:c7:92:4f:28:80    1  +172 54M
ess       no!  rsn! "xfinitywifi"!
Sep 10 09:00:11 e530c /bsd: iwn0: - 9a:0f:6f:e7:84:18    1  +192 54M
ess  privacy   rsn  ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 9a:0f:6f:eb:24:78   11  +200 54M
ess  privacy   rsn  ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - 9c:3d:cf:43:74:8a    8  +172 54M
ess  privacy   rsn  "NETGEAR18"!
Sep 10 09:00:11 e530c /bsd: iwn0: - a2:0f:6f:e7:84:18    1  +192 54M
ess  privacy   rsn! ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - a2:0f:6f:eb:24:78   11  +199 54M
ess  privacy   rsn! ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - a4:56:cc:cd:e6:89    1  +174 54M
ess  privacy   rsn  "No ID"!
Sep 10 09:00:11 e530c /bsd: iwn0: - a4:56:cc:cd:e6:8c    1  +172 54M
ess  privacy   rsn  ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - a4:56:cc:cd:e6:8d    1  +173 54M
ess  privacy   rsn! "OutOfService"!
Sep 10 09:00:11 e530c /bsd: iwn0: - a4:56:cc:cd:e6:8e    1  +174 54M
ess  privacy   rsn! ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - aa:93:5b:0c:9b:3d    6  +184 54M
ess       no!  rsn! "xfinitywifi"!
Sep 10 09:00:11 e530c /bsd: iwn0: - ae:93:5b:0c:9b:3d    6  +193 54M
ess  privacy   rsn  ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - b0:39:56:23:b4:6b    8  +172 54M
ess  privacy   rsn  "Meul"!
Sep 10 09:00:11 e530c /bsd: iwn0: - b0:93:5b:0c:9b:3d    6  +191 54M
ess  privacy   rsn  "2wernergals"!
Sep 10 09:00:11 e530c /bsd: iwn0: - b2:93:5b:0c:9b:3d    6  +191 54M
ess  privacy   rsn! "OutOfService"!
Sep 10 09:00:11 e530c /bsd: iwn0: - b6:93:5b:0c:9b:3d    6  +190 54M
ess  privacy   rsn! ""!
Sep 10 09:00:11 e530c /bsd: iwn0: - cc:40:d0:17:22:c3    1  +182 54M
ess  privacy   rsn  "Cleveland-Bales Casa 5_2GEXT"!
Sep 10 09:00:11 e530c /bsd: iwn0: - d8:97:ba:be:19:70    6  +170 54M
ess  privacy   rsn! "CUSPNet_2.4"!
Sep 10 09:00:11 e530c /bsd: iwn0: - e8:37:7a:be:c4:a7    1  +173 54M
ess  privacy   rsn  "CenturyLink3718"!
Sep 10 09:00:11 e530c /bsd: iwn0: SCAN -> AUTH
Sep 10 09:00:11 e530c /bsd: iwn0: sending auth to 80:2a:a8:57:5e:17 on
channel 6 mode 11g
Sep 10 09:00:15 e530c /bsd: iwn0: AUTH -> SCAN
Sep 10 09:00:16 e530c /bsd: iwn0: end active scan
...

This scan repeats about once every 4 seconds.

A few other data points (forgive me if this is obvious...I mostly
wanted to share my general thoughts on what I've look into):
* I wondered if this was triggered by dhcp lease renewal (iwn0 uses
IPv4 dhcp only, bad packet or something), but I have observed the iwn0
driver in the "troubled" state well before my current lease expires.
* timing seems odd : once the iwn0 stops working, it takes a while for
the "scan" log entries (above) to appear in /var/log/messages
(gathering specific data on this now, but it seems to be at least 10s
of minutes).
* I have verified there are no states in the firewall, other than
those marked "SINGLE:NO_TRAFFIC" from my machine attempting to query
DNS.
* During the repeated scans above, `tcpdump` reports no UDP traffic
for this iwn0.

tl;dr -
1.) I still don't know what's triggering this.
2.) When it's triggered, it takes a while to report anything in
/var/log/messages
3.) Once it does, iwn seems to be in a 4-5 second loop, continuously
scanning all APs.
4.) I'm able to reset the driver via "doas ifconfig iwn0 down; doas sh
/etc/netstart iwn0" and it all works again...for a while (see #1).

Thank you for reading this far.  Any other pointers/suggestions?  So
many opportunities to learn. :)

Bryan


On Mon, Sep 9, 2019 at 9:23 AM Stefan Sperling <s...@stsp.name> wrote:
>
> On Sun, Sep 08, 2019 at 08:31:55PM +0000, Bryan Stenson wrote:
> > Hi all -
> >
> > I'm writing to "misc" rather than "bugs" as I'm not yet sure this is a
> > bug.  I'm hoping to help triage this with assistance from this list.
> >
> > I'm running -CURRENT and the iwn(4) driver for my wireless card.  Over
> > the past year, this has been working great, but recently (within the
> > last month or so), I've had issues where the NIC just stops working
> > after a few hours of usage.  I don't have a solid steps for
> > reproduction.
> >
> > I realize "stops working" is not a very accurate account here...but
> > I'm confused on how to get more descriptive information of the
> > problem.  When it stops, "ifconfig" shows iwn0 with an IP address, but
> > I'm unable to ping.  Additionally, I'm not seeing any
> > warnings/messages in "dmesg" about the device...so I'm confused.
> >
> > A simple "ifconfig iwn0 down; sh /etc/netstart iwn0" seems to fix the
> > problem, but I haven't had to do that in the past...it just feels like
> > a recent change (iwn(4) work?) has put me in this state.
> >
> > I'm really wanting to help here.  How can I run the iwn(4) in debug
> > mode, or increase logging verbosity?  And/or, should I try to capture
> > packets via tcpdump?  And/or, can I run an older bsd.mp (without
> > having to downgrade packages to older versions) in order to try and
> > "bisect" where the problem may have been introduced?
>
> Please enable debugging with 'ifconfig iwn0 debug' and when the problem
> reoccurs check whether you can find any relevant information in the
> file /var/log/messages.

Reply via email to