NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/57270: panic (KASSERT) in usb



>Number:         57270
>Category:       kern
>Synopsis:       panic (KASSERT) in usb
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 15 11:40:00 +0000 2023
>Originator:     Manuel Bouyer
>Release:        NetBSD 10.0_BETA
>Organization:
>Environment:
System: NetBSD sandettie.soc.lip6.fr 10.0_BETA NetBSD 10.0_BETA (GENERIC_CAN) #4: Mon Mar 13 15:30:21 MET 2023 bouyer%armandeche.soc.lip6.fr@localhost:/local/armandeche1/tmp/build/amd64/obj/local/armandeche2/netbsd-10/src/sys/arch/amd64/compile/GENERIC_CAN amd64
Architecture: x86_64
Machine: amd64
>Description:
	I'm using a USB device to program some microcontroller.
	The device powers the target from USB.
	While it works fine when using my desktop, it fails to program
	the target when using my laptop, most probably because the laptop's USB
	port doesn't provide enough power (using an external PSU for the
	target works around this issue).

	The programmer appears a a ugen device and a userland program
	drives it.
	When the target programming fails, the application driving the
	programmer says "Resetting PICkit device..." (which, I guess, causes
	the device to disconnect from USB) and just after that,
	the kernel panics:
System panicked: kernel diagnostic assertion "pipe->up_abortlwp == NULL" failed: file "/local/armandeche2/netbsd-10/src/sys/dev/usb/usbdi.c", line 1037 pipe->up_abortlwp=0xffff85745ccae640
crash> tr
__kernel_end() at 0
kern_reboot() at sys_reboot
vpanic() at vpanic+0x18d
kern_assert() at __x86_indirect_thunk_rax
usbd_ar_pipe() at usbd_ar_pipe+0x223
usbd_abort_pipe() at usbd_abort_pipe+0x25
ugen_do_close() at ugen_do_close+0x8c
ugenclose() at ugenclose+0x5f
cdev_close() at cdev_close+0x92
spec_close() at spec_close+0x22a
VOP_CLOSE() at VOP_CLOSE+0x44
vn_close() at vn_close+0x35
closef() at closef+0x60
fd_close() at fd_close+0x138
sys_close() at sys_close+0x22
syscall() at syscall+0x196
--- syscall (number 6) ---


>How-To-Repeat:
	run a pickit3 with PK2CMD on a computer with limited USB power.
>Fix:



Home | Main Index | Thread Index | Old Index