Re: current amd64 crashes in usb_transfer_complete

2016-08-14 Thread Alexander Nasonov
Alexander Nasonov wrote:
> The crash happened only once. I'm not sure that running with these
> will prove anything. I'll try to take steps to reproduce the crash
> again before running with these patches.

Got a different crash in usb_transfer_complete. I was playing with
RPI2 powered from USB on my computer and connected my computer over
uplcom(4).
It likely happened because I unplugged uplcom(4) while minicom was
still hanging up. It didn't happen immediately, though. I was able
to start X and firefox before the kernel crashed. I also replugged
power USB a couple of times but it's a very dumb, I'm not sure if
plugging it triggers any code in the kernel.

I don't know if this crash is related to the first crash. The first
crash happened while I was trying to secure yubikey into the slot.

Here's dmesg of the second crash:

panic: lock error: Mutex: mutex_vector_enter: locking against myself: lock 
0xfe81163ee370 cpu 3 lwp 0xfe8117053b20
cpu3: Begin traceback...
vpanic() at netbsd:vpanic+0x140
snprintf() at netbsd:snprintf
lockdebug_abort() at netbsd:lockdebug_abort+0x63
mutex_vector_enter() at netbsd:mutex_vector_enter+0x369
ucomwritecb() at netbsd:ucomwritecb+0x22
usb_transfer_complete() at netbsd:usb_transfer_complete+0x149
xhci_abort_xfer() at netbsd:xhci_abort_xfer+0x15d
usbd_ar_pipe() at netbsd:usbd_ar_pipe+0x3b
usbd_abort_pipe() at netbsd:usbd_abort_pipe+0x27
ucomclose() at netbsd:ucomclose+0x12c
spec_close() at netbsd:spec_close+0x11a
VOP_CLOSE() at netbsd:VOP_CLOSE+0x33
vn_close() at netbsd:vn_close+0x36
closef() at netbsd:closef+0x54
fd_close() at netbsd:fd_close+0x1ac
sys_close() at netbsd:sys_close+0x20
syscall() at netbsd:syscall+0x15b

crash> show lock 0xfe81163ee370
doesn't show anything because the kernel isn't compiled with LOCKDEBUG.

Alex


Re: current amd64 crashes in usb_transfer_complete

2016-08-12 Thread Alexander Nasonov
Takahiro Hayashi wrote:
> Could you try both of
> 
> http://www.netbsd.org/~skrll/usb.softint.diff
> https://mail-index.netbsd.org/tech-kern/2016/08/09/msg020963.html
> 
> and check if you can still see the problem?

The crash happened only once. I'm not sure that running with these
will prove anything. I'll try to take steps to reproduce the crash
again before running with these patches.

Alex


Re: current amd64 crashes in usb_transfer_complete

2016-08-12 Thread Takahiro Hayashi

Could you try both of

http://www.netbsd.org/~skrll/usb.softint.diff
https://mail-index.netbsd.org/tech-kern/2016/08/09/msg020963.html

and check if you can still see the problem?


Thanks,
--
t-hash



Re: current amd64 crashes in usb_transfer_complete

2016-08-12 Thread Takahiro Hayashi

Could you try both of

http://www.netbsd.org/~skrll/usb.softint.diff
https://mail-index.netbsd.org/tech-kern/2016/08/09/msg020963.html

and check if you can still see the problem?


Thanks,
--
t-hash



Re: current amd64 crashes in usb_transfer_complete

2016-08-08 Thread Alexander Nasonov
Alexander Nasonov wrote:
> Got KASSERT when a yubikey device was plugged in.
> 
> $ crash -M netbsd.9.core
> Crash version 7.99.35, image version 7.99.35.
> System panicked: kernel diagnostic assertion "xfer->ux_state == XFER_ONQU" 
> failed: file "/home/alnsn/netbsd-current/clean/src/sys/dev/usb/usbdi.c", line 
> 910
> Backtrace from time of crash is available.
> crash> bt
> _KERNEL_OPT_NARCNET() at 0
> _KERNEL_OPT_NARCNET() at 0
> vpanic() at vpanic+0x149
> cd_play_msf() at cd_play_msf
> usb_transfer_complete() at usb_transfer_complete+0x24e
> xhci_abort_xfer() at xhci_abort_xfer+0x15d
> usbd_ar_pipe() at usbd_ar_pipe+0x3b
> usbd_abort_pipe() at usbd_abort_pipe+0x27
> uhidev_detach() at uhidev_detach+0x32
> config_detach() at config_detach+0xf8
> usb_disconnect_port() at usb_disconnect_port+0xae
> uhub_explore() at uhub_explore+0x1fe
> usb_discover.isra.2() at usb_discover.isra.2+0x4e
> usb_event_thread() at usb_event_thread+0x7c
> 
> 
> Kernel built from src updated about a week ago:
> 
> $ uname -a
> NetBSD neva 7.99.35 NetBSD 7.99.35 (GENERIC) #0: Wed Aug  3 23:02:01 BST 2016 
>  
> alnsn@nebeda.localdomain:/home/alnsn/netbsd-current/clean/src/sys/arch/amd64/compile/obj/GENERIC
>  amd64
> 
> $ gunzip -c /netbsd |ident |grep usbdi.c
>  $NetBSD: usbdi.c,v 1.171 2016/05/17 11:37:50 pooka Exp $

$ dmesg -M /var/crash/netbsd.9.core


1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
usbd_ar_pipe() at WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 125 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
netbsd:usbd_ar_pipe+0x3b
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 132 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227c08 6
WARNING: SPL NOT LOWERED ON SYSCALL 1 6 EXIT 0 7
WARNING: SPL NOT LOWERED ON SYSCALL 107 4 EXIT af227