panic: mtx 0xffffffff821ae640: locking against myself Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *454371 5886 0 0 0 0 syz-executor.1 454640 5886 0 0 0x4000000 1K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 __mtx_enter_try(ffffffff821ae640) at __mtx_enter_try+0x131 sys/kern/kern_lock.c:297 _mtx_enter(ffffffff821ae640,ffffffff81fb85c6,1ff) at _mtx_enter+0x54 __mtx_enter sys/kern/kern_lock.c:267 [inline] _mtx_enter(ffffffff821ae640,ffffffff81fb85c6,1ff) at _mtx_enter+0x54 sys/kern/kern_lock.c:447 printf(ffffffff81fcd105) at printf+0x6b sys/kern/subr_prf.c:511 splassert_fail(d,e,ffffffff81fb0566) at splassert_fail+0x67 sys/kern/subr_prf.c:223 witness_lock(ffffffff823c2350,8,ffffffff81fa3cf4,1bc) at witness_lock+0x423 witness_lock_stack_get sys/kern/subr_witness.c:1880 [inline] witness_lock(ffffffff823c2350,8,ffffffff81fa3cf4,1bc) at witness_lock+0x423 sys/kern/subr_witness.c:1199 wakeup_n(ffff800000970488,ffffffff) at wakeup_n+0x43 sys/kern/kern_synch.c:444 tputchar(73,ffff800000970400) at tputchar+0xf5 ttstart sys/kern/tty.c:1341 [inline] tputchar(73,ffff800000970400) at tputchar+0xf5 sys/kern/tty.c:2277 kputchar(73,5,0) at kputchar+0xe6 sys/kern/subr_prf.c:342 kprintf() at kprintf+0x1b2c sys/kern/subr_prf.c:1058 printf(ffffffff81f68c1b) at printf+0x80 sys/kern/subr_prf.c:512 start_vmm_on_cpu(ffffffff8223aff0) at start_vmm_on_cpu+0x165 sys/arch/amd64/amd64/vmm.c:922 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 end trace frame: 0xffff800020c13180, 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 mtx 0xffffffff821ae640: locking against myself ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 __mtx_enter_try(ffffffff821ae640) at __mtx_enter_try+0x131 sys/kern/kern_lock.c:297 _mtx_enter(ffffffff821ae640,ffffffff81fb85c6,1ff) at _mtx_enter+0x54 __mtx_enter sys/kern/kern_lock.c:267 [inline] _mtx_enter(ffffffff821ae640,ffffffff81fb85c6,1ff) at _mtx_enter+0x54 sys/kern/kern_lock.c:447 printf(ffffffff81fcd105) at printf+0x6b sys/kern/subr_prf.c:511 splassert_fail(d,e,ffffffff81fb0566) at splassert_fail+0x67 sys/kern/subr_prf.c:223 witness_lock(ffffffff823c2350,8,ffffffff81fa3cf4,1bc) at witness_lock+0x423 witness_lock_stack_get sys/kern/subr_witness.c:1880 [inline] witness_lock(ffffffff823c2350,8,ffffffff81fa3cf4,1bc) at witness_lock+0x423 sys/kern/subr_witness.c:1199 wakeup_n(ffff800000970488,ffffffff) at wakeup_n+0x43 sys/kern/kern_synch.c:444 tputchar(73,ffff800000970400) at tputchar+0xf5 ttstart sys/kern/tty.c:1341 [inline] tputchar(73,ffff800000970400) at tputchar+0xf5 sys/kern/tty.c:2277 kputchar(73,5,0) at kputchar+0xe6 sys/kern/subr_prf.c:342 kprintf() at kprintf+0x1b2c sys/kern/subr_prf.c:1058 printf(ffffffff81f68c1b) at printf+0x80 sys/kern/subr_prf.c:512 start_vmm_on_cpu(ffffffff8223aff0) at start_vmm_on_cpu+0x165 sys/arch/amd64/amd64/vmm.c:922 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi(0,0,0,0,6be2d1d8038,6be2d1d8010) at Xresume_lapic_ipi+0x23 end of kernel end trace frame: 0xd993, count: -15 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c12b00 rbx 0xffff800020c12bb0 rdx 0xffffffff81fb85c6 apollo_pio_rec+0x7a19 rcx 0xffffffff8223aff0 cpu_info_full_primary+0x1ff0 rax 0xffffffff8223aff0 cpu_info_full_primary+0x1ff0 r8 0xffffffff8100f603 kprintf+0x173 r9 0x1 r10 0x25 r11 0x6e973747a8dc13b3 r12 0x3000000008 r13 0xffff800020c12b10 r14 0x100 r15 0x1 rip 0xffffffff81cdc368 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c12af0 ss 0 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=454371 stat=onproc flags process=0 proc=0 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b8a4c8,0xffff800020b8abe0 process=0xffff800020b7da58 user=0xffff800020c0e000, vmspace=0xfffffd807f00c2d0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND * 5886 454371 19240 0 7 0 syz-executor.1 5886 454640 19240 0 7 0x4000000 syz-executor.1 19240 279438 96254 0 3 0x82 nanosleep syz-executor.1 91930 195968 96254 0 3 0x2 biowait syz-executor.0 96254 85260 38876 0 3 0x82 thrsleep syz-fuzzer 96254 276791 38876 0 3 0x4000082 thrsleep syz-fuzzer 96254 19779 38876 0 3 0x4000082 thrsleep syz-fuzzer 96254 225438 38876 0 3 0x4000082 thrsleep syz-fuzzer 96254 81045 38876 0 3 0x4000082 thrsleep syz-fuzzer 96254 488199 38876 0 3 0x4000082 thrsleep syz-fuzzer 96254 243167 38876 0 3 0x4000082 thrsleep syz-fuzzer 96254 42639 38876 0 3 0x4000082 thrsleep syz-fuzzer 96254 378033 38876 0 3 0x4000082 thrsleep syz-fuzzer 96254 105868 38876 0 3 0x4000082 kqread syz-fuzzer 38876 520355 89208 0 3 0x10008a pause ksh 89208 488162 70450 0 3 0x92 select sshd 64535 41602 1 0 3 0x100083 ttyin getty 70450 333562 1 0 3 0x80 select sshd 72450 55837 84943 74 3 0x100092 bpf pflogd 84943 348399 1 0 3 0x80 netio pflogd 53467 401618 58587 73 3 0x100090 kqread syslogd 58587 315850 1 0 3 0x100082 netio syslogd 78259 52051 1 77 3 0x100090 poll dhclient 99287 346973 1 0 3 0x80 poll dhclient 42251 501087 0 0 3 0x14200 pgzero zerothread 67207 252936 0 0 3 0x14200 aiodoned aiodoned 58380 369828 0 0 3 0x14200 syncer update 343 211826 0 0 3 0x14200 cleaner cleaner 14215 364163 0 0 3 0x14200 reaper reaper 83940 101329 0 0 3 0x14200 pgdaemon pagedaemon 13556 486022 0 0 3 0x14200 bored crynlk 21183 257145 0 0 3 0x14200 bored crypto 14331 224398 0 0 3 0x40014200 acpi0 acpi0 40380 11409 0 0 3 0x40014200 idle1 39754 457255 0 0 3 0x14200 bored softnet 433 284758 0 0 3 0x14200 bored systqmp 40209 202582 0 0 3 0x14200 bored systq 93632 177639 0 0 3 0x40014200 bored softclock 24674 516864 0 0 3 0x40014200 idle0 75155 200756 0 0 3 0x14200 bored smr 1 453761 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive sched_lock &sched_lock r = 0 (0xffffffff823c2350) locked @ /syzkaller/managers/multicore/kernel/sys/kern/kern_synch.c:444 Process 5886 (syz-executor.1) thread 0xffff800020b8abd0 (454640) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8236d9f8) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x5a4 sys/kern/subr_witness.c:1201 #1 syscall+0x45e mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x45e sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 Process 91930 (syz-executor.0) thread 0xffff800020b04008 (195968) exclusive rrwlock inode r = 0 (0xfffffd806da86d68) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_ihash.c:140 #0 witness_lock+0x5a4 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x43c sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 ufs_ihashins+0x57 sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x133 sys/ufs/ffs/ffs_vfsops.c:1352 #5 ffs_inode_alloc+0x1cf sys/ufs/ffs/ffs_alloc.c:392 #6 ufs_mkdir+0xf4 sys/ufs/ufs/ufs_vnops.c:1164 #7 VOP_MKDIR+0x6a sys/kern/vfs_vops.c:449 #8 domkdirat+0x121 sys/kern/vfs_syscalls.c:2881 #9 syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] #9 syscall+0x576 sys/arch/amd64/amd64/trap.c:574 #10 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd8068288d60) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+0x5a4 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x43c sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 vfs_lookup+0xec sys/kern/vfs_lookup.c:387 #6 namei+0x45f sys/kern/vfs_lookup.c:224 #7 domkdirat+0x75 sys/kern/vfs_syscalls.c:2866 #8 syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] #8 syscall+0x576 sys/arch/amd64/amd64/trap.c:574 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9497 6461K 6904K 78643K 10962 0 0 pcb 25 9K 10K 78643K 123 0 0 rtable 100 3K 4K 78643K 308 0 0 ifaddr 49 12K 12K 78643K 85 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 1 2K 4K 78643K 1473 0 0 iov 0 0K 12K 78643K 17 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1204 75K 75K 78643K 1399 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 4 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 16 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 25K 78643K 185 0 0 proc 53 50K 71K 78643K 392 0 0 subproc 64 65538K 67586K 78643K 170 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 6 0 0 in_multi 33 2K 2K 78643K 66 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 217 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 89 21K 21K 78643K 1418 0 0 UVM aobj 7 2K 2K 78643K 8 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 16 0 0 NDP 9 0K 0K 78643K 26 0 0 temp 118 2699K 2763K 78643K 3864 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 7 0 3 1 0 1 1 0 8 0 inpcbpl 280 94 0 87 1 0 1 1 0 8 0 plimitpl 152 24 0 16 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 68 0 28 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 25 0 21 1 0 1 1 0 8 0 nd6 48 10 0 6 1 0 1 1 0 8 0 ppxss 1128 3 0 3 1 1 0 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 16 0 2 1 0 1 1 0 8 0 pfstkey 112 16 0 2 1 0 1 1 0 8 0 pfstate 328 16 0 2 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 308 0 123 12 0 12 12 0 8 0 art_table 32 309 0 123 2 0 2 2 0 8 0 art_node 16 67 0 33 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 14 0 4 1 0 1 1 0 8 0 shmpl 112 6 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1694 0 267 47 0 47 47 0 8 0 ffsino 272 1694 0 267 96 0 96 96 0 8 0 nchpl 144 2141 0 498 61 0 61 61 0 8 0 uvmvnodes 72 1872 0 0 35 0 35 35 0 8 0 vnodes 200 1872 0 0 99 0 99 99 0 8 0 namei 1024 5925 0 5924 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 5377 0 5376 7 6 1 6 0 8 0 sigapl 432 375 0 360 3 1 2 3 0 8 0 futexpl 56 1954 0 1954 1 0 1 1 0 8 1 knotepl 112 121 0 102 1 0 1 1 0 8 0 kqueuepl 104 22 0 20 1 0 1 1 0 8 0 pipepl 112 260 0 241 1 0 1 1 0 8 0 fdescpl 488 376 0 360 3 0 3 3 0 8 0 filepl 152 2042 0 1940 6 1 5 5 0 8 1 lockfpl 104 50 0 50 2 1 1 1 0 8 1 lockfspl 32 21 0 21 2 1 1 1 0 8 1 sessionpl 112 21 0 10 1 0 1 1 0 8 0 pgrppl 48 23 0 12 1 0 1 1 0 8 0 ucredpl 96 294 0 285 1 0 1 1 0 8 0 zombiepl 144 360 0 360 2 1 1 1 0 8 1 processpl 840 391 0 360 4 0 4 4 0 8 0 procpl 600 695 0 654 4 0 4 4 0 8 0 srpgc 64 18 0 18 1 0 1 1 0 8 1 sockpl 384 182 0 163 4 1 3 3 0 8 1 mcl64k 65536 231 0 0 29 0 29 29 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 124 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 317 0 0 19 0 19 19 0 8 0 bufpl 256 5887 0 1166 296 0 296 296 0 8 0 anonpl 16 48974 0 39695 52 1 51 51 0 125 9 amapchunkpl 152 1718 0 1618 7 2 5 6 0 158 0 amappl16 192 1699 0 1167 39 4 35 39 0 8 8 amappl15 184 20 0 19 1 0 1 1 0 8 0 amappl14 176 113 0 106 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 18 0 16 1 0 1 1 0 8 0 amappl11 152 46 0 27 1 0 1 1 0 8 0 amappl10 144 69 0 66 1 0 1 1 0 8 0 amappl9 136 614 0 609 1 0 1 1 0 8 0 amappl8 128 166 0 151 1 0 1 1 0 8 0 amappl7 120 38 0 34 1 0 1 1 0 8 0 amappl6 112 65 0 58 1 0 1 1 0 8 0 amappl5 104 118 0 102 1 0 1 1 0 8 0 amappl4 96 632 0 599 2 1 1 2 0 8 0 amappl3 88 124 0 119 1 0 1 1 0 8 0 amappl2 80 2032 0 1978 3 1 2 2 0 8 0 amappl1 72 17399 0 16946 25 15 10 20 0 8 0 amappl 72 963 0 925 1 0 1 1 0 75 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 7 0 1 1 0 1 1 0 8 0 uaddrrnd 24 376 0 360 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 376 0 360 1 0 1 1 0 8 0 vmmpekpl 168 7039 0 7016 2 0 2 2 0 8 0 vmmpepl 168 48552 0 47007 98 11 87 87 0 357 18 vmsppl 360 375 0 360 2 0 2 2 0 8 0 pdppl 4096 760 0 720 6 0 6 6 0 8 0 pvpl 32 161251 0 148841 134 3 131 131 0 265 20 pmappl 232 375 0 360 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 487 0 4 14 0 14 14 0 8 0