Date: Sun, 13 Sep 2020 23:30:37 -0700 From: Adrian Chadd <adrian.chadd@gmail.com> To: Warner Losh <imp@bsdimp.com> Cc: FreeBSD Current <freebsd-current@freebsd.org>, Hans Petter Selasky <hps@selasky.org>, "Bjoern A. Zeeb" <bz@freebsd.org> Subject: Re: Panic with wifi + usb in latest FreeBSD-current Message-ID: <CAJ-Vmomxj1uuy2%2Btq2ZGguKY7F1LPV%2BMKqZmKU3iE39LR_XBRw@mail.gmail.com> In-Reply-To: <CANCZdfp9KKFmoO2EcOkCK4ZYeoFpeHODDtaBhZYQG1_88%2Brjmg@mail.gmail.com> References: <CANCZdfpd9DzW_gpBuQ9vVuxZ47ivCYmSjLnea3wkk_2bQ2QVBQ@mail.gmail.com> <CAJ-VmompP1FHNsn6n-68RPLrJ_7bAqdQZF8AGBZ9oyaKD8-=Dg@mail.gmail.com> <CANCZdfp9KKFmoO2EcOkCK4ZYeoFpeHODDtaBhZYQG1_88%2Brjmg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 13 Sep 2020 at 22:34, Warner Losh <imp@bsdimp.com> wrote: > > > On Sun, Sep 13, 2020, 11:29 PM Adrian Chadd <adrian.chadd@gmail.com> > 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 >>> _______________________________________________ >>> freebsd-current@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-current >>> To unsubscribe, send any mail to " >>> freebsd-current-unsubscribe@freebsd.org" >>> >>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmomxj1uuy2%2Btq2ZGguKY7F1LPV%2BMKqZmKU3iE39LR_XBRw>