login: witness: userret: returning with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd80698f3e70) #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_read+0xa9 vn_lock sys/kern/vfs_vnops.c:561 [inline] #4 vn_read+0xa9 sys/kern/vfs_vnops.c:348 #5 dofilereadv+0x1a2 sys/kern/sys_generic.c:236 #6 sys_readv+0xa7 sys/kern/sys_generic.c:183 #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 38712 25356 0 0 0 0 syz-executor.0 *364252 25356 0 0 0x4000000 1 syz-executor.0 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,ffffffff8220d283) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff8220d283) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020ab0290) at userret+0x36a sys/kern/kern_sig.c:1916 syscall(ffff800022bc5ae0) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800022bc5ae0) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,0,ffffffffffffffbb,0,3,23a501a3280) at Xsyscall+0x128 end of kernel end trace frame: 0x23d03d0df60, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic witness_warn ddb{1}> 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,ffffffff8220d283) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff8220d283) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020ab0290) at userret+0x36a sys/kern/kern_sig.c:1916 syscall(ffff800022bc5ae0) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800022bc5ae0) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,0,ffffffffffffffbb,0,3,23a501a3280) at Xsyscall+0x128 end of kernel end trace frame: 0x23d03d0df60, count: -6 ddb{1}> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800022bc5820 rbx 0xffff800022bc58d0 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800020d5a000 rax 0xffff800000a8c140 r8 0xffffffff812e94e3 kprintf+0x173 r9 0x1 r10 0x25 r11 0xf512167280b4ac2d r12 0x3000000008 r13 0xffff800022bc5830 r14 0x100 r15 0x1 rip 0xffffffff81d56a38 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800022bc5810 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=364252 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=82, nice=20 forw=0xffffffffffffffff, list=0xffff800020ab0780,0xffffffff826641e8 process=0xffff800020adce00 user=0xffff800022bc0000, vmspace=0xfffffd807f00b450 estcpu=32, cpticks=5, pctcpu=0.0 user=0, sys=5, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 25356 38712 27376 0 7 0 syz-executor.0 25356 499335 27376 0 3 0x4000080 fsleep syz-executor.0 25356 413134 27376 0 2 0x4000000 syz-executor.0 25356 504866 27376 0 3 0x4000080 ttyout syz-executor.0 *25356 364252 27376 0 7 0x4000000 syz-executor.0 66115 55058 68129 0 2 0x480 syz-executor.1 66115 64095 68129 0 3 0x4000080 ttyin syz-executor.1 66115 24314 68129 0 3 0x4000080 fsleep syz-executor.1 86543 119684 1 0 3 0x100083 ttyin getty 27376 225484 35432 0 3 0x82 nanosleep syz-executor.0 68129 13664 35432 0 3 0x82 nanosleep syz-executor.1 56597 303216 0 0 3 0x14200 bored sosplice 35432 441058 5602 0 3 0x82 thrsleep syz-fuzzer 35432 487695 5602 0 3 0x4000082 thrsleep syz-fuzzer 35432 495809 5602 0 3 0x4000082 thrsleep syz-fuzzer 35432 518614 5602 0 3 0x4000082 kqread syz-fuzzer 35432 117088 5602 0 3 0x4000082 thrsleep syz-fuzzer 35432 237535 5602 0 3 0x4000082 thrsleep syz-fuzzer 35432 223254 5602 0 3 0x4000082 thrsleep syz-fuzzer 35432 204491 5602 0 3 0x4000082 thrsleep syz-fuzzer 35432 483792 5602 0 3 0x4000082 thrsleep syz-fuzzer 35432 469984 5602 0 3 0x4000082 thrsleep syz-fuzzer 5602 183823 98506 0 3 0x10008a pause ksh 98506 468803 83801 0 3 0x92 select sshd 83801 346363 1 0 3 0x80 select sshd 78071 116085 83600 74 3 0x100092 bpf pflogd 83600 94663 1 0 3 0x80 netio pflogd 45339 104949 3327 73 2 0x100090 syslogd 3327 511818 1 0 3 0x100082 netio syslogd 10158 110846 1 77 3 0x100090 poll dhclient 66912 371929 1 0 3 0x80 poll dhclient 60862 365322 0 0 3 0x14200 pgzero zerothread 82344 477362 0 0 3 0x14200 aiodoned aiodoned 92029 81486 0 0 3 0x14200 syncer update 52372 43447 0 0 3 0x14200 cleaner cleaner 70919 477091 0 0 3 0x14200 reaper reaper 22329 403232 0 0 3 0x14200 pgdaemon pagedaemon 72317 222794 0 0 3 0x14200 bored crynlk 98678 96859 0 0 3 0x14200 bored crypto 68901 461659 0 0 3 0x40014200 acpi0 acpi0 1820 445033 0 0 3 0x40014200 idle1 68148 153557 0 0 3 0x14200 bored softnet 23122 27935 0 0 3 0x14200 bored systqmp 67947 70204 0 0 3 0x14200 bored systq 59161 10178 0 0 3 0x40014200 bored softclock 46341 464858 0 0 3 0x40014200 idle0 58167 115063 0 0 3 0x14200 bored smr 1 355087 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 25356 (syz-executor.0) thread 0xffff800020ab0290 (364252) exclusive rrwlock inode r = 0 (0xfffffd80698f3e70) #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_read+0xa9 vn_lock sys/kern/vfs_vnops.c:561 [inline] #4 vn_read+0xa9 sys/kern/vfs_vnops.c:348 #5 dofilereadv+0x1a2 sys/kern/sys_generic.c:236 #6 sys_readv+0xa7 sys/kern/sys_generic.c:183 #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 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9583 7094K 7740K 78643K 18984 0 0 pcb 13 8K 8K 78643K 434 0 0 rtable 93 12K 13K 78643K 1051 0 0 ifaddr 79 16K 18K 78643K 357 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1612 0 0 iov 0 0K 32K 78643K 346 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1204 76K 77K 78643K 4257 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 50 0 0 VM map 2 1K 1K 78643K 8 0 0 sem 12 0K 1K 78643K 385 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 3413 0 0 sigio 0 0K 0K 78643K 52 0 0 proc 54 51K 83K 78643K 1067 0 0 subproc 32 2K 2K 78643K 171 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 354 0 0 in_multi 22 1K 2K 78643K 209 0 0 ether_multi 1 0K 0K 78643K 9 0 0 mrt 0 0K 0K 78643K 11 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 598 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 114 22K 31K 78643K 11896 0 0 UVM aobj 127 4K 4K 78643K 142 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 451 0 0 NDP 19 0K 0K 78643K 105 0 0 temp 224 3558K 4195K 78643K 53955 0 0 kqueue 0 0K 0K 78643K 20 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 22 0 18 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 142 0 140 1 0 1 1 0 8 0 rtentry 112 143 0 110 2 0 2 2 0 8 0 unpcb 120 1138 0 1128 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 6404 0 6404 2 2 0 2 0 8 0 tcpcb 544 738 0 734 1 0 1 1 0 8 0 inpcb 280 2128 0 2121 5 3 2 2 0 8 1 rttmr 72 4 0 4 3 3 0 1 0 8 0 nd6 48 30 0 27 1 0 1 1 0 8 0 pkpcb 40 14 0 14 5 5 0 1 0 8 0 ppxss 1128 50 0 50 11 10 1 1 0 8 1 pffrag 232 4 0 4 2 2 0 1 0 482 0 pffrnode 88 4 0 4 2 2 0 1 0 8 0 pffrent 40 12 0 12 2 2 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 114 0 100 1 0 1 1 0 8 0 pfstkey 112 114 0 100 2 0 2 2 0 8 0 pfstate 328 114 0 99 3 1 2 3 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 605 0 458 16 4 12 14 0 8 0 art_table 32 606 0 458 2 0 2 2 0 8 0 art_node 16 136 0 106 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 5 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 383 0 373 1 0 1 1 0 8 0 shmpl 112 140 0 15 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 6668 0 5247 47 0 47 47 0 8 0 ffsino 272 6668 0 5247 96 0 96 96 0 8 0 nchpl 144 11682 0 10049 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 37157 0 37157 4 3 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 vmpool 552 6 0 6 2 2 0 1 0 8 0 scsiplug 64 8 0 8 5 5 0 1 0 8 0 scxspl 192 34099 0 34099 20 19 1 7 0 8 1 plimitpl 152 348 0 338 1 0 1 1 0 8 0 sigapl 432 3593 0 3577 3 1 2 3 0 8 0 futexpl 56 43815 0 43813 3 2 1 1 0 8 0 knotepl 112 665 0 645 1 0 1 1 0 8 0 kqueuepl 104 659 0 656 1 0 1 1 0 8 0 pipepl 112 2164 0 2145 4 3 1 2 0 8 0 fdescpl 488 3594 0 3577 3 0 3 3 0 8 0 filepl 152 21488 0 21379 10 5 5 7 0 8 0 lockfpl 104 1151 0 1151 3 2 1 1 0 8 1 lockfspl 48 382 0 382 3 2 1 1 0 8 1 sessionpl 112 30 0 19 1 0 1 1 0 8 0 pgrppl 48 48 0 37 1 0 1 1 0 8 0 ucredpl 96 3996 0 3987 1 0 1 1 0 8 0 zombiepl 144 3579 0 3579 3 2 1 1 0 8 1 processpl 896 3612 0 3579 4 0 4 4 0 8 0 procpl 632 10644 0 10596 11 6 5 5 0 8 1 srpgc 64 22 0 22 9 8 1 1 0 8 1 sosppl 128 65 0 65 11 10 1 1 0 8 1 sockpl 384 3462 0 3443 10 7 3 4 0 8 1 mcl64k 65536 260 0 0 33 18 15 33 0 8 1 mcl16k 16384 10 0 0 2 0 2 2 0 8 0 mcl12k 12288 24 0 0 2 0 2 2 0 8 0 mcl9k 9216 14 0 0 1 0 1 1 0 8 0 mcl8k 8192 8 0 0 1 0 1 1 0 8 0 mcl4k 4096 16 0 0 2 0 2 2 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 208 0 0 24 4 20 24 0 8 0 mtagpl 80 41 0 0 1 0 1 1 0 8 0 mbufpl 256 425 0 0 22 0 22 22 0 8 0 bufpl 256 18128 0 11109 439 0 439 439 0 8 0 anonpl 16 365298 0 352471 164 82 82 85 0 124 27 amapchunkpl 152 21829 0 21713 38 27 11 12 0 158 4 amappl16 192 18775 0 18053 146 102 44 53 0 8 7 amappl15 184 138 0 138 1 1 0 1 0 8 0 amappl14 176 232 0 227 1 0 1 1 0 8 0 amappl13 168 766 0 764 3 2 1 1 0 8 0 amappl12 160 409 0 409 3 3 0 1 0 8 0 amappl11 152 822 0 805 1 0 1 1 0 8 0 amappl10 144 1350 0 1345 1 0 1 1 0 8 0 amappl9 136 711 0 706 1 0 1 1 0 8 0 amappl8 128 254 0 225 3 1 2 2 0 8 0 amappl7 120 1319 0 1311 1 0 1 1 0 8 0 amappl6 112 790 0 783 1 0 1 1 0 8 0 amappl5 104 610 0 596 1 0 1 1 0 8 0 amappl4 96 3713 0 3681 2 1 1 2 0 8 0 amappl3 88 697 0 686 1 0 1 1 0 8 0 amappl2 80 27615 0 27535 3 0 3 3 0 8 0 amappl1 72 86996 0 86541 25 15 10 20 0 8 0 amappl 80 11073 0 11031 1 0 1 1 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 141 0 15 3 0 3 3 0 8 0 uaddrrnd 24 3600 0 3577 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3600 0 3577 1 0 1 1 0 8 0 vmmpekpl 168 30444 0 30411 2 0 2 2 0 8 0 vmmpepl 168 442017 0 440053 237 138 99 107 0 357 12 vmsppl 368 3593 0 3577 2 0 2 2 0 8 0 pdppl 4096 7207 0 7166 8 2 6 6 0 8 0 pvpl 32 949457 0 933168 340 143 197 200 0 265 62 pmappl 232 3599 0 3583 3 2 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 658 0 34 19 0 19 19 0 8 0