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 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:38PM +0900, Bryan Linton wrote:
> > > > > > > > > On 2018-08-25 21:40:57, Tom Murphy <[email protected]> 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
> > > > > > > 
> > > > > > > The real problem is in the xhci(4) driver.  When a command with a
> > > > > > > timeout is submitted we should ensure no other command is enqueued
> > > > > > > before continuing.  Sadly the driver did not include any mechanism
> > > > > > > to serialize command submissions.  Diff below does that and should
> > > > > > > fix your problem.
> > > > > > > 
> > > > > > > Can you try it on top of -current?  Make sure you have no diff
> > > > > > > reverted.
> > > > > > 
> > > > > > Hi,
> > > > > > 
> > > > > >   I think I spoke a little too soon. I found a case where it
> > > > > > started printing xhci0: command timeout over and over until
> > > > > > eventually the kernel panics with a protection fault. I couldn't
> > > > > > catch the backtrace properly, but it looked around the same area
> > > > > > as this original bug report.
> > > > > 
> > > > > Without backtrace I can't make progress.
> > > > 
> > > > Apologies for the delay. Just found time to reproduce this. Here's
> > > > a backtrace:
> > > 
> > > Almost, can you send the full dmesg with the backtrace at the end?
> > 
> > Hi, Sorry, here's the dmesg with the backtrace.
> 
> Is it the live dmesg?  I don't see any 'xhci0: command timeout'.  Btw
> this message doesn't exist so I can't understand which code path is
> triggering the problem.  Could you build a kernel with XHCI_DEBUG
> enabled, reproduce the page fault and send the dmesg (at least the last
> 10 lines before crashing) + the trace?

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.)

xhci0: timeout aborting transfer
xhci_abort_xfer: xfer=0xffffff047d8afe10 status=IN_PROGRESS err=CANCELLED 
actlen=0 len=24 idx=0
xhci0: xhci_cmd_stop_ep dev 3 dci 3
xhci0: event error code=19, result=33
trb=0xffff800031d7bc58 (0x00000000684400b0 0x13000000 0x3008401<CYCLE>)
xhci0: error stopping endpoint
xhci0: xhci_cmd_set_tr_deq_async dev 3 dci 3
xhci0: timeout aborting transfer
xhci_abort_xfer: xfer=0xffffff047d8afe10 status=IN_PROGRESS err=CANCELLED 
actlen=0 len=24 idx=0
xhci0: xhci_cmd_stop_ep dev 3 dci 3
xhci0: event error code=19, result=33
trb=0xffff800031d7bc58 (0x00000000684400d0 0x13000000 0x3008401<CYCLE>)
xhci0: error stopping endpoint
xhci0: xhci_cmd_set_tr_deq_async dev 3 dci 3
xhci0: timeout aborting transfer
xhci_abort_xfer: xfer=0xffffff047d8afe10 status=IN_PROGRESS err=CANCELLED 
actlen=0 len=24 idx=0
xhci0: xhci_cmd_stop_ep dev 3 dci 3
xhci0: event error code=19, result=33
trb=0xffff800031d7bc58 (0x0000000068440000 0x13000000 0x3008401<CYCLE>)
xhci0: error stopping endpoint
xhci0: xhci_cmd_set_tr_deq_async dev 3 dci 3
xhci0: timeout aborting transfer
xhci_abort_xfer: xfer=0xffffff047d8afe10 status=IN_PROGRESS err=CANCELLED 
actlen=0 len=24 idx=0
xhci0: xhci_cmd_stop_ep dev 3 dci 3
xhci0: event error code=19, result=33
trb=0xffff800031d7bc58 (0x0000000068440020 0x13000000 0x3008401<CYCLE>)
xhci0: error stopping endpoint
xhci0: xhci_cmd_set_tr_deq_async dev 3 dci 3
xhci0: timeout aborting transfer
xhci_abort_xfer: xfer=0xffffff047d8afe10 status=IN_PROGRESS err=CANCELLED 
actlen=0 len=24 idx=0
xhci0: xhci_cmd_stop_ep dev 3 dci 3
xhci0: event error code=19, result=33
trb=0xffff800031d7bc58 (0x0000000068440040 0x13000000 0x3008401<CYCLE>)
xhci0: error stopping endpoint
xhci0: xhci_cmd_set_tr_deq_async dev 3 dci 3
xhci0: timeout aborting transfer
xhci_abort_xfer: xfer=0xffffff047d8afe10 status=IN_PROGRESS err=CANCELLED 
actlen=0 len=24 idx=0
xhci0: xhci_cmd_stop_ep dev 3 dci 3
xhci0: event error code=19, result=33
trb=0xffff800031d7bc58 (0x0000000068440060 0x13000000 0x3008401<CYCLE>)
xhci0: error stopping endpoint
xhci0: xhci_cmd_set_tr_deq_async dev 3 dci 3


