[Bug 267575] [rtwn] network goes down on git clones over ssh

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 05 Nov 2022 16:43:10 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267575

            Bug ID: 267575
           Summary: [rtwn] network goes down on git clones over ssh
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: wireless
          Assignee: wireless@FreeBSD.org
          Reporter: novel@FreeBSD.org

My setup:

USB wifi adapter:

From usbconfig:
ugen0.2: <Realtek 802.11ac WLAN Adapter> at usbus0, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=ON (500mA)

From dmesg:
rtwn0: <802.11ac WLAN Adapter > on usbus0
rtwn0: MAC/BB RTL8821AU, RF 6052 1T1R

In rc.conf I have:

wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA DHCP"


/etc/wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1

network={
  ssid="ssid"
  psk="pass"
}

FreeBSD tulp 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n258661-713efe054297:
Tue Oct 18 20:30:57 CEST 2022    
root@tulp:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

ifconfig wlan0:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=200001<RXCSUM,RXCSUM_IPV6>
        ether 34:98:b5:93:b1:3e
        inet 192.168.178.111 netmask 0xffffff00 broadcast 192.168.178.255
        groups: wlan
        ssid "ssid" channel 44 (5220 MHz 11a ht/20) bssid ac:f8:cc:ea:83:3a
        regdomain FCC country US authmode WPA2/802.11i privacy ON
        deftxkey UNDEF AES-CCM 2:128-bit txpower 17 bmiss 7 mcastrate 6
        mgmtrate 6 scanvalid 60 ht20 ampdulimit 64k ampdudensity 4 shortgi
        -stbc ldpctx -ldpcrx -uapsd wme roaming MANUAL
        parent interface: rtwn0
        media: IEEE 802.11 Wireless Ethernet MCS mode 11na
        status: associated
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


Steps to reproduce:

1. In terminal, run 8.8.8.8 to easily check connectivity
2. In the other terminal, run "git clone
git@github.com:freebsd/freebsd-src.git"
3. Almost immediately after that network goes down

64 bytes from 8.8.8.8: icmp_seq=211 ttl=117 time=15.179 ms
ping: sendto: Network is down                             
ping: sendto: Network is down                             
ping: sendto: Network is down                              
ping: sendto: Network is down                             
ping: sendto: Network is down                              
ping: sendto: Network is down

In /var/log/messages:
Nov  5 10:51:54 tulp wpa_supplicant[3443]: wlan0: CTRL-EVENT-DISCONNECTED
bssid=06:a0:30:d9:c7:f3 reason=3 locally_generated=1
Nov  5 10:51:54 tulp kernel: rtwn0: device timeout
Nov  5 10:51:54 tulp kernel: wlan0: link state changed to DOWN
Nov  5 10:51:54 tulp kernel: rtwn0: ieee80211_crypto_encap returns NULL.

4. When I terminate git clone, the network might go up again, or I might need
to do service netif restart to get it back

I have other devices connected to this network and didn't experience issues
like that, though I didn't specifically run git clone on them.
I've tried changing MTU to 1400 just for testing, and it didn't have any
effect.

Another observation:
This doesn't happen when cloning via https, i.e. "git clone
https://gitlab.com/FreeBSD/freebsd-src.git"

-- 
You are receiving this mail because:
You are the assignee for the bug.