Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-09-26 Thread Tom Murphy
Hi Martin, On Wed, Sep 19, 2018 at 10:36:41AM -0300, Martin Pieuchot wrote: > At that moment you don't need to plug back the phone. The ugen(4) > driver has a flawed logic where it waits 1min for all the transfers > to finish. So just wait until you see: > > usb_detach_wait: ugen1 didn't detach

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-09-19 Thread Martin Pieuchot
Hello Tom, On 12/09/18(Wed) 18:58, Tom Murphy wrote: > On Wed, Sep 12, 2018 at 12:55:01PM -0300, Martin Pieuchot wrote: > > On 08/09/18(Sat) 12:07, Tom Murphy wrote: > > > On Thu, Sep 06, 2018 at 01:06:50PM -0300, Martin Pieuchot wrote: > > > > Tom, as I said previously you've found a race in the

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-09-12 Thread Tom Murphy
On Wed, Sep 12, 2018 at 12:55:01PM -0300, Martin Pieuchot wrote: > Hello Tom, > > On 08/09/18(Sat) 12:07, Tom Murphy wrote: > > On Thu, Sep 06, 2018 at 01:06:50PM -0300, Martin Pieuchot wrote: > > > Tom, as I said previously you've found a race in the ugen(4) driver. > > > > > > That's the sympto

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-09-12 Thread Martin Pieuchot
Hello Tom, On 08/09/18(Sat) 12:07, Tom Murphy wrote: > On Thu, Sep 06, 2018 at 01:06:50PM -0300, Martin Pieuchot wrote: > > Tom, as I said previously you've found a race in the ugen(4) driver. > > > > That's the symptom: > > > > > [...] > > > usb_detach_wait: ugen1 didn't detach > > > > To be a

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-09-08 Thread Tom Murphy
Hi Martin, On Thu, Sep 06, 2018 at 01:06:50PM -0300, Martin Pieuchot wrote: > Tom, as I said previously you've found a race in the ugen(4) driver. > > That's the symptom: > > > [...] > > usb_detach_wait: ugen1 didn't detach > > To be able to understand which race we are chasing, could you rebui

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-09-06 Thread Martin Pieuchot
On 05/09/18(Wed) 21:32, Tom Murphy wrote: > Hi Martin, Tom, as I said previously you've found a race in the ugen(4) driver. That's the symptom: > [...] > usb_detach_wait: ugen1 didn't detach To be able to understand which race we are chasing, could you rebuild a kernel with UGEN_DEBUG defined a

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-09-05 Thread Tom Murphy
Hi Martin, On Wed, Sep 05, 2018 at 11:19:56AM -0300, Martin Pieuchot wrote: > On 05/09/18(Wed) 09:51, Tom Murphy wrote: > > [...] > > I physically unplug the phone and the kernel starts generating the xhci0: > > timeout aborting transfer messages in a loop. > > Aah! So the messages appear *aft

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-09-05 Thread Martin Pieuchot
On 05/09/18(Wed) 09:51, Tom Murphy wrote: > [...] > I physically unplug the phone and the kernel starts generating the xhci0: > timeout aborting transfer messages in a loop. Aah! So the messages appear *after* you unplugged the device. That makes sense. Does the diff below help? I just commi

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-09-05 Thread Tom Murphy
On Tue, Sep 04, 2018 at 03:24:19PM -0300, Martin Pieuchot wrote: > On 31/08/18(Fri) 09:19, Tom Murphy wrote: > > [...] > > Here's the dmesg from a XHCI_DEBUG kernel before it crashes (it appears > > to loop quite a few times before the kernel protection fault kicks in.) > > You're now hitting a b

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-09-04 Thread Martin Pieuchot
On 31/08/18(Fri) 09:19, Tom Murphy wrote: > [...] > Here's the dmesg from a XHCI_DEBUG kernel before it crashes (it appears > to loop quite a few times before the kernel protection fault kicks in.) You're now hitting a bug a ugen(4). Because you're detaching a device while ugen_do_read() is slee

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-31 Thread Tom Murphy
Hi Martin, On Thu, Aug 30, 2018 at 03:38:25PM -0300, Martin Pieuchot wrote: > On 30/08/18(Thu) 18:15, Tom Murphy wrote: > > On Thu, Aug 30, 2018 at 10:30:04AM -0300, Martin Pieuchot wrote: > > > On 30/08/18(Thu) 14:00, Tom Murphy wrote: > > > > On Wed, Aug 29, 2018 at 10:44:51AM -0300, Martin Pieu

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-30 Thread Martin Pieuchot
On 30/08/18(Thu) 18:15, Tom Murphy wrote: > On Thu, Aug 30, 2018 at 10:30:04AM -0300, Martin Pieuchot wrote: > > On 30/08/18(Thu) 14:00, Tom Murphy wrote: > > > On Wed, Aug 29, 2018 at 10:44:51AM -0300, Martin Pieuchot wrote: > > > > On 28/08/18(Tue) 22:22, Tom Murphy wrote: > > > > > On Tue, Aug 2

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-30 Thread Tom Murphy
On Thu, Aug 30, 2018 at 10:30:04AM -0300, Martin Pieuchot wrote: > On 30/08/18(Thu) 14:00, Tom Murphy wrote: > > Hi Martin, > > > > On Wed, Aug 29, 2018 at 10:44:51AM -0300, Martin Pieuchot wrote: > > > On 28/08/18(Tue) 22:22, Tom Murphy wrote: > > > > On Tue, Aug 28, 2018 at 04:20:41PM -0300, Mar

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-30 Thread Martin Pieuchot
On 30/08/18(Thu) 14:00, Tom Murphy wrote: > Hi Martin, > > On Wed, Aug 29, 2018 at 10:44:51AM -0300, Martin Pieuchot wrote: > > On 28/08/18(Tue) 22:22, Tom Murphy wrote: > > > On Tue, Aug 28, 2018 at 04:20:41PM -0300, Martin Pieuchot wrote: > > > > Hello Tom, > > > > > > > > On 28/08/18(Tue) 11:1

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-30 Thread Tom Murphy
Hi Martin, On Wed, Aug 29, 2018 at 10:44:51AM -0300, Martin Pieuchot wrote: > On 28/08/18(Tue) 22:22, Tom Murphy wrote: > > On Tue, Aug 28, 2018 at 04:20:41PM -0300, Martin Pieuchot wrote: > > > Hello Tom, > > > > > > On 28/08/18(Tue) 11:10, Tom Murphy wrote: > > > > On Tue, Aug 28, 2018 at 02:49

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-29 Thread Martin Pieuchot
On 28/08/18(Tue) 22:22, Tom Murphy wrote: > On Tue, Aug 28, 2018 at 04:20:41PM -0300, Martin Pieuchot wrote: > > Hello Tom, > > > > On 28/08/18(Tue) 11:10, Tom Murphy wrote: > > > On Tue, Aug 28, 2018 at 02:49:38PM +0900, Bryan Linton wrote: > > > > On 2018-08-25 21:40:57, Tom Murphy wrote: > > >

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-28 Thread Tom Murphy
On Tue, Aug 28, 2018 at 04:20:41PM -0300, Martin Pieuchot wrote: > Hello Tom, > > On 28/08/18(Tue) 11:10, Tom Murphy wrote: > > On Tue, Aug 28, 2018 at 02:49:38PM +0900, Bryan Linton wrote: > > > On 2018-08-25 21:40:57, Tom Murphy wrote: > > > > On Thu, Aug 23, 2018 at 08:45:54PM +0900, Tom Murph

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-28 Thread Tom Murphy
Hi Martin, On Tue, Aug 28, 2018 at 04:20:41PM -0300, Martin Pieuchot wrote: > Hello Tom, > > On 28/08/18(Tue) 11:10, Tom Murphy wrote: > > On Tue, Aug 28, 2018 at 02:49:38PM +0900, Bryan Linton wrote: > > > On 2018-08-25 21:40:57, Tom Murphy wrote: > > > > On Thu, Aug 23, 2018 at 08:45:54PM +090

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-28 Thread Martin Pieuchot
Hello Tom, On 28/08/18(Tue) 11:10, Tom Murphy wrote: > On Tue, Aug 28, 2018 at 02:49:38PM +0900, Bryan Linton wrote: > > On 2018-08-25 21:40:57, Tom Murphy wrote: > > > On Thu, Aug 23, 2018 at 08:45:54PM +0900, Tom Murphy wrote: > > > > I've narrowed it down. > > > > > > > >Last kernel where ad

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-28 Thread Tom Murphy
On Tue, Aug 28, 2018 at 02:49:38PM +0900, Bryan Linton wrote: > [CCing visa@ in] > > On 2018-08-25 21:40:57, Tom Murphy wrote: > > On Thu, Aug 23, 2018 at 08:45:54PM +0900, Tom Murphy wrote: > > > I've narrowed it down. > > > > > >Last kernel where adb works: June 24 09:59:46 MDT 2018 > > >1st

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-27 Thread Bryan Linton
[CCing visa@ in] On 2018-08-25 21:40:57, Tom Murphy wrote: > On Thu, Aug 23, 2018 at 08:45:54PM +0900, Tom Murphy wrote: > > I've narrowed it down. > > > >Last kernel where adb works: June 24 09:59:46 MDT 2018 > >1st Kernel where adb panics: June 25 13:10:32 MDT 2018 > > > > [...] > > > > I'

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-25 Thread Tom Murphy
On Thu, Aug 23, 2018 at 08:45:54PM +0900, Tom Murphy wrote: > I've narrowed it down. > >Last kernel where adb works: June 24 09:59:46 MDT 2018 >1st Kernel where adb panics: June 25 13:10:32 MDT 2018 > > I did notice when my phone's booted into LineageOS and I have ADB >turned on, when I connec

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-25 Thread Tom Murphy
On Thu, Aug 23, 2018 at 08:45:54PM +0900, Bryan Linton wrote: > So I found some time to try to bisect this, but was hampered by my > phone being somewhat temperamental. > > Everything up to July 3rd was fine. No crashes occurred. > > On a July 15th checkout, my system panicked when trying to run

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-23 Thread Tom Murphy
On Thu, Aug 23, 2018 at 08:45:54PM +0900, Bryan Linton wrote: > On 2018-08-21 17:00:50, Bryan Linton wrote: > > On 2018-08-18 23:02:24, Tom Murphy wrote: > > > >Synopsis:Kernel panic in xhci.c when Android phone with ADB > > > > > > [...] > > > > > > >How-To-Repeat: > > > I can reproduc

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-23 Thread Bryan Linton
On 2018-08-21 17:00:50, Bryan Linton wrote: > On 2018-08-18 23:02:24, Tom Murphy wrote: > > >Synopsis: Kernel panic in xhci.c when Android phone with ADB > > > > [...] > > > > >How-To-Repeat: > > I can reproduce this every time just by enabling ADB on the > > phone and connecting it to the O

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-21 Thread Bryan Linton
On 2018-08-18 23:02:24, Tom Murphy wrote: > >Synopsis:Kernel panic in xhci.c when Android phone with ADB > > [...] > > >How-To-Repeat: > I can reproduce this every time just by enabling ADB on the > phone and connecting it to the OpenBSD machine. > I've been seeing the same panics for

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-20 Thread Tom Murphy
Hi, I managed to get XHCI_DEBUG working. Here are the messages and I connect the Android device: xhci0: xhci_cmd_configure_ep dev 1 xhci0: xhci_cmd_slot_control xhci0: port=7 change=0x80 xhci0: port=7 change=0x80 xhci0: xhci_cmd_slot_control xhci0: dev 6, input=0xff00687b9000 slot=0xff

Re: Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-18 Thread Tom Murphy
Hi, I would like to amend the above bug report. When reproducing I originally said it could be reproduced when the Android device was just plugged in. After going over my notes, and doing more testing, I found it only occurs when 'adb start-server' is running AND the device is plugged in via

Plugging in ADB-enabled Android device makes kernel panic with xhci

2018-08-18 Thread Tom Murphy
>Synopsis: Kernel panic in xhci.c when Android phone with ADB > connected >Category: kernel >Environment: System : OpenBSD 6.4 Details : OpenBSD 6.4-beta (GENERIC.MP) #224: Fri Aug 17 23:42:30 MDT 2018 dera...@amd64.openbsd