witness: userret: returning with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd8069c22d60) #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_seek+0xc9 vn_lock sys/kern/vfs_vnops.c:561 [inline] #4 vn_seek+0xc9 sys/kern/vfs_vnops.c:611 #5 sys_lseek+0x6f sys/kern/vfs_syscalls.c:1859 #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 panic: witness_warn Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *213638 62028 32767 0x10 0x4000000 1 syz-executor.1 16295 25194 73 0x100010 0 0 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,ffffffff81fbca27) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff81fbca27) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020b28510) at userret+0x36a sys/kern/kern_sig.c:1916 syscall(ffff800021c63000) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800021c63000) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(0,0,ffffffffffffff87,0,4,d9d14ca31b0) at Xsyscall+0x128 end of kernel end trace frame: 0xd9f357e6310, 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,ffffffff81fbca27) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff81fbca27) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020b28510) at userret+0x36a sys/kern/kern_sig.c:1916 syscall(ffff800021c63000) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800021c63000) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(0,0,ffffffffffffff87,0,4,d9d14ca31b0) at Xsyscall+0x128 end of kernel end trace frame: 0xd9f357e6310, count: -6 ddb{1}> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800021c62d40 rbx 0xffff800021c62df0 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff80002340c000 rax 0xffff8000009aed40 r8 0xffffffff81b1c663 kprintf+0x173 r9 0x1 r10 0x25 r11 0x2bc618ce402c5db8 r12 0x3000000008 r13 0xffff800021c62d50 r14 0x100 r15 0x1 rip 0xffffffff811a7028 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021c62d30 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=213638 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28298,0xffffffff823b68f8 process=0xffff800020aeb888 user=0xffff800021c5e000, vmspace=0xfffffd807effd730 estcpu=36, cpticks=4, pctcpu=0.0 user=0, sys=4, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 62028 86994 5646 32767 2 0x10 syz-executor.1 62028 237420 5646 32767 2 0x4000010 syz-executor.1 62028 388261 5646 32767 3 0x4000090 fsleep syz-executor.1 *62028 213638 5646 32767 7 0x4000010 syz-executor.1 46450 58311 58035 32767 2 0x490 syz-executor.0 46450 448727 58035 32767 3 0x4000090 ttyout syz-executor.0 46450 195869 58035 32767 3 0x4000090 fsleep syz-executor.0 5646 161487 41370 32767 2 0x490 syz-executor.1 41370 373066 42643 0 3 0x82 wait syz-executor.1 58035 56304 90492 32767 2 0x490 syz-executor.0 90492 424847 42643 0 3 0x82 wait syz-executor.0 10359 143587 0 0 3 0x14200 bored sosplice 42643 65533 46049 0 3 0x82 thrsleep syz-fuzzer 42643 209465 46049 0 2 0x4000482 syz-fuzzer 42643 149214 46049 0 3 0x4000082 thrsleep syz-fuzzer 42643 17188 46049 0 3 0x4000082 kqread syz-fuzzer 42643 488281 46049 0 3 0x4000082 thrsleep syz-fuzzer 42643 452673 46049 0 3 0x4000082 thrsleep syz-fuzzer 42643 509428 46049 0 3 0x4000082 thrsleep syz-fuzzer 42643 46414 46049 0 3 0x4000082 thrsleep syz-fuzzer 42643 427845 46049 0 3 0x4000082 thrsleep syz-fuzzer 42643 131415 46049 0 3 0x4000082 thrsleep syz-fuzzer 46049 347982 82124 0 3 0x10008a pause ksh 82124 163401 30169 0 3 0x92 select sshd 7306 504532 1 0 3 0x100083 ttyin getty 30169 400371 1 0 3 0x80 select sshd 25194 16295 711 73 7 0x100010 syslogd 711 404607 1 0 3 0x100082 netio syslogd 86073 468308 1 77 3 0x100090 poll dhclient 73957 222076 1 0 3 0x80 poll dhclient 83311 513477 0 0 3 0x14200 pgzero zerothread 94323 511962 0 0 3 0x14200 aiodoned aiodoned 29276 402562 0 0 3 0x14200 syncer update 83801 419408 0 0 3 0x14200 cleaner cleaner 84392 235996 0 0 3 0x14200 reaper reaper 88541 235776 0 0 3 0x14200 pgdaemon pagedaemon 30259 447690 0 0 3 0x14200 bored crynlk 82832 332090 0 0 3 0x14200 bored crypto 93492 500538 0 0 3 0x40014200 acpi0 acpi0 70472 268364 0 0 3 0x40014200 idle1 73033 303558 0 0 3 0x14200 bored softnet 83051 315770 0 0 3 0x14200 bored systqmp 42159 115637 0 0 3 0x14200 bored systq 45283 105420 0 0 3 0x40014200 bored softclock 42728 126735 0 0 3 0x40014200 idle0 68038 294481 0 0 3 0x14200 bored smr 1 100954 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 62028 (syz-executor.1) thread 0xffff800020b28510 (213638) exclusive rrwlock inode r = 0 (0xfffffd8069c22d60) #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_seek+0xc9 vn_lock sys/kern/vfs_vnops.c:561 [inline] #4 vn_seek+0xc9 sys/kern/vfs_vnops.c:611 #5 sys_lseek+0x6f sys/kern/vfs_syscalls.c:1859 #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 Process 25194 (syslogd) thread 0xffff800020b60010 (16295) exclusive rrwlock inode r = 0 (0xfffffd806eb8b4d8) #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:561 #5 sys_fsync+0x114 sys/kern/vfs_syscalls.c:2806 #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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9463 6322K 6322K 78643K 10695 0 0 pcb 13 8K 8K 78643K 13 0 0 rtable 105 3K 3K 78643K 1495 0 0 ifaddr 35 10K 10K 78643K 215 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 73 0 0 iov 0 0K 28K 78643K 143 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 76K 78643K 1948 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 15 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 180 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 8 25K 33K 78643K 1601 0 0 sigio 0 0K 0K 78643K 23 0 0 proc 41 38K 70K 78643K 1692 0 0 subproc 34 2K 2K 78643K 527 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 178 0 0 in_multi 33 2K 2K 78643K 402 0 0 ether_multi 1 0K 0K 78643K 9 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 667 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 96 21K 30K 78643K 6126 0 0 UVM aobj 72 3K 3K 78643K 74 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 96 0 0 NDP 5 0K 0K 78643K 96 0 0 temp 121 2750K 2820K 78643K 9654 0 0 kqueue 0 0K 0K 78643K 9 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 65 0 59 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 154 0 152 1 0 1 1 0 8 0 rtentry 112 365 0 321 2 0 2 2 0 8 0 unpcb 120 639 0 631 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 4195 0 4195 1 1 0 1 0 8 0 tcpcb 544 313 0 309 1 0 1 1 0 8 0 ipq 40 1 0 1 1 1 0 1 0 8 0 ipqe 40 3 0 3 1 1 0 1 0 8 0 inpcb 280 818 0 811 1 0 1 1 0 8 0 nd6 48 93 0 87 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1499 0 1307 14 1 13 13 0 8 1 art_table 32 1500 0 1307 2 0 2 2 0 8 0 art_node 16 364 0 324 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 11 1 0 1 1 0 8 0 semapl 112 178 0 168 1 0 1 1 0 8 0 shmpl 112 72 0 2 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3037 0 1610 47 0 47 47 0 8 0 ffsino 272 3037 0 1610 96 0 96 96 0 8 0 nchpl 144 5082 0 3454 61 0 61 61 0 8 0 uvmvnodes 72 3573 0 0 65 0 65 65 0 8 0 vnodes 200 3573 0 0 189 0 189 189 0 8 0 namei 1024 19203 0 19203 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 15005 0 15005 13 12 1 6 0 8 1 plimitpl 152 283 0 274 1 0 1 1 0 8 0 sigapl 432 1685 0 1669 4 2 2 3 0 8 0 futexpl 56 14116 0 14114 1 0 1 1 0 8 0 knotepl 112 892 0 873 1 0 1 1 0 8 0 kqueuepl 104 324 0 322 1 0 1 1 0 8 0 pipepl 112 1172 0 1149 5 3 2 2 0 8 1 fdescpl 488 1686 0 1669 3 0 3 3 0 8 0 filepl 152 10094 0 9982 11 5 6 7 0 8 1 lockfpl 104 304 0 304 3 2 1 1 0 8 1 lockfspl 48 97 0 97 3 2 1 1 0 8 1 sessionpl 112 46 0 36 1 0 1 1 0 8 0 pgrppl 48 58 0 48 1 0 1 1 0 8 0 ucredpl 96 2701 0 2692 1 0 1 1 0 8 0 zombiepl 144 1669 0 1669 3 2 1 1 0 8 1 processpl 896 1702 0 1669 4 0 4 4 0 8 0 procpl 632 4203 0 4156 8 3 5 5 0 8 1 srpgc 64 58 0 58 7 6 1 1 0 8 1 sosppl 128 26 0 26 6 5 1 1 0 8 1 sockpl 384 1645 0 1628 4 1 3 4 0 8 1 mcl64k 65536 10 0 0 2 0 2 2 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 10 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 6 0 0 1 0 1 1 0 8 0 mcl4k 4096 12 0 0 2 0 2 2 0 8 0 mcl2k2 2112 4 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 281 0 0 15 0 15 15 0 8 0 bufpl 256 8176 0 1156 439 0 439 439 0 8 0 anonpl 16 196038 0 189281 88 44 44 46 0 125 9 amapchunkpl 152 13521 0 13421 34 25 9 18 0 158 4 amappl16 192 7833 0 7466 72 50 22 31 0 8 1 amappl15 184 242 0 239 4 3 1 1 0 8 0 amappl14 176 333 0 324 1 0 1 1 0 8 0 amappl13 168 252 0 249 3 2 1 1 0 8 0 amappl12 160 144 0 144 6 5 1 1 0 8 1 amappl11 152 302 0 290 1 0 1 1 0 8 0 amappl10 144 368 0 365 2 1 1 1 0 8 0 amappl9 136 1173 0 1168 1 0 1 1 0 8 0 amappl8 128 633 0 607 2 0 2 2 0 8 0 amappl7 120 408 0 400 1 0 1 1 0 8 0 amappl6 112 212 0 202 1 0 1 1 0 8 0 amappl5 104 464 0 454 1 0 1 1 0 8 0 amappl4 96 1926 0 1898 2 1 1 2 0 8 0 amappl3 88 533 0 516 1 0 1 1 0 8 0 amappl2 80 10484 0 10405 4 1 3 3 0 8 0 amappl1 72 52827 0 52356 23 13 10 19 0 8 0 amappl 80 4897 0 4855 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 73 0 2 2 0 2 2 0 8 0 uaddrrnd 24 1686 0 1669 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1686 0 1669 1 0 1 1 0 8 0 vmmpekpl 168 17844 0 17819 2 0 2 2 0 8 0 vmmpepl 168 219876 0 218174 138 61 77 91 0 357 3 vmsppl 368 1685 0 1669 2 0 2 2 0 8 0 pdppl 4096 3380 0 3338 6 0 6 6 0 8 0 pvpl 32 561509 0 551428 201 77 124 133 0 265 35 pmappl 232 1685 0 1669 3 2 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 602 0 4 18 0 18 18 0 8 0