Full dmesg boot output:

OpenBSD 6.4-beta (CUSTOM) #0: Fri Aug 31 08:20:38 BST 2018
    [email protected]:/usr/src/sys/arch/amd64/compile/CUSTOM
real mem = 17040445440 (16251MB)
avail mem = 16514748416 (15749MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x7b288000 (41 entries)
bios0: vendor American Megatrends Inc. version "1.05.07" date 09/29/2017
bios0: PC Specialist LTD N13xWU
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT MCFG SSDT SSDT HPET UEFI SSDT SSDT SSDT 
DBGP DBG2 DMAR BGRT ASF! WSMT
acpi0: wakeup devices PXSX(S4) RP17(S4) PXSX(S4) RP18(S4) PXSX(S4) RP19(S4) 
PXSX(S4) RP20(S4) PXSX(S4) RP21(S4) PXSX(S4) RP22(S4) PXSX(S4) RP23(S4) 
PXSX(S4) RP24(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.76 MHz, 06-8e-0a
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.07 MHz, 06-8e-0a
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.07 MHz, 06-8e-0a
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.07 MHz, 06-8e-0a
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
cpu4 at mainbus0: apid 1 (application processor)
cpu4: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.06 MHz, 06-8e-0a
cpu4: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu4: 256KB 64b/line 8-way L2 cache
cpu4: smt 1, core 0, package 0
cpu5 at mainbus0: apid 3 (application processor)
cpu5: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.06 MHz, 06-8e-0a
cpu5: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu5: 256KB 64b/line 8-way L2 cache
cpu5: smt 1, core 1, package 0
cpu6 at mainbus0: apid 5 (application processor)
cpu6: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.06 MHz, 06-8e-0a
cpu6: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu6: 256KB 64b/line 8-way L2 cache
cpu6: smt 1, core 2, package 0
cpu7 at mainbus0: apid 7 (application processor)
cpu7: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.06 MHz, 06-8e-0a
cpu7: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu7: 256KB 64b/line 8-way L2 cache
cpu7: smt 1, core 3, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 23999999 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus -1 (RP17)
acpiprt5 at acpi0: bus -1 (RP18)
acpiprt6 at acpi0: bus -1 (RP19)
acpiprt7 at acpi0: bus -1 (RP20)
acpiprt8 at acpi0: bus -1 (RP21)
acpiprt9 at acpi0: bus -1 (RP22)
acpiprt10 at acpi0: bus -1 (RP23)
acpiprt11 at acpi0: bus -1 (RP24)
acpiprt12 at acpi0: bus 1 (RP01)
acpiprt13 at acpi0: bus -1 (RP02)
acpiprt14 at acpi0: bus -1 (RP03)
acpiprt15 at acpi0: bus -1 (RP04)
acpiprt16 at acpi0: bus 58 (RP05)
acpiprt17 at acpi0: bus 59 (RP06)
acpiprt18 at acpi0: bus -1 (RP07)
acpiprt19 at acpi0: bus -1 (RP08)
acpiprt20 at acpi0: bus -1 (RP09)
acpiprt21 at acpi0: bus -1 (RP10)
acpiprt22 at acpi0: bus -1 (RP11)
acpiprt23 at acpi0: bus -1 (RP12)
acpiprt24 at acpi0: bus -1 (RP13)
acpiprt25 at acpi0: bus -1 (RP14)
acpiprt26 at acpi0: bus -1 (RP15)
acpiprt27 at acpi0: bus -1 (RP16)
acpiec0 at acpi0
acpicpu0 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu4 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu5 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu6 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu7 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpitz0 at acpi0: critical temperature is 120 degC
acpicmos0 at acpi0
"PNP0C14" at acpi0 not configured
"INT33A1" at acpi0 not configured
"PNPC000" at acpi0 not configured
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: LID0
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "BAT" serial 0001 type LION oem "Notebook"
"PNP0C14" at acpi0 not configured
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: LCD0
cpu0: Enhanced SpeedStep 1696 MHz: speeds: 2001, 2000, 1900, 1800, 1700, 1500, 
1400, 1300, 1200, 1100, 1000, 800, 700, 600, 500, 400 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 8G Host" rev 0x08
inteldrm0 at pci0 dev 2 function 0 "Intel UHD Graphics 620" rev 0x07
drm0 at inteldrm0
inteldrm0: msi
error: [drm:pid0:i915_firmware_load_error_print] *ERROR* failed to load 
firmware i915/kbl_dmc_ver1.bin (-22)
inteldrm0: 1920x1080, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" rev 0x21: msi, xHCI 1.0
xhci0: CAPLENGTH=0x80
xhci0: DOORBELL=0x3000
xhci0: RUNTIME=0x2000
xhci0: 32 bytes context
xhci0: supported page size 0x00000001
xhci0: 18 ports and 64 slots
xhci0: 34 scratch pages, ETE=0, IST=0x4
xhci0: USB3PRM / USB3.0 configurable ports: 0x00000000
xhci0: USB3_PSSEN / Enabled USB3.0 ports under xHCI: 0x00000000
xhci0: XUSB2PRM / USB2.0 ports can switch from EHCI to xHCI:0x00000000
xhci0: XUSB2PR / USB2.0 ports under xHCI: 0x00000000
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 
addr 1
xhci0: DCBAAP=00x6843f000
xhci0: CRCR=00 (0000000068440000)
xhci0: ERSTBA=00x6842a000
xhci0: ERDP=00x68441000
xhci0: USBCMD=0x5
xhci0: IMAN=0x2
pchtemp0 at pci0 dev 20 function 2 "Intel 100 Series Thermal" rev 0x21
"Intel 100 Series MEI" rev 0x21 at pci0 dev 22 function 0 not configured
ahci0 at pci0 dev 23 function 0 "Intel 100 Series AHCI" rev 0x21: msi, AHCI 
1.3.1
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WDS500G2B0A-, X611> SCSI3 0/direct 
fixed naa.5001b448b66ac709
sd0: 476940MB, 512 bytes/sector, 976773168 sectors, thin
ppb0 at pci0 dev 28 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 4 "Intel 100 Series PCIE" rev 0xf1: msi
pci2 at ppb1 bus 58
rtsx0 at pci2 dev 0 function 0 "Realtek RTL8411B Card Reader" rev 0x01: msi
sdmmc0 at rtsx0: 4-bit, dma
re0 at pci2 dev 0 function 1 "Realtek 8168" rev 0x12: RTL8411B (0x5c80), msi, 
address 80:fa:5b:4f:5b:fb
rgephy0 at re0 phy 7: RTL8251 PHY, rev. 0
ppb2 at pci0 dev 28 function 5 "Intel 100 Series PCIE" rev 0xf1: msi
pci3 at ppb2 bus 59
iwm0 at pci3 dev 0 function 0 "Intel Dual Band Wireless-AC 8265" rev 0x78, msi
pcib0 at pci0 dev 31 function 0 "Intel 200 Series LPC" rev 0x21
"Intel 100 Series PMC" rev 0x21 at pci0 dev 31 function 2 not configured
azalia0 at pci0 dev 31 function 3 "Intel 200 Series HD Audio" rev 0x21: msi
azalia0: codecs: Realtek ALC269, Intel/0x280b, using Realtek ALC269
audio0 at azalia0
ichiic0 at pci0 dev 31 function 4 "Intel 100 Series SMBus" rev 0x21: apic 2 int 
16
iic0 at ichiic0
sdtemp0 at iic0 addr 0x18: stts2004
iic0: addr 0x2c 80=04 81=04 82=04 83=04 84=04 85=04 86=04 87=04 fd=01 words 
00=ffff 01=ffff 02=ffff 03=ffff 04=ffff 05=ffff 06=ffff 07=ffff
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pms0: Synaptics touchpad, firmware 8.2, 0x1e2b1 0x840300
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
xhci0: port=4 change=0x10
xhci0: port=5 change=0x20
xhci0: port=4 change=0x10
xhci0: xhci_cmd_slot_control
xhci0: dev 1, input=0xffffff00687b9000 slot=0xffffff00687b9020 
ep0=0xffffff00687b9040
xhci0: dev 1, setting DCBAA to 0x00000000687ba000
xhci_pipe_init: pipe=0xffff800000c53000 addr=0 depth=1 port=4 speed=3 dev 1 dci 
1 (epAddr=0x0)
xhci0: xhci_cmd_set_address BSR=1
xhci0: xhci_cmd_set_address BSR=0
xhci0: dev 1 addr 1
uvideo0 at uhub0 port 4 configuration 1 interface 0 "Chicony Electronics 
Co.,Ltd. Chicony USB2.0 Camera" rev 2.00/10.19 addr 2
video0 at uvideo0
xhci0: port=5 change=0x20
xhci0: xhci_cmd_slot_control
xhci0: dev 2, input=0xffffff00687bc000 slot=0xffffff00687bc020 
ep0=0xffffff00687bc040
xhci0: dev 2, setting DCBAA to 0x00000000687bd000
xhci_pipe_init: pipe=0xffff800000e1a000 addr=0 depth=1 port=5 speed=2 dev 2 dci 
1 (epAddr=0x0)
xhci0: xhci_cmd_set_address BSR=1
xhci0: xhci_cmd_set_address BSR=0
xhci0: dev 2 addr 2
ugen0 at uhub0 port 5 "Intel Bluetooth" rev 2.00/0.10 addr 3
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> SCSI2 0/direct fixed
sd1: 461318MB, 512 bytes/sector, 944780799 sectors
root on sd1a (462370a034f99fd5.a) swap on sd1b dump on sd1b
iwm0: hw rev 0x230, fw ver 22.361476.0, address 00:21:6b:f3:e1:34

And this is the trace from the protection fault trap:

kernel: protection fault trap, code=0
Stopped at       xhci_abort_xfer+0xb1:    cmpb     $0,0x471(%r15)
ddb{1}> bt
xhci_abort_xfer(a4ad628de223bf22,4) at xhci_abort_xfer+0xb1
usbd_transfer(241ab3c7f15336e5) at usbd_transfer+0x24d
ugen_do_read(d37d4ee26d990621,ffff800031d7c330,ffff8000015e9000,
ffffff047e7b2b40) at ugen_do_read+0x347
ugenread(f0ea75196dcbde60,ffff800031d7c330,ffff800031d7c230) at
ugenread+0x47
spec_read(f260588779e12b8e) at spec_read+0xab
VOP_READ(210af2cdd8bacdde,45bbfde2a541fcbe,ffffff047e7b2b40,ffffff0400000000)
at VOP_READ+0x49
vn_read(1a184c87c61ddfe9,ffffff03ffe20788,10) at vn_read+0xf5
dofilereadv(46295ea288c38521,30,ffff8000fffea988,3,ffff800031d7c460) at
dofilereadv+0xe0
sys_read(980e4b232c4c619c,45bbfde2a541fcbe,18) at sys_read+0x5c
syscall(cdbe1f477475ccd7) at syscall+0x32a
Xsyscall(6,3,36dfab34b50,3,1,36e2de55a00) at Xsyscall+0x128
end of kernel
end trace frame: 0x36e588a0650, count: -11

I managed to capture the dmesg with the xhci_debug by keeping the
USB cable plugged in and piping dmesg to a text file and waiting
long enough for the disk to sync (before, I was getting corrupted
dmesg output because fsck just put garbage into the last file I
created.)

The "xhci0: timeout aborting transfer" messages above keep looping
until I unplug the USB cable, after about 15-20 seconds, the 
kernel protection fault kicks me into ddb.

-Tom

Reply via email to