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 *218182 55290 0 0x2 0x1 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 ktrsyscall(ffff80003c3e3cb0,6,8,ffff80002a308110) at ktrsyscall+0x19a sys/kern/kern_ktrace.c:174 syscall(ffff80002a308110) at syscall+0x305 mi_syscall sys/sys/syscall_mi.h:154 [inline] syscall(ffff80002a308110) at syscall+0x305 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73109dc1c840, count: 1 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 ktrsyscall(ffff80003c3e3cb0,6,8,ffff80002a308110) at ktrsyscall+0x19a sys/kern/kern_ktrace.c:174 syscall(ffff80002a308110) at syscall+0x305 mi_syscall sys/sys/syscall_mi.h:154 [inline] syscall(ffff80002a308110) at syscall+0x305 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73109dc1c840, count: -14 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a3078f0 rbx 0xffffffff8399be0f cpu_info_full_primary+0x2e0f rdx 0 rcx 0xffff80003c3e3cb0 rax 0xffffffff8399aff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xe1351ea8b4d46ed5 r11 0x596260cfa2b43660 r12 0xffffffff8399bc10 cpu_info_full_primary+0x2c10 r13 0 r14 0 r15 0x1 rip 0xffffffff83297605 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a3078e0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=218182 pid=55290 tcnt=1 stat=onproc flags process=2 proc=1 runpri=50, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003c3e27f0,0xffff80002a2222b8 process=0xffff800037395d30 user=0xffff80002a303000, vmspace=0xfffff6000b1f75b8 estcpu=36, cpticks=3, pctcpu=0.0, user=0, sys=3, intr=0 ddb{0}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 20486 461620 10696 0 2 0x2 0 ifconfig 10696 253749 66861 0 3 0x100002 0x88 sigsusp sh 59290 348711 20933 0 2 0 0 syz-executor 59290 222322 20933 0 3 0 0x4000080 bell syz-executor 59290 454765 20933 0 2 0 0x4000000 syz-executor 99877 409134 14174 0 3 0 0x80 nanoslp syz-executor 99877 54389 14174 0 3 0 0x4000080 fsleep syz-executor 99877 347968 14174 0 3 0 0x4000080 nanoslp syz-executor 99877 479851 14174 0 3 0 0x4000080 fsleep syz-executor 18782 481933 14826 0 2 0 0 syz-executor 18782 249100 14826 0 3 0 0x4000080 fsleep syz-executor 60084 224276 91443 -1 2 0x10 0 syz-executor 60084 75946 91443 -1 3 0x10 0x4000080 kqsel syz-executor 60084 450475 91443 -1 3 0x10 0x4000080 fsleep syz-executor 60084 176625 91443 -1 3 0x10 0x4000080 fsleep syz-executor 60084 193643 91443 -1 3 0x10 0x4000080 fsleep syz-executor 60084 450525 91443 -1 3 0x10 0x4000080 fsleep syz-executor 72101 489345 57613 0 2 0 0 syz-executor 72101 151957 57613 0 3 0 0x4000080 ttyopn syz-executor 72101 232078 57613 0 3 0 0x4000080 fsleep syz-executor 59468 109 47546 0 2 0 0 syz-executor 59468 186896 47546 0 3 0 0x4000080 fsleep syz-executor 66861 208153 17802 0 3 0x2 0x80 wait syz-executor *55290 218182 17802 0 7 0x2 0x1 syz-executor 20933 436163 17802 0 3 0x2 0x80 nanoslp syz-executor 47546 199247 17802 0 3 0x2 0x80 nanoslp syz-executor 91443 517753 17802 0 3 0x2 0x80 nanoslp syz-executor 57613 148771 17802 0 3 0x2 0x80 nanoslp syz-executor 14174 149948 17802 0 3 0x2 0x80 nanoslp syz-executor 14826 488568 17802 0 3 0x2 0x80 nanoslp syz-executor 17802 237212 50590 0 3 0x2 0x80 kqread syz-executor 50590 481960 68320 0 3 0x100002 0x88 sigsusp ksh 68320 234054 13077 0 3 0x10 0x88 kqread sshd-session 13077 185128 52855 0 3 0x12 0x80 kqread sshd-session 89992 170531 1 0 3 0x100003 0x80 ttyin getty 52855 344055 1 0 3 0 0x88 kqread sshd 45872 152477 8601 74 3 0x1100012 0x80 bpf pflogd 8601 326139 1 0 3 0 0x80 sbwait pflogd 68493 274315 11406 73 3 0x1100010 0x80 kqread syslogd 11406 101452 1 0 3 0x100002 0x80 sbwait syslogd 56009 59184 1 0 3 0x100000 0x80 kqread resolvd 32002 339176 2766 77 3 0x100012 0x80 kqread dhcpleased 10388 517559 2766 77 3 0x100012 0x80 kqread dhcpleased 2766 111369 1 0 3 0 0x80 kqread dhcpleased 60154 105764 0 0 3 0x14000 0x200 bored smr 76662 309448 0 0 2 0x14000 0x200 zerothread 89284 512873 0 0 3 0x14000 0x200 aiodoned aiodoned 10964 199867 0 0 3 0x14000 0x200 syncer update 46182 378644 0 0 3 0x14000 0x200 cleaner cleaner 56128 346400 0 0 3 0x14000 0x200 reaper reaper 37364 225873 0 0 3 0x14000 0x200 pgdaemon pagedaemon 40363 92772 0 0 3 0x14000 0x200 bored viomb 16960 298266 0 0 3 0x14000 0x40000200 acpi0 acpi0 28712 114512 0 0 7 0x14000 0x40000200 idle1 62372 182738 0 0 3 0x14000 0x200 bored softnet1 93786 102727 0 0 3 0x14000 0x200 bored softnet0 16671 382189 0 0 3 0x14000 0x200 bored systqmp 17268 412281 0 0 3 0x14000 0x200 bored systq 66721 83486 0 0 3 0x14000 0x200 tmoslp softclockmp 61950 154824 0 0 3 0x14000 0x40000200 tmoslp softclock 7630 99106 0 0 3 0x14000 0x40000200 idle0 1 375173 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10010000 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 ktrsyscall+0x19a sys/kern/kern_ktrace.c:174 #4 syscall+0x305 mi_syscall sys/sys/syscall_mi.h:154 [inline] #4 syscall+0x305 sys/arch/amd64/amd64/trap.c:791 #5 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11092 12158K 12235K 166960K 12352 0 pcb 19 15K 16K 166960K 115 0 rtable 205 7K 8K 166960K 652 0 pf 37 18K 25K 166960K 314 0 ifaddr 40 6K 7K 166960K 92 0 ifgroup 55 2K 2K 166960K 118 0 sysctl 2 1K 9K 166960K 7 0 counters 70 37K 37K 166960K 108 0 ioctlops 0 0K 4K 166960K 1600 0 iov 0 0K 16K 166960K 9 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1293 81K 82K 166960K 1621 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 24 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 98K 166960K 501 0 sigio 0 0K 0K 166960K 3 0 proc 75 131K 180K 166960K 848 0 subproc 72 4K 4K 166960K 162 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 48 0 in_multi 88 5K 6K 166960K 207 0 ether_multi 1 0K 0K 166960K 4 0 mrt 2 0K 0K 166960K 16 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 514 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 248 177K 191K 166960K 5931 0 UVM aobj 10 2K 2K 166960K 10 0 pinsyscall 43 86K 104K 166960K 1896 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 16 0 NDP 12 0K 2K 166960K 63 0 temp 36 9114K 9134K 166960K 19034 0 kqueue 13 20K 32K 166960K 66 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 55 0 52 1 0 1 1 0 8 0 rtentry 176 215 0 126 6 0 6 6 0 8 0 unpcb 144 148 0 131 3 0 3 3 0 8 2 syncache 336 5 0 5 2 1 1 1 0 8 1 tcpcb 736 112 0 108 7 0 7 7 0 8 6 arp 136 37 0 21 1 0 1 1 0 8 0 inpcb 328 467 0 458 8 1 7 7 0 8 6 nd6 152 52 0 31 1 0 1 1 0 8 0 pkpcb 40 3 0 3 1 0 1 1 0 8 1 kcovpl 48 18 0 10 1 0 1 1 0 8 0 ppxss 1192 6 0 6 1 0 1 1 0 8 1 pfstscr 40 5 0 4 1 0 1 1 0 8 0 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 10 0 8 1 0 1 1 0 8 0 pfstitem 24 48 0 0 1 0 1 1 0 8 0 pfstkey 128 52 0 4 2 0 2 2 0 8 0 pfstate 448 49 0 2 6 0 6 6 0 8 0 pfrule 1360 22 0 17 2 1 1 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 891 0 485 34 2 32 32 0 8 3 art_table 40 893 0 485 6 0 6 6 0 8 0 art_node 32 215 0 136 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 72 19 0 9 1 0 1 1 0 8 0 shmpl 120 7 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1972 0 487 93 0 93 93 0 8 0 ffsino 296 1972 0 487 115 0 115 115 0 8 0 nchpl 144 2476 0 729 65 0 65 65 0 8 0 vnodes 216 2239 0 0 125 0 125 125 0 8 0 namei 1024 10048 0 10048 4 3 1 3 0 8 1 percpumem 16 70 0 19 1 0 1 1 0 8 0 kstatmem 264 61 0 34 3 0 3 3 0 8 1 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 8651 0 8651 11 3 8 8 1 8 8 plimitpl 152 122 0 104 1 0 1 1 0 8 0 sigapl 424 792 0 744 7 1 6 7 0 8 0 knotepl 120 539 0 0 17 0 17 17 0 8 0 kqueuepl 224 84 0 73 1 0 1 1 0 8 0 pipepl 344 303 0 276 3 0 3 3 0 8 0 fdescpl 528 775 0 743 3 0 3 3 0 8 0 filepl 160 3974 0 3748 17 3 14 14 0 8 3 lockfpl 104 81 0 78 1 0 1 1 0 8 0 lockfspl 48 40 0 37 1 0 1 1 0 8 0 sessionpl 144 42 0 32 1 0 1 1 0 8 0 pgrppl 48 61 0 43 1 0 1 1 0 8 0 ucredpl 104 481 0 467 1 0 1 1 0 8 0 zombiepl 144 744 0 744 1 0 1 1 0 8 1 processpl 1240 792 0 744 5 1 4 5 0 8 0 procpl 664 1150 0 1088 7 1 6 6 0 8 0 sosppl 176 2 0 2 1 0 1 1 0 8 1 sockpl 752 682 0 652 14 3 11 14 0 8 7 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl16k 16384 5 0 0 1 0 1 1 0 8 0 mcl9k128 9344 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 120 0 0 15 0 15 15 0 8 0 mcl2k 2048 19 0 0 3 0 3 3 0 8 0 mextrefs 64 19 0 0 1 0 1 1 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 187 0 0 12 0 12 12 0 8 0 bufpl 272 2843 0 105 183 0 183 183 0 8 0 anonpl 32 5604 0 0 46 0 46 46 0 247 0 amapchunkpl 152 17597 0 17077 43 15 28 33 0 158 5 amappl16 200 2124 0 2101 5 3 2 5 0 8 0 amappl15 192 8 0 8 1 1 0 1 0 8 0 amappl14 184 548 0 546 1 0 1 1 0 8 0 amappl13 176 180 0 168 1 0 1 1 0 8 0 amappl12 168 1060 0 1030 2 0 2 2 0 8 0 amappl11 160 6 0 6 1 1 0 1 0 8 0 amappl10 152 63 0 49 1 0 1 1 0 8 0 amappl9 144 274 0 274 1 1 0 1 0 8 0 amappl8 136 138 0 136 1 0 1 1 0 8 0 amappl7 128 163 0 150 1 0 1 1 0 8 0 amappl6 120 253 0 249 1 0 1 1 0 8 0 amappl5 112 96 0 85 1 0 1 1 0 8 0 amappl4 104 325 0 305 1 0 1 1 0 8 0 amappl3 96 3061 0 2956 3 0 3 3 0 8 0 amappl2 88 860 0 784 2 0 2 2 0 8 0 amappl1 80 12496 0 11894 14 1 13 14 0 8 0 amappl 88 5003 0 4829 5 0 5 5 0 92 0 uvmvnodes 80 107 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 253 0 253 1 1 0 1 0 8 0 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 9 0 0 1 0 1 1 0 8 0 uaddrrnd 24 776 0 744 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 776 0 744 1 0 1 1 0 8 0 vmmpekpl 168 8538 0 8483 3 0 3 3 0 8 0 vmmpepl 168 57908 0 55994 92 4 88 88 0 357 2 vmsppl 488 775 0 744 6 1 5 5 0 8 1 rwobjpl 80 19138 0 18071 24 1 23 24 0 8 0 pdppl 4096 1559 0 1488 115 42 73 85 0 8 2 pvpl 32 14384 0 0 117 1 116 116 0 265 0 pmappl 256 775 0 744 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 490 0 51 13 0 13 13 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 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 ktrsyscall(ffff80003c3e3cb0,6,8,ffff80002a308110) at ktrsyscall+0x19a sys/kern/kern_ktrace.c:174 syscall(ffff80002a308110) at syscall+0x305 mi_syscall sys/sys/syscall_mi.h:154 [inline] syscall(ffff80002a308110) at syscall+0x305 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73109dc1c840, count: -14 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff80002999dff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 acpicpu_idle() at acpicpu_idle+0x457 sys/dev/acpi/acpicpu_x86.c:1224 sched_idle(ffff80002999dff0) at sched_idle+0x371 sys/kern/kern_sched.c:192 end trace frame: 0x0, count: 10 ddb{1}> trace x86_ipi_db(ffff80002999dff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 acpicpu_idle() at acpicpu_idle+0x457 sys/dev/acpi/acpicpu_x86.c:1224 sched_idle(ffff80002999dff0) at sched_idle+0x371 sys/kern/kern_sched.c:192 end trace frame: 0x0, count: -5