On Mon, Mar 30, 2020 at 12:21:58PM BST, Stefan Sperling wrote:
> On Sun, Mar 29, 2020 at 01:15:37PM +0100, Raf Czlonka wrote:
> > >Synopsis: "splassert: ieee80211_free_node: want 7 have 4" followed by
> > >"zyd0: device timeout"
> > >Category: kernel
> > >Environment:
> > System : OpenBSD 6.6
> > Details : OpenBSD 6.6-current (GENERIC.MP) #86: Sat Mar 28 14:42:23
> > MDT 2020
> >
> > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> >
> > Architecture: OpenBSD.amd64
> > Machine : amd64
> > >Description:
> > After booting with a zyd(4) USB NIC, I see these lines
> > in dmesg(8):
> >
> > splassert: ieee80211_free_node: want 7 have 4
> >
> > Under a heavy-ish load (a web browser with multiple tabs
> > open + streaming video), the device times out:
> >
> > zyd0: device timeout
> > zyd0: could not transmit buffer: TIMEOUT
> >
> > and I can't reset it even with:
> >
> > # sh /etc/netstart zyd0
> >
> > A reboot is necessary.
>
Hi Stefan,
> Can you show 'ifconfig zyd0' when it is in this state?
> The interface is marked as OACTIVE, correct?
Correct.
zyd0: flags=808c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MULTICAST,AUTOCONF4>
mtu 1500
lladdr [...]
index 4 priority 4 llprio 3
groups: wlan egress
media: IEEE802.11 autoselect (OFDM54 mode 11g)
status: active
ieee80211: join mynet chan 6 bssid [...] -87dBm wpakey wpaprotos wpa2
wpaakms psk wpaciphers ccmp wpagroupcipher ccmp
inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
> What happens here if you run: ifconfig zyd0 down
> Instead of running netstart which does one hundred and one things?
>
D'oh! After thinking "/etc/netstart will surely reset it and get
it up and running again" I seem to forget the most basic of things!
After bringing it down, sometimes, I can simply bring it back up
again (with ifconfig zyd0 up), or unplug it without a panic when
it is still down. After plugging it back in, it usually starts
working again after a while (sometimes I have to "poke" it with
ifconfig down/up) and then I have to work even harder to make it
time out again ;^)
>
> > When I unplugged the NIC at that point, I got a panic:
> >
> > panic: Data modified on freelist: word 10 of object
> > 0xffff80000099a000 size 0x2000 previous type devbuf (0xdead410f !=
> > 0xdead4110)
> >
>
> This might prevent the panic (compile-tested only).
Haven't tested the diff yet - I'll let you know once I do.
Regards,
Raf
> diff 9d8a60ff1dae84d5c890bdc5040be018a3bdd3dc /usr/src
> blob - 61dc357bf69a56d1ce282d505eecd343b0eb2465
> file + sys/dev/usb/if_zyd.c
> --- sys/dev/usb/if_zyd.c
> +++ sys/dev/usb/if_zyd.c
> @@ -2216,6 +2216,7 @@ zyd_tx(struct zyd_softc *sc, struct mbuf *m, struct ie
> ZYD_TX_TIMEOUT, zyd_txeof);
> error = usbd_transfer(data->xfer);
> if (error != USBD_IN_PROGRESS && error != 0) {
> + data->ni = NULL;
> ifp->if_oerrors++;
> return EIO;
> }