login: witness: userret: returning with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd8066ebd2c8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_write+0x169 vn_lock sys/kern/vfs_vnops.c:556 [inline] #4 vn_write+0x169 sys/kern/vfs_vnops.c:398 #5 dofilewritev+0x1ac sys/kern/sys_generic.c:364 #6 sys_write+0x83 sys/kern/sys_generic.c:284 #7 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #7 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #8 Xsyscall+0x128 panic: witness_warn Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *125021 44537 0 0 0x4000000 0 syz-executor.1 512710 40890 73 0x100010 0 1 syslogd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 witness_warn(2,0,ffffffff81fb8fb3) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff81fb8fb3) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020b50ee8) at userret+0x36a sys/kern/kern_sig.c:1911 syscall(ffff800022e27ae0) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800022e27ae0) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,5,c,0,3,930c3b1c1b0) at Xsyscall+0x128 end of kernel end trace frame: 0x9330c280730, count: 9 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 witness_warn ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 witness_warn(2,0,ffffffff81fb8fb3) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff81fb8fb3) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020b50ee8) at userret+0x36a sys/kern/kern_sig.c:1911 syscall(ffff800022e27ae0) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800022e27ae0) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,5,c,0,3,930c3b1c1b0) at Xsyscall+0x128 end of kernel end trace frame: 0x9330c280730, count: -6 ddb{0}> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800022e27820 rbx 0xffff800022e278d0 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff80002240c000 rax 0xffff8000009bdf80 r8 0xffffffff81386d93 kprintf+0x173 r9 0x1 r10 0x25 r11 0xd3d5485e8e7431ec r12 0x3000000008 r13 0xffff800022e27830 r14 0x100 r15 0x1 rip 0xffffffff81dcdf98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800022e27810 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=125021 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff800020b50780,0xffff800020b50c80 process=0xffff800020b2b190 user=0xffff800022e22000, vmspace=0xfffffd806e7e8b88 estcpu=31, cpticks=5, pctcpu=0.0 user=0, sys=5, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 44537 222224 68525 0 2 0 syz-executor.1 44537 462370 68525 0 3 0x4000080 kqread syz-executor.1 44537 128049 68525 0 2 0x4000000 syz-executor.1 *44537 125021 68525 0 7 0x4000000 syz-executor.1 44537 83087 68525 0 3 0x4000080 kqread syz-executor.1 44537 445980 68525 0 3 0x4000080 fsleep syz-executor.1 98830 151733 1 0 3 0x100083 ttyin getty 68525 53299 3292 0 2 0x482 syz-executor.1 56905 155887 3292 0 3 0x82 piperd syz-executor.0 8470 382285 0 0 3 0x14200 bored sosplice 3292 72717 74036 0 3 0x82 thrsleep syz-fuzzer 3292 270268 74036 0 3 0x4000082 thrsleep syz-fuzzer 3292 193459 74036 0 3 0x4000082 thrsleep syz-fuzzer 3292 210932 74036 0 3 0x4000082 thrsleep syz-fuzzer 3292 129746 74036 0 3 0x4000082 thrsleep syz-fuzzer 3292 385502 74036 0 3 0x4000082 kqread syz-fuzzer 3292 327211 74036 0 3 0x4000082 thrsleep syz-fuzzer 3292 106919 74036 0 3 0x4000082 thrsleep syz-fuzzer 3292 156226 74036 0 3 0x4000082 thrsleep syz-fuzzer 3292 245218 74036 0 3 0x4000082 thrsleep syz-fuzzer 74036 461533 95251 0 3 0x10008a pause ksh 95251 348008 51421 0 3 0x92 select sshd 51421 297996 1 0 3 0x80 select sshd 86425 216600 73786 74 3 0x100092 bpf pflogd 73786 488678 1 0 3 0x80 netio pflogd 40890 512710 1374 73 7 0x100010 syslogd 1374 368831 1 0 3 0x100082 netio syslogd 28680 104098 0 0 3 0x14200 pgzero zerothread 59985 454090 0 0 3 0x14200 aiodoned aiodoned 15964 370873 0 0 3 0x14200 syncer update 66945 135405 0 0 3 0x14200 cleaner cleaner 13782 325140 0 0 3 0x14200 reaper reaper 53823 333862 0 0 3 0x14200 pgdaemon pagedaemon 67360 296786 0 0 3 0x14200 bored crynlk 25846 417000 0 0 3 0x14200 bored crypto 5276 458903 0 0 3 0x40014200 acpi0 acpi0 40043 315092 0 0 3 0x40014200 idle1 46230 247380 0 0 3 0x14200 bored softnet 92222 158303 0 0 3 0x14200 bored systqmp 85581 435345 0 0 3 0x14200 bored systq 81161 43274 0 0 3 0x40014200 bored softclock 89821 348450 0 0 3 0x40014200 idle0 77877 177121 0 0 3 0x14200 bored smr 1 261682 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 44537 (syz-executor.1) thread 0xffff800020b50ee8 (125021) exclusive rrwlock inode r = 0 (0xfffffd8066ebd2c8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_write+0x169 vn_lock sys/kern/vfs_vnops.c:556 [inline] #4 vn_write+0x169 sys/kern/vfs_vnops.c:398 #5 dofilewritev+0x1ac sys/kern/sys_generic.c:364 #6 sys_write+0x83 sys/kern/sys_generic.c:284 #7 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #7 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #8 Xsyscall+0x128 Process 40890 (syslogd) thread 0xffff800020b60ee0 (512710) exclusive rrwlock inode r = 0 (0xfffffd806eb7ce68) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:556 #5 sys_fsync+0x114 sys/kern/vfs_syscalls.c:2789 #6 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #6 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9579 6388K 14770K 78643K 22530 0 0 pcb 13 8K 8K 78643K 338 0 0 rtable 117 12K 13K 78643K 651 0 0 ifaddr 78 16K 17K 78643K 479 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1696 0 0 iov 0 0K 32K 78643K 539 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1199 75K 77K 78643K 5322 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 81 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 530 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 4529 0 0 sigio 1 0K 0K 78643K 73 0 0 proc 54 51K 83K 78643K 1028 0 0 subproc 32 2K 2K 78643K 68 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 438 0 0 in_multi 33 2K 2K 78643K 195 0 0 ether_multi 1 0K 0K 78643K 27 0 0 mrt 0 0K 0K 78643K 22 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 652 0 0 pfkey data 0 0K 0K 78643K 2 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 107 22K 31K 78643K 15811 0 0 UVM aobj 130 4K 4K 78643K 155 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 218 0 0 NDP 18 0K 0K 78643K 132 0 0 temp 217 2752K 3388K 78643K 17482 0 0 kqueue 0 0K 0K 78643K 38 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 11 0 4 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 195 0 195 4 3 1 1 0 8 1 rtentry 112 80 0 35 2 0 2 2 0 8 0 unpcb 120 1478 0 1470 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7389 0 7389 2 2 0 2 0 8 0 tcpcb 544 801 0 797 1 0 1 1 0 8 0 inpcb 280 2079 0 2073 2 1 1 2 0 8 0 rttmr 72 4 0 4 4 4 0 1 0 8 0 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 48 2 0 2 1 1 0 1 0 8 0 nd6 48 12 0 6 1 0 1 1 0 8 0 pkpcb 40 27 0 27 10 10 0 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 76 0 76 11 10 1 1 0 8 1 pffrag 232 4 0 4 3 3 0 1 0 482 0 pffrnode 88 4 0 4 3 3 0 1 0 8 0 pffrent 40 9 0 9 3 3 0 1 0 8 0 pfosfp 40 846 0 846 5 5 0 5 0 8 0 pfosfpen 112 1428 0 1428 21 21 0 21 0 8 0 pfstitem 24 100 0 76 1 0 1 1 0 8 0 pfstkey 112 100 0 76 2 0 2 2 0 8 0 pfstate 328 100 0 76 4 0 4 4 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 284 0 92 12 0 12 12 0 8 0 art_table 32 285 0 92 2 0 2 2 0 8 0 art_node 16 71 0 30 1 0 1 1 0 8 0 sysvmsgpl 40 13 0 4 1 0 1 1 0 8 0 semapl 112 528 0 518 1 0 1 1 0 8 0 shmpl 112 153 0 25 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 8632 0 7229 47 0 47 47 0 8 0 ffsino 272 8632 0 7229 96 0 96 96 0 8 0 nchpl 144 15140 0 13515 62 0 62 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 47326 0 47326 4 3 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 14 0 14 9 9 0 1 0 8 0 scxspl 192 47192 0 47192 26 25 1 6 0 8 1 plimitpl 152 455 0 448 1 0 1 1 0 8 0 sigapl 432 4730 0 4717 4 2 2 3 0 8 0 futexpl 56 56480 0 56479 3 2 1 1 0 8 0 knotepl 112 876 0 855 1 0 1 1 0 8 0 kqueuepl 104 1066 0 1062 1 0 1 1 0 8 0 pipepl 112 2764 0 2741 8 7 1 2 0 8 0 fdescpl 488 4731 0 4717 3 0 3 3 0 8 0 filepl 152 28030 0 27925 16 11 5 7 0 8 0 lockfpl 104 1529 0 1529 4 3 1 1 0 8 1 lockfspl 48 546 0 546 4 3 1 1 0 8 1 sessionpl 112 27 0 18 1 0 1 1 0 8 0 pgrppl 48 69 0 60 1 0 1 1 0 8 0 ucredpl 96 5488 0 5480 1 0 1 1 0 8 0 zombiepl 144 4717 0 4717 2 1 1 1 0 8 1 processpl 896 4747 0 4717 4 0 4 4 0 8 0 procpl 632 14796 0 14752 14 10 4 5 0 8 0 srpgc 64 8 0 8 5 5 0 1 0 8 0 sosppl 128 57 0 57 11 10 1 1 0 8 1 sockpl 384 3816 0 3804 14 12 2 4 0 8 0 mcl64k 65536 261 0 0 33 16 17 33 0 8 1 mcl16k 16384 6 0 0 1 0 1 1 0 8 0 mcl12k 12288 25 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 19 0 0 3 1 2 3 0 8 0 mcl4k 4096 18 0 0 3 0 3 3 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 221 0 0 25 4 21 25 0 8 0 mtagpl 80 65 0 0 2 0 2 2 0 8 0 mbufpl 256 477 0 0 22 0 22 22 0 8 0 bufpl 256 17621 0 10592 440 0 440 440 0 8 0 anonpl 16 428128 0 416297 139 74 65 65 0 125 13 amapchunkpl 152 28004 0 27873 52 46 6 19 0 158 0 amappl16 192 24819 0 24186 147 107 40 44 0 8 8 amappl14 176 67 0 61 1 0 1 1 0 8 0 amappl13 168 4068 0 4064 1 0 1 1 0 8 0 amappl12 160 12 0 11 1 0 1 1 0 8 0 amappl11 152 467 0 459 1 0 1 1 0 8 0 amappl10 144 84 0 79 1 0 1 1 0 8 0 amappl9 136 633 0 629 1 0 1 1 0 8 0 amappl8 128 187 0 162 1 0 1 1 0 8 0 amappl7 120 43 0 38 1 0 1 1 0 8 0 amappl6 112 466 0 459 1 0 1 1 0 8 0 amappl5 104 183 0 172 1 0 1 1 0 8 0 amappl4 96 6890 0 6860 2 1 1 2 0 8 0 amappl3 88 348 0 338 1 0 1 1 0 8 0 amappl2 80 38675 0 38607 3 1 2 3 0 8 0 amappl1 72 110036 0 109634 25 15 10 19 0 8 0 amappl 80 15104 0 15061 2 0 2 2 0 84 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 154 0 25 3 0 3 3 0 8 0 uaddrrnd 24 4731 0 4717 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4731 0 4717 1 0 1 1 0 8 0 vmmpekpl 168 35911 0 35875 3 1 2 2 0 8 0 vmmpepl 168 577084 0 575395 200 110 90 98 0 357 10 vmsppl 368 4730 0 4717 2 0 2 2 0 8 0 pdppl 4096 9469 0 9434 7 1 6 6 0 8 0 pvpl 32 1150710 0 1135746 302 143 159 164 0 265 34 pmappl 232 4730 0 4717 3 2 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 657 0 28 19 0 19 19 0 8 0