Bug 254229 - Kernel panic when connect USB mass storage on Raspberry Pi 4
Summary: Kernel panic when connect USB mass storage on Raspberry Pi 4
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: arm64 Any
: --- Affects Many People
Assignee: Warner Losh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-12 05:54 UTC by nrgmilk
Modified: 2021-03-13 16:29 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nrgmilk 2021-03-12 05:54:33 UTC
I used snapshot of FreeBSD-14.0-CURRENT-arm64-aarch64-RPI-20210311-15565e0a217-257277.img.xz
My RPI4 is 8GB model.

I tested all USB ports and some devices.

----
ugen0.5: <vendor 0x174c USB 3.1 Device PM> at usbus0
umass0 on uhub0
umass0: <vendor 0x174c USB 3.1 Device PM, class 0/0, rev 3.10/1.00, addr 4> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x0100
umass0:0:0: Attached to scbus0
opanic: malloc(M_WAITOK) with sleeping prohibited
cpuid = 0
time = 1615452946
KDB: stack backtrace:
db_trace_self() at db_trace_self
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
vpanic() at vpanic+0x184
panic() at panic+0x44
malloc_dbg() at malloc_dbg+0xf8
malloc() at malloc+0x30
disk_alloc() at disk_alloc+0x1c
daregister() at daregister+0x3b8
cam_periph_alloc() at cam_periph_alloc+0x528
daasync() at daasync+0x260
xpt_async_process_dev() at xpt_async_process_dev+0x194
xpt_async_process() at xpt_async_process+0x3a0
xpt_done_process() at xpt_done_process+0x314
xpt_done_td() at xpt_done_td+0xd8
fork_exit() at fork_exit+0x74
fork_trampoline() at fork_trampoline+0x14
KDB: enter: panic
[ thread pid 7 tid 100044 ]
Stopped at      kdb_enter+0x44: undefined       f902811f
---


---
ugen0.3: <USB Flash Disk> at usbus0
umass0 on uhub1
umass0: <USB Flash Disk, class 0/0, rev 2.10/11.00, addr 2> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x4000
umass0:0:0: Attached to scbus0
panic: malloc(M_WAITOK) with sleeping prohibited
cpuid = 2
time = 1615455121
KDB: stack backtrace:
db_trace_self() at db_trace_self
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
vpanic() at vpanic+0x184
panic() at panic+0x44
malloc_dbg() at malloc_dbg+0xf8
malloc() at malloc+0x30
disk_alloc() at disk_alloc+0x1c
daregister() at daregister+0x3b8
cam_periph_alloc() at cam_periph_alloc+0x528
daasync() at daasync+0x260
xpt_async_process_dev() at xpt_async_process_dev+0x194
xpt_async_process() at xpt_async_process+0x3a0
xpt_done_process() at xpt_done_process+0x314
xpt_done_td() at xpt_done_td+0xd8
fork_exit() at fork_exit+0x74
fork_trampoline() at fork_trampoline+0x14
KDB: enter: panic
[ thread pid 7 tid 100044 ]
Stopped at      kdb_enter+0x44: undefined       f902811f
---
Comment 1 Hans Petter Selasky freebsd_committer 2021-03-12 05:58:36 UTC
Warner, over to you :-)
Comment 2 Warner Losh freebsd_committer 2021-03-12 06:07:28 UTC
https://reviews.freebsd.org/D29210

should fix this problem. It's not arm specific. Been trying to get this reviewed for a couple of days.
Comment 3 Mark Millard 2021-03-12 06:38:43 UTC
See also:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254230
Comment 4 Mark Millard 2021-03-13 08:32:03 UTC
(In reply to nrgmilk from comment #0)

main 7381bbee29df was the commit for fixing this
issue.
Comment 5 nrgmilk 2021-03-13 16:29:31 UTC
Ok. Now confirmed that fixed by commit.

Thank you.