Panic with wifi + usb in latest FreeBSD-current

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Panic with wifi + usb in latest FreeBSD-current

Warner Losh
I'm running current as of -2h ago.

When I plug in my rtwn0 device and it configures, etc, I get:

rtwn0 on uhub 0
rtwn0: <realtek 802.11n WLAN Adapter, class 0/0, rev 2.00/2.00, addr 4> on
usbus0
rtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R
<date> host dpa_supplicant[1619]: ioctl[SIOS80211, op=20, val=0,
arg_len=7]: Invalid argument
panic: sleepq_add: td <hex> to sleep on wchan <hex> with sleeping prohibited
cpuid = 5
time = 1600057358
KDB: stack backtrace:
...
panic()
sleepq_add()
_cv_wait()
usbd_do_request_flags
rtwn_do_request
rtwn_usb_read_4
rtwn_rx_common
rtwn_bulk_rx_callback
usbd_callback_wrapper
usb_command_wrapper
usb_callback_proc
usb_process
...

I've done a fresh installworld and installkernel, but am running packages
from late may since I've not updated them. I've updated the iichid and
drm-kmod ports and rebuilt them and reinstalled them as well (so I know
they aren't out of date).

Has anybody else seen this?

Warner
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Panic with wifi + usb in latest FreeBSD-current

Adrian Chadd-4
Yeah, this was also reported in #freebsd-wireless today.

Is there a lock being held in the rtwn path that shouldn't be?


-adrian



On Sun, 13 Sep 2020 at 21:30, Warner Losh <[hidden email]> wrote:

> I'm running current as of -2h ago.
>
> When I plug in my rtwn0 device and it configures, etc, I get:
>
> rtwn0 on uhub 0
> rtwn0: <realtek 802.11n WLAN Adapter, class 0/0, rev 2.00/2.00, addr 4> on
> usbus0
> rtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R
> <date> host dpa_supplicant[1619]: ioctl[SIOS80211, op=20, val=0,
> arg_len=7]: Invalid argument
> panic: sleepq_add: td <hex> to sleep on wchan <hex> with sleeping
> prohibited
> cpuid = 5
> time = 1600057358
> KDB: stack backtrace:
> ...
> panic()
> sleepq_add()
> _cv_wait()
> usbd_do_request_flags
> rtwn_do_request
> rtwn_usb_read_4
> rtwn_rx_common
> rtwn_bulk_rx_callback
> usbd_callback_wrapper
> usb_command_wrapper
> usb_callback_proc
> usb_process
> ...
>
> I've done a fresh installworld and installkernel, but am running packages
> from late may since I've not updated them. I've updated the iichid and
> drm-kmod ports and rebuilt them and reinstalled them as well (so I know
> they aren't out of date).
>
> Has anybody else seen this?
>
> Warner
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "[hidden email]"
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Panic with wifi + usb in latest FreeBSD-current

Warner Losh
On Sun, Sep 13, 2020, 11:29 PM Adrian Chadd <[hidden email]> wrote:

> Yeah, this was also reported in #freebsd-wireless today.
>
> Is there a lock being held in the rtwn path that shouldn't be?
>

I'll check in the morning... this was like the 20th thing to go wrong this
weekend,  so I copied the panic down, send the email and grabbed a beer and
turned it off...

Warner


> -adrian
>
>
>
> On Sun, 13 Sep 2020 at 21:30, Warner Losh <[hidden email]> wrote:
>
>> I'm running current as of -2h ago.
>>
>> When I plug in my rtwn0 device and it configures, etc, I get:
>>
>> rtwn0 on uhub 0
>> rtwn0: <realtek 802.11n WLAN Adapter, class 0/0, rev 2.00/2.00, addr 4> on
>> usbus0
>> rtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R
>> <date> host dpa_supplicant[1619]: ioctl[SIOS80211, op=20, val=0,
>> arg_len=7]: Invalid argument
>> panic: sleepq_add: td <hex> to sleep on wchan <hex> with sleeping
>> prohibited
>> cpuid = 5
>> time = 1600057358
>> KDB: stack backtrace:
>> ...
>> panic()
>> sleepq_add()
>> _cv_wait()
>> usbd_do_request_flags
>> rtwn_do_request
>> rtwn_usb_read_4
>> rtwn_rx_common
>> rtwn_bulk_rx_callback
>> usbd_callback_wrapper
>> usb_command_wrapper
>> usb_callback_proc
>> usb_process
>> ...
>>
>> I've done a fresh installworld and installkernel, but am running packages
>> from late may since I've not updated them. I've updated the iichid and
>> drm-kmod ports and rebuilt them and reinstalled them as well (so I know
>> they aren't out of date).
>>
>> Has anybody else seen this?
>>
>> Warner
>> _______________________________________________
>> [hidden email] mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-current
>> To unsubscribe, send any mail to "[hidden email]
>> "
>>
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Panic with wifi + usb in latest FreeBSD-current

Adrian Chadd-4
On Sun, 13 Sep 2020 at 22:34, Warner Losh <[hidden email]> wrote:

>
>
> On Sun, Sep 13, 2020, 11:29 PM Adrian Chadd <[hidden email]>
> wrote:
>
>> Yeah, this was also reported in #freebsd-wireless today.
>>
>> Is there a lock being held in the rtwn path that shouldn't be?
>>
>
> I'll check in the morning... this was like the 20th thing to go wrong this
> weekend,  so I copied the panic down, send the email and grabbed a beer and
> turned it off...
>

Ok. I checked the driver and the usb stack; nothing in the change lists
obviously stands out to me at 11pm on a Sunday.

Can you see if any locks are held? or an epoch? Something smells fishy.
(defining EPOCH_TRACE will dump the list of epochs, if I'm reading the
subr_sleepqueue.c code correctly.)

Ok, so, since I dug a bit more on a hunch, I bet the NET epoch is being
held - it's grabbed in rtwn_bulk_rx_callback, and rtwn_rx_common is reading
some registers as part of processing the receive queue. I bet that act of
reading registers over blocking USB is causing things to explode.

If it is net epoch then we're going to have to think of a better design
pattern here to migrate all of these here wifi drivers to, because I
guarantee you they're all behaving poorly in this newer world order.



Thanks,


-adrian




>
> panic: sleepq_add: td <hex> to sleep on wchan <hex> with sleeping
>>> prohibited
>>> cpuid = 5
>>> time = 1600057358
>>> KDB: stack backtrace:
>>> ...
>>> panic()
>>> sleepq_add()
>>> _cv_wait()
>>> usbd_do_request_flags
>>> rtwn_do_request
>>> rtwn_usb_read_4
>>> rtwn_rx_common
>>> rtwn_bulk_rx_callback
>>> usbd_callback_wrapper
>>> usb_command_wrapper
>>> usb_callback_proc
>>> usb_process
>>> ...
>>>
>>> I've done a fresh installworld and installkernel, but am running packages
>>> from late may since I've not updated them. I've updated the iichid and
>>> drm-kmod ports and rebuilt them and reinstalled them as well (so I know
>>> they aren't out of date).
>>>
>>> Has anybody else seen this?
>>>
>>> Warner
>>> _______________________________________________
>>> [hidden email] mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-current
>>> To unsubscribe, send any mail to "
>>> [hidden email]"
>>>
>>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Panic with wifi + usb in latest FreeBSD-current

Kevin Oberman-4
On Sun, Sep 13, 2020 at 11:31 PM Adrian Chadd <[hidden email]>
wrote:

> On Sun, 13 Sep 2020 at 22:34, Warner Losh <[hidden email]> wrote:
>
> >
> >
> > On Sun, Sep 13, 2020, 11:29 PM Adrian Chadd <[hidden email]>
> > wrote:
> >
> >> Yeah, this was also reported in #freebsd-wireless today.
> >>
> >> Is there a lock being held in the rtwn path that shouldn't be?
> >>
> >
> > I'll check in the morning... this was like the 20th thing to go wrong
> this
> > weekend,  so I copied the panic down, send the email and grabbed a beer
> and
> > turned it off...
> >
>
> Ok. I checked the driver and the usb stack; nothing in the change lists
> obviously stands out to me at 11pm on a Sunday.
>
> Can you see if any locks are held? or an epoch? Something smells fishy.
> (defining EPOCH_TRACE will dump the list of epochs, if I'm reading the
> subr_sleepqueue.c code correctly.)
>
> Ok, so, since I dug a bit more on a hunch, I bet the NET epoch is being
> held - it's grabbed in rtwn_bulk_rx_callback, and rtwn_rx_common is reading
> some registers as part of processing the receive queue. I bet that act of
> reading registers over blocking USB is causing things to explode.
>
> If it is net epoch then we're going to have to think of a better design
> pattern here to migrate all of these here wifi drivers to, because I
> guarantee you they're all behaving poorly in this newer world order.
>
>
>
> Thanks,
>
>
> -adrian
>
While I have not seen panics, performance of my rtwn has simply cratered.
Trying to move files to my new laptop, which has an rtwn, it crawls at
about 1.5 Mbps. Before I built an updated kernel, I was seeing 60M. Of
course, this is complicated by the continual kernel lockups I keep getting,
so I really didn't think much about it until I saw Warner's note.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: [hidden email]
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Panic with wifi + usb in latest FreeBSD-current

Kevin Oberman-4
Small correction... My rtwn is running at 1 MB, not Mb. I have two tools
watching the network, one does bits and the other bytes. Still,
performance is really bad. Can't say whether it's the driver or something
else, but I'll be gathering data as I can between reboots of my current
system.

Sorry for the bogus information.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: [hidden email]
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683


On Mon, Sep 14, 2020 at 9:52 AM Kevin Oberman <[hidden email]> wrote:

> On Sun, Sep 13, 2020 at 11:31 PM Adrian Chadd <[hidden email]>
> wrote:
>
>> On Sun, 13 Sep 2020 at 22:34, Warner Losh <[hidden email]> wrote:
>>
>> >
>> >
>> > On Sun, Sep 13, 2020, 11:29 PM Adrian Chadd <[hidden email]>
>> > wrote:
>> >
>> >> Yeah, this was also reported in #freebsd-wireless today.
>> >>
>> >> Is there a lock being held in the rtwn path that shouldn't be?
>> >>
>> >
>> > I'll check in the morning... this was like the 20th thing to go wrong
>> this
>> > weekend,  so I copied the panic down, send the email and grabbed a beer
>> and
>> > turned it off...
>> >
>>
>> Ok. I checked the driver and the usb stack; nothing in the change lists
>> obviously stands out to me at 11pm on a Sunday.
>>
>> Can you see if any locks are held? or an epoch? Something smells fishy.
>> (defining EPOCH_TRACE will dump the list of epochs, if I'm reading the
>> subr_sleepqueue.c code correctly.)
>>
>> Ok, so, since I dug a bit more on a hunch, I bet the NET epoch is being
>> held - it's grabbed in rtwn_bulk_rx_callback, and rtwn_rx_common is
>> reading
>> some registers as part of processing the receive queue. I bet that act of
>> reading registers over blocking USB is causing things to explode.
>>
>> If it is net epoch then we're going to have to think of a better design
>> pattern here to migrate all of these here wifi drivers to, because I
>> guarantee you they're all behaving poorly in this newer world order.
>>
>>
>>
>> Thanks,
>>
>>
>> -adrian
>>
> While I have not seen panics, performance of my rtwn has simply cratered.
> Trying to move files to my new laptop, which has an rtwn, it crawls at
> about 1.5 Mbps. Before I built an updated kernel, I was seeing 60M. Of
> course, this is complicated by the continual kernel lockups I keep getting,
> so I really didn't think much about it until I saw Warner's note.
> --
> Kevin Oberman, Part time kid herder and retired Network Engineer
> E-mail: [hidden email]
> PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
>
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Panic with wifi + usb in latest FreeBSD-current

grahamperrin
In reply to this post by Adrian Chadd-4
On 14/09/2020 06:29, Adrian Chadd wrote:
> Yeah, this was also reported in #freebsd-wireless today.

FWIW <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249326#c2>
through bisection, recent r365488 is identified as panicking with vboxdrv

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"