Z9˅PIv(a4witness: userret: returning with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd80770c34e0) #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_fchown+0x121 sys/kern/vfs_syscalls.c:2473 #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 138240 67587 0 0 0 1 syz-executor.0 *287086 67587 0 0 0x4000000 0 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,ffffffff81fbd1a9) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff81fbd1a9) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020b18c78) at userret+0x36a sys/kern/kern_sig.c:1911 syscall(ffff80002203b690) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff80002203b690) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,9,fffffffffffffedf,0,3,368763f4280) at Xsyscall+0x128 end of kernel end trace frame: 0x36b5cf0c8a0, 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,ffffffff81fbd1a9) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff81fbd1a9) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020b18c78) at userret+0x36a sys/kern/kern_sig.c:1911 syscall(ffff80002203b690) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff80002203b690) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,9,fffffffffffffedf,0,3,368763f4280) at Xsyscall+0x128 end of kernel end trace frame: 0x36b5cf0c8a0, count: -6 ddb{0}> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff80002203b3d0 rbx 0xffff80002203b480 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800021e1a000 rax 0xffff800000a28d80 r8 0xffffffff811a8513 kprintf+0x173 r9 0x1 r10 0x25 r11 0x7d08ecb874d3525c r12 0x3000000008 r13 0xffff80002203b3e0 r14 0x100 r15 0x1 rip 0xffffffff81e518e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002203b3c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=287086 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b198d0,0xffff800020b18a10 process=0xffff800020aebc08 user=0xffff800022036000, vmspace=0xfffffd807effea10 estcpu=36, cpticks=4, pctcpu=0.0 user=0, sys=4, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 45468 17775 7010 0 2 0 syz-executor.1 45468 333013 7010 0 2 0x4000000 syz-executor.1 67587 138240 6860 0 7 0 syz-executor.0 67587 22254 6860 0 3 0x4000080 fsleep syz-executor.0 67587 12952 6860 0 2 0x4000000 syz-executor.0 67587 520058 6860 0 3 0x4000080 fsleep syz-executor.0 *67587 287086 6860 0 7 0x4000000 syz-executor.0 44154 371660 1 0 3 0x100083 ttyin getty 7010 298465 31375 0 3 0x82 nanosleep syz-executor.1 6860 406196 31375 0 2 0x2 syz-executor.0 76582 175223 0 0 3 0x14200 bored sosplice 31375 449032 66121 0 3 0x82 thrsleep syz-fuzzer 31375 190966 66121 0 3 0x4000082 thrsleep syz-fuzzer 31375 231860 66121 0 3 0x4000082 thrsleep syz-fuzzer 31375 245557 66121 0 3 0x4000082 thrsleep syz-fuzzer 31375 377125 66121 0 2 0x4000082 syz-fuzzer 31375 153674 66121 0 3 0x4000082 thrsleep syz-fuzzer 31375 2085 66121 0 3 0x4000082 thrsleep syz-fuzzer 31375 499586 66121 0 3 0x4000082 thrsleep syz-fuzzer 31375 424162 66121 0 3 0x4000082 thrsleep syz-fuzzer 31375 249471 66121 0 3 0x4000082 thrsleep syz-fuzzer 66121 98396 14402 0 3 0x10008a pause ksh 14402 17847 45373 0 3 0x92 select sshd 45373 197937 1 0 3 0x80 select sshd 93326 97017 22232 74 3 0x100092 bpf pflogd 22232 394033 1 0 3 0x80 netio pflogd 38762 283647 74057 73 2 0x100090 syslogd 74057 301688 1 0 3 0x100082 netio syslogd 11208 316313 1 77 3 0x100090 poll dhclient 68221 317353 1 0 3 0x80 poll dhclient 73758 438097 0 0 2 0x14200 zerothread 26800 190873 0 0 3 0x14200 aiodoned aiodoned 99276 107865 0 0 3 0x14200 syncer update 34199 148727 0 0 3 0x14200 cleaner cleaner 3361 343285 0 0 3 0x14200 reaper reaper 88485 151277 0 0 3 0x14200 pgdaemon pagedaemon 3555 324222 0 0 3 0x14200 bored crynlk 53327 357638 0 0 3 0x14200 bored crypto 380 474638 0 0 3 0x40014200 acpi0 acpi0 34704 154900 0 0 3 0x40014200 idle1 77512 435764 0 0 3 0x14200 bored softnet 78625 287872 0 0 3 0x14200 bored systqmp 84529 479201 0 0 3 0x14200 bored systq 13912 435158 0 0 3 0x40014200 bored softclock 5921 23950 0 0 3 0x40014200 idle0 94876 8775 0 0 3 0x14200 bored smr 1 200984 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 67587 (syz-executor.0) thread 0xffff800020b18c78 (287086) exclusive rrwlock inode r = 0 (0xfffffd80770c34e0) #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_fchown+0x121 sys/kern/vfs_syscalls.c:2473 #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 9629 6595K 14838K 78643K 32048 0 0 pcb 13 8K 8K 78643K 436 0 0 rtable 115 12K 13K 78643K 2038 0 0 ifaddr 91 24K 27K 78643K 1139 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1834 0 0 iov 0 0K 32K 78643K 705 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 77K 78643K 12292 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 105 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 2679 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 11987 0 0 sigio 0 0K 0K 78643K 135 0 0 proc 54 51K 83K 78643K 1159 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 1069 0 0 in_multi 33 2K 2K 78643K 191 0 0 ether_multi 1 0K 0K 78643K 17 0 0 mrt 0 0K 0K 78643K 21 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 108 477K 477K 78643K 108 0 0 exec 0 0K 1K 78643K 1298 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 120 22K 32K 78643K 36504 0 0 UVM aobj 130 4K 4K 78643K 141 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 382 0 0 NDP 22 0K 0K 78643K 297 0 0 temp 242 2753K 2880K 78643K 37800 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 5 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 230 0 228 1 0 1 1 0 8 0 rtentry 112 79 0 35 2 0 2 2 0 8 0 unpcb 120 2362 0 2352 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 6644 0 6644 2 2 0 2 0 8 0 tcpcb 544 1435 0 1431 1 0 1 1 0 8 0 inpcb 280 3474 0 3467 2 1 1 2 0 8 0 rttmr 72 5 0 5 4 4 0 1 0 8 0 nd6 48 12 0 6 1 0 1 1 0 8 0 pkpcb 40 46 0 46 11 11 0 1 0 8 0 swfcl 56 9 0 0 1 0 1 1 0 8 0 ppxss 1128 238 0 238 13 12 1 1 0 8 1 pffrag 232 5 0 5 3 3 0 1 0 482 0 pffrnode 88 5 0 5 3 3 0 1 0 8 0 pffrent 40 16 0 16 3 3 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 124 0 108 1 0 1 1 0 8 0 pfstkey 112 124 0 108 1 0 1 1 0 8 0 pfstate 328 124 0 108 4 1 3 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 283 0 89 15 2 13 13 0 8 0 art_table 32 284 0 89 2 0 2 2 0 8 0 art_node 16 72 0 32 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 2 1 0 1 1 0 8 0 semapl 112 1735 0 1725 1 0 1 1 0 8 0 shmpl 112 139 0 11 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 22789 0 21388 47 0 47 47 0 8 0 ffsino 272 22789 0 21388 96 0 96 96 0 8 0 nchpl 144 38959 0 37322 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 115100 0 115100 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 10 0 10 9 9 0 1 0 8 0 scxspl 192 103893 0 103893 30 29 1 6 0 8 1 plimitpl 152 1060 0 1052 1 0 1 1 0 8 0 sigapl 432 12183 0 12167 3 1 2 3 0 8 0 futexpl 56 129280 0 129278 1 0 1 1 0 8 0 knotepl 112 1735 0 1716 1 0 1 1 0 8 0 kqueuepl 104 2185 0 2183 1 0 1 1 0 8 0 pipepl 112 6020 0 6001 7 6 1 2 0 8 0 fdescpl 488 12184 0 12167 3 0 3 3 0 8 0 filepl 152 58156 0 58050 11 6 5 7 0 8 0 lockfpl 104 3851 0 3851 6 5 1 1 0 8 1 lockfspl 48 1557 0 1557 6 5 1 1 0 8 1 sessionpl 112 22 0 11 1 0 1 1 0 8 0 pgrppl 48 99 0 88 1 0 1 1 0 8 0 ucredpl 96 10054 0 10045 1 0 1 1 0 8 0 zombiepl 144 12167 0 12167 2 1 1 1 0 8 1 processpl 896 12200 0 12167 4 0 4 4 0 8 0 procpl 632 35110 0 35063 20 15 5 5 0 8 1 srpgc 64 9 0 9 5 5 0 1 0 8 0 sosppl 128 60 0 60 18 18 0 1 0 8 0 sockpl 384 6166 0 6147 12 9 3 4 0 8 1 mcl64k 65536 517 0 0 65 28 37 65 0 8 1 mcl16k 16384 11 0 0 2 0 2 2 0 8 0 mcl12k 12288 38 0 0 2 0 2 2 0 8 0 mcl9k 9216 19 0 0 2 0 2 2 0 8 0 mcl8k 8192 14 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 11 0 0 1 0 1 1 0 8 0 mcl2k 2048 263 0 0 28 7 21 28 0 8 0 mtagpl 80 33 0 0 1 0 1 1 0 8 0 mbufpl 256 833 0 0 38 0 38 38 0 8 0 bufpl 256 27113 0 20084 440 0 440 440 0 8 0 anonpl 16 887786 0 875923 243 182 61 67 0 125 9 amapchunkpl 152 62066 0 61941 65 55 10 13 0 158 3 amappl16 192 53101 0 52435 188 150 38 46 0 8 4 amappl15 184 1848 0 1846 2 1 1 1 0 8 0 amappl14 176 1904 0 1896 1 0 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 3948 0 3942 1 0 1 1 0 8 0 amappl11 152 63 0 48 1 0 1 1 0 8 0 amappl10 144 6245 0 6239 1 0 1 1 0 8 0 amappl9 136 629 0 626 1 0 1 1 0 8 0 amappl8 128 202 0 165 2 0 2 2 0 8 0 amappl7 120 6193 0 6188 1 0 1 1 0 8 0 amappl6 112 60 0 52 1 0 1 1 0 8 0 amappl5 104 4118 0 4103 1 0 1 1 0 8 0 amappl4 96 10657 0 10623 2 1 1 2 0 8 0 amappl3 88 4589 0 4575 1 0 1 1 0 8 0 amappl2 80 96416 0 96333 3 1 2 3 0 8 0 amappl1 72 247248 0 246786 27 17 10 20 0 8 0 amappl 80 35392 0 35348 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 140 0 11 3 0 3 3 0 8 0 uaddrrnd 24 12184 0 12167 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 12184 0 12167 1 0 1 1 0 8 0 vmmpekpl 168 70659 0 70623 2 0 2 2 0 8 0 vmmpepl 168 1423750 0 1421810 265 174 91 104 0 357 5 vmsppl 368 12183 0 12167 2 0 2 2 0 8 0 pdppl 4096 24376 0 24334 6 0 6 6 0 8 0 pvpl 32 2464269 0 2449060 484 329 155 164 0 265 27 pmappl 232 12183 0 12167 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 709 0 42 20 0 20 20 0 8 0