panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
Stopped at db_enter+0x25: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*245220 94289 0 0x2 0 0 syz-executor
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff8356f94c) at panic+0x1e5 sys/kern/subr_prf.c:198
witness_checkorder(ffffffff83a778c0,9,0) at witness_checkorder+0x11ee sys/kern/subr_witness.c:847
__mp_lock(ffffffff83a770c0) at __mp_lock+0xe1 read_rflags sys/arch/amd64/compile/SYZKALLER/obj/machine/cpufunc.h:212 [inline]
__mp_lock(ffffffff83a770c0) at __mp_lock+0xe1 intr_disable sys/arch/amd64/compile/SYZKALLER/obj/machine/cpufunc.h:233 [inline]
__mp_lock(ffffffff83a770c0) at __mp_lock+0xe1 sys/kern/kern_lock.c:168
selwakeup(ffff800000c04ef8) at selwakeup+0x23 sys/kern/sys_generic.c:836
comstart(ffff800000c04e00) at comstart+0x28f sys/dev/ic/com.c:924
tputchar(44,ffff800000c04e00) at tputchar+0x17b ttstart sys/kern/tty.c:1369 [inline]
tputchar(44,ffff800000c04e00) at tputchar+0x17b sys/kern/tty.c:2303
kputchar(44,5,0) at kputchar+0x10e sys/kern/subr_prf.c:360
kprintf() at kprintf+0x2a75 sys/kern/subr_prf.c:-1
printf(ffffffff834ca00e) at printf+0x8b sys/kern/subr_prf.c:529
malloc(10,7f,1) at malloc+0xa49 sys/kern/kern_malloc.c:309
dofilewritev(ffff80002a223a00,f8,ffff80002a360348,0,ffff80002a360400) at dofilewritev+0x24f sys/kern/sys_generic.c:-1
sys_write(ffff80002a223a00,ffff80002a3604b0,ffff80002a360400) at sys_write+0xa2 sys/kern/sys_generic.c:300
syscall(ffff80002a3604b0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80002a3604b0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:791
end trace frame: 0xffff80002a360530, count: 0
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
*cpu0: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
ddb{0}> show kasan
No such command
ddb{0}> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff8356f94c) at panic+0x1e5 sys/kern/subr_prf.c:198
witness_checkorder(ffffffff83a778c0,9,0) at witness_checkorder+0x11ee sys/kern/subr_witness.c:847
__mp_lock(ffffffff83a770c0) at __mp_lock+0xe1 read_rflags sys/arch/amd64/compile/SYZKALLER/obj/machine/cpufunc.h:212 [inline]
__mp_lock(ffffffff83a770c0) at __mp_lock+0xe1 intr_disable sys/arch/amd64/compile/SYZKALLER/obj/machine/cpufunc.h:233 [inline]
__mp_lock(ffffffff83a770c0) at __mp_lock+0xe1 sys/kern/kern_lock.c:168
selwakeup(ffff800000c04ef8) at selwakeup+0x23 sys/kern/sys_generic.c:836
comstart(ffff800000c04e00) at comstart+0x28f sys/dev/ic/com.c:924
tputchar(44,ffff800000c04e00) at tputchar+0x17b ttstart sys/kern/tty.c:1369 [inline]
tputchar(44,ffff800000c04e00) at tputchar+0x17b sys/kern/tty.c:2303
kputchar(44,5,0) at kputchar+0x10e sys/kern/subr_prf.c:360
kprintf() at kprintf+0x2a75 sys/kern/subr_prf.c:-1
printf(ffffffff834ca00e) at printf+0x8b sys/kern/subr_prf.c:529
malloc(10,7f,1) at malloc+0xa49 sys/kern/kern_malloc.c:309
dofilewritev(ffff80002a223a00,f8,ffff80002a360348,0,ffff80002a360400) at dofilewritev+0x24f sys/kern/sys_generic.c:-1
sys_write(ffff80002a223a00,ffff80002a3604b0,ffff80002a360400) at sys_write+0xa2 sys/kern/sys_generic.c:300
syscall(ffff80002a3604b0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80002a3604b0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:791
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7b9484889d40, count: -15
ddb{0}> show registers
rdi 0
rsi 0x1
rbp 0xffff80002a35fc20
rbx 0xffffffff8399be0f cpu_info_full_primary+0x2e0f
rdx 0
rcx 0xffff80002a223a00
rax 0xffffffff8399aff0 cpu_info_full_primary+0x1ff0
r8 0x101010101010101
r9 0x8080808080808080
r10 0xed193e4f57873347
r11 0xf9ba33cb467a7905
r12 0xffffffff8399bc10 cpu_info_full_primary+0x2c10
r13 0
r14 0
r15 0x1
rip 0xffffffff83297605 db_enter+0x25
cs 0x8
rflags 0x246
rsp 0xffff80002a35fc10
ss 0x10
db_enter+0x25: addq $0x8,%rsp
ddb{0}> show proc
PROC (syz-executor) tid=245220 pid=94289 tcnt=1 stat=onproc
flags process=2<EXEC> proc=0
runpri=32, usrpri=50, slppri=32, nice=20
wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0
forw=0xffffffffffffffff, list=0xffff800045fe82b8,0xffff80002a222d18
process=0xffff800045ff04e8 user=0xffff80002a35b000, vmspace=0xfffffc000b1f73d0
estcpu=36, cpticks=4, pctcpu=0.3, user=0, sys=3, intr=0
ddb{0}> ps
PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND
38565 423608 67028 0 2 0 0 syz-executor
38565 64671 67028 0 3 0 0x4000080 fsleep syz-executor
93279 315596 74377 0 2 0 0 syz-executor
93279 436476 74377 0 3 0 0x4000080 fsleep syz-executor
58805 151152 52927 0 2 0x2 0 sh
94521 355677 2535 0 3 0 0x80 nanoslp syz-executor
94521 373970 2535 0 2 0 0x4000000 syz-executor
94521 487685 2535 0 3 0 0x4000080 fsleep syz-executor
95437 233183 58538 0 2 0 0 syz-executor
95437 327729 58538 0 3 0 0x4000080 fsleep syz-executor
67207 404290 99560 0 2 0 0 syz-executor
67207 22091 99560 0 3 0 0x4000080 ttyout syz-executor
67207 63288 99560 0 3 0 0x4000080 ttyout syz-executor
52927 353545 80513 0 3 0x2 0x80 wait syz-executor
*94289 245220 80513 0 7 0x2 0 syz-executor
2535 85940 80513 0 3 0x2 0x80 nanoslp syz-executor
67028 403571 80513 0 3 0x2 0x80 nanoslp syz-executor
54072 41865 1 0 3 0x100003 0x80 ttyin getty
99560 260573 80513 0 3 0x2 0x80 nanoslp syz-executor
58538 19698 80513 0 3 0x2 0x80 nanoslp syz-executor
66301 421872 19242 0 3 0x100002 0x80 sbwait arp
19242 520501 82733 0 3 0x100002 0x88 sigsusp sh
82733 343472 80513 0 3 0x2 0x80 wait syz-executor
74377 186047 80513 0 3 0x2 0x80 nanoslp syz-executor
80513 510610 1 0 3 0x2 0x80 kqread syz-executor
92988 8828 90807 74 3 0x1100012 0x80 bpf pflogd
90807 277246 1 0 3 0 0x80 sbwait pflogd
1948 499449 0 0 3 0x14000 0x200 bored smr
67829 515907 0 0 2 0x14000 0x200 zerothread
33954 105798 0 0 3 0x14000 0x200 aiodoned aiodoned
63382 21657 0 0 3 0x14000 0x200 syncer update
99304 488023 0 0 3 0x14000 0x200 cleaner cleaner
41782 224770 0 0 3 0x14000 0x200 reaper reaper
49977 181862 0 0 3 0x14000 0x200 pgdaemon pagedaemon
28347 524105 0 0 3 0x14000 0x200 bored viomb
47175 115055 0 0 3 0x14000 0x40000200 acpi0 acpi0
3149 188774 0 0 7 0x14000 0x40000200 idle1
59871 483061 0 0 3 0x14000 0x200 bored softnet1
53362 24531 0 0 3 0x14000 0x200 bored softnet0
16919 9893 0 0 3 0x14000 0x200 bored systqmp
551 20597 0 0 3 0x14000 0x200 bored systq
72045 30897 0 0 3 0x14000 0x200 tmoslp softclockmp
13086 318862 0 0 3 0x14000 0x40000200 tmoslp softclock
30508 128921 0 0 3 0x14000 0x40000200 idle0
1 374768 0 0 3 0x2 0x80 wait init
0 0 -1 0 3 0x10000 0x200 scheduler swapper
ddb{0}> show all locks
CPU 0:
exclusive mutex /syzkaller/managers/multicore/kernel/sys/kern/kern_malloc.c:96 r = 0 (0xffffffff839eb7f8)
#0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160
#1 mtx_enter+0x4b4 sys/kern/kern_lock.c:487
#2 malloc+0x2ef sys/kern/kern_malloc.c:200
#3 dofilewritev+0x24f sys/kern/sys_generic.c:-1
#4 sys_write+0xa2 sys/kern/sys_generic.c:300
#5 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline]
#5 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:791
#6 Xsyscall+0x128
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 11082 12282K 12341K 166960K 12387 0
pcb 17 12K 12K 166960K 42 0
rtable 171 8K 10K 166960K 671 0
pf 31 17K 24K 166960K 106 0
ifaddr 32 5K 7K 166960K 89 0
ifgroup 47 2K 2K 166960K 103 0
sysctl 4 1K 9K 166960K 8 0
counters 66 36K 37K 166960K 102 0
ioctlops 0 0K 4K 166960K 1525 0
iov 0 0K 16K 166960K 20 0
mount 1 1K 1K 166960K 1 0
log 2 2K 2K 166960K 6 0
vnodes 1326 83K 84K 166960K 1645 0
UFS quota 1 32K 32K 166960K 1 0
UFS mount 5 36K 36K 166960K 5 0
shm 2 1K 5K 166960K 3 0
VM map 2 1K 1K 166960K 2 0
sem 27 1K 1K 166960K 77 0
dirhash 12 2K 2K 166960K 12 0
ACPI 1692 195K 286K 166960K 12470 0
file desc 17 65K 93K 166960K 422 0
sigio 0 0K 0K 166960K 1 0
proc 34 66K 164K 166960K 844 0
subproc 72 4K 4K 166960K 171 0
NFS srvsock 1 0K 0K 166960K 1 0
NFS daemon 1 16K 16K 166960K 1 0
ip_moptions 0 0K 0K 166960K 16 0
in_multi 64 4K 6K 166960K 206 0
ether_multi 1 0K 0K 166960K 3 0
mrt 3 0K 0K 166960K 7 0
ISOFS mount 1 32K 32K 166960K 1 0
MSDOSFS mount 1 16K 16K 166960K 1 0
ttys 211 943K 943K 166960K 211 0
exec 0 0K 1K 166960K 515 0
fusefs mount 1 32K 32K 166960K 1 0
tdb 3 0K 0K 166960K 3 0
VM swap 8 62K 64K 166960K 10 0
UVM amap 151 101K 178K 166960K 5106 0
UVM aobj 3 2K 2K 166960K 4 0
pinsyscall 25 50K 108K 166960K 1835 0
memdesc 1 4K 4K 166960K 1 0
crypto data 1 1K 1K 166960K 1 0
ip6_options 0 0K 0K 166960K 13 0
NDP 10 0K 1K 166960K 60 0
temp 40 9118K 9194K 166960K 13136 0
kqueue 2 4K 22K 166960K 48 0
SYN cache 2 16K 16K 166960K 2 0
ddb{0}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 28 0 0 1 0 1 1 0 8 0
rtpcb 120 72 0 71 1 0 1 1 0 8 0
rtentry 176 213 0 144 5 0 5 5 0 8 0
unpcb 144 79 0 75 1 0 1 1 0 8 0
syncache 336 5 0 5 1 0 1 1 0 8 1
sackhl 24 1 0 1 1 1 0 1 0 8 0
tcpcb 736 75 0 74 4 0 4 4 0 8 3
arp 136 37 0 24 1 0 1 1 0 8 0
ipq 40 1 0 0 1 0 1 1 0 8 0
ipqe 40 1 0 0 1 0 1 1 0 8 0
inpcb 328 346 0 279 6 0 6 6 0 8 0
nd6 152 51 0 36 1 0 1 1 0 8 0
pkpcb 40 1 0 1 1 0 1 1 0 8 1
kcovpl 48 19 0 11 1 0 1 1 0 8 0
ppxss 1192 6 0 6 1 0 1 1 0 8 1
pfosfp 40 1428 0 1005 5 0 5 5 0 8 0
pfosfpen 112 1428 0 714 21 0 21 21 0 8 0
pfanchor 1288 5 0 1 1 0 1 1 0 8 0
pfstitem 24 38 0 0 1 0 1 1 0 8 0
pfstkey 128 38 0 0 2 0 2 2 0 8 0
pfstate 448 38 0 0 5 0 5 5 0 8 0
pfrule 1360 23 0 17 2 1 1 2 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 855 0 569 29 0 29 29 0 8 8
art_table 40 856 0 569 5 0 5 5 0 8 0
art_node 32 213 0 151 1 0 1 1 0 8 0
semapl 72 75 0 50 1 0 1 1 0 8 0
shmpl 120 1 0 1 1 0 1 1 0 8 1
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1828 0 338 94 0 94 94 0 8 0
ffsino 296 1828 0 338 115 0 115 115 0 8 0
nchpl 144 2215 0 470 65 0 65 65 0 8 0
rtmask 32 2 0 2 1 0 1 1 0 8 1
vnodes 216 2154 0 0 120 0 120 120 0 8 0
namei 1024 9323 0 9323 4 1 3 3 0 8 3
percpumem 16 67 0 18 1 0 1 1 0 8 0
kstatmem 264 55 0 32 2 0 2 2 0 8 0
scsiplug 72 2 0 2 1 0 1 1 0 8 1
scxspl 216 8113 0 8113 10 2 8 8 1 8 8
plimitpl 152 250 0 239 1 0 1 1 0 8 0
sigapl 424 718 0 680 7 0 7 7 0 8 1
knotepl 120 310 0 0 10 0 10 10 0 8 0
kqueuepl 224 60 0 58 1 0 1 1 0 8 0
pipepl 344 232 0 205 9 0 9 9 0 8 6
fdescpl 528 702 0 680 3 0 3 3 0 8 0
filepl 160 3265 0 3036 13 0 13 13 0 8 2
lockfpl 104 72 0 71 1 0 1 1 0 8 0
lockfspl 48 34 0 33 1 0 1 1 0 8 0
sessionpl 144 44 0 40 1 0 1 1 0 8 0
pgrppl 48 63 0 51 1 0 1 1 0 8 0
ucredpl 104 398 0 393 1 0 1 1 0 8 0
zombiepl 144 680 0 680 1 0 1 1 0 8 1
processpl 1240 718 0 680 5 0 5 5 0 8 1
procpl 664 979 0 934 6 0 6 6 0 8 1
sockpl 752 505 0 433 8 0 8 8 0 8 0
mcl64k 65536 2 0 0 1 0 1 1 0 8 0
mcl16k 16384 2 0 0 1 0 1 1 0 8 0
mcl8k 8192 2 0 0 1 0 1 1 0 8 0
mcl4k 4096 125 0 0 16 0 16 16 0 8 0
mcl2k 2048 35 0 0 5 0 5 5 0 8 0
mextrefs 64 30 0 0 1 0 1 1 0 8 0
mtagpl 96 2 0 0 1 0 1 1 0 8 0
mbufpl 256 226 0 0 15 0 15 15 0 8 0
bufpl 272 2808 0 105 181 0 181 181 0 8 0
anonpl 32 5519 0 0 45 0 45 45 0 247 0
amapchunkpl 152 14702 0 14345 24 0 24 24 0 158 9
amappl16 200 2016 0 1998 5 3 2 5 0 8 0
amappl15 192 20 0 20 1 0 1 1 0 8 1
amappl14 184 545 0 543 1 0 1 1 0 8 0
amappl13 176 147 0 143 1 0 1 1 0 8 0
amappl12 168 988 0 968 2 0 2 2 0 8 0
amappl11 160 24 0 24 1 1 0 1 0 8 0
amappl10 152 88 0 84 1 0 1 1 0 8 0
amappl9 144 283 0 283 1 1 0 1 0 8 0
amappl8 136 138 0 137 1 0 1 1 0 8 0
amappl7 128 166 0 161 1 0 1 1 0 8 0
amappl6 120 256 0 253 1 0 1 1 0 8 0
amappl5 112 109 0 105 1 0 1 1 0 8 0
amappl4 104 324 0 316 1 0 1 1 0 8 0
amappl3 96 2606 0 2538 3 0 3 3 0 8 0
amappl2 88 774 0 744 2 0 2 2 0 8 0
amappl1 80 12259 0 12064 16 1 15 16 0 8 1
amappl 88 4195 0 4076 4 0 4 4 0 92 0
uvmvnodes 80 106 0 0 3 0 3 3 0 8 0
dma4096 4096 1 0 1 1 1 0 1 0 8 0
dma1024 1024 1 0 0 1 0 1 1 0 8 0
dma256 256 6 0 6 1 1 0 1 0 8 0
dma128 128 254 0 254 2 1 1 1 0 8 1
dma64 64 6 0 6 1 1 0 1 0 8 0
dma32 32 7 0 7 1 1 0 1 0 8 0
dma16 16 18 0 17 1 0 1 1 0 8 0
aobjpl 72 3 0 1 1 0 1 1 0 8 0
uaddrrnd 24 702 0 680 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 702 0 680 1 0 1 1 0 8 0
vmmpekpl 168 7787 0 7736 3 0 3 3 0 8 0
vmmpepl 168 53970 0 52988 87 0 87 87 0 357 35
vmsppl 488 701 0 680 5 0 5 5 0 8 0
rwobjpl 80 18308 0 17761 24 0 24 24 0 8 2
pdppl 4096 1411 0 1360 99 44 55 85 0 8 4
pvpl 32 10959 0 0 89 0 89 89 0 265 0
pmappl 256 701 0 680 3 0 3 3 0 8 0
extentpl 40 45 0 27 1 0 1 1 0 8 0
phpool 112 468 0 48 12 0 12 12 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}>