witness: userret: returning with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd8064f85b48) #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:561 [inline] #4 vn_write+0x169 sys/kern/vfs_vnops.c:401 #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 *107994 93609 32767 0x10 0x4000000 1 syz-executor.0 274676 20208 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,ffffffff81fbc9d1) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff81fbc9d1) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020b28510) at userret+0x36a sys/kern/kern_sig.c:1916 syscall(ffff800024e0fe80) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800024e0fe80) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,5,c,0,3,35356b711b0) at Xsyscall+0x128 end of kernel end trace frame: 0x3562c325c10, 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,ffffffff81fbc9d1) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff81fbc9d1) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020b28510) at userret+0x36a sys/kern/kern_sig.c:1916 syscall(ffff800024e0fe80) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800024e0fe80) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,5,c,0,3,35356b711b0) at Xsyscall+0x128 end of kernel end trace frame: 0x3562c325c10, count: -6 ddb{1}> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800024e0fbc0 rbx 0xffff800024e0fc70 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff8000211d6000 rax 0xffff8000009b1440 r8 0xffffffff81265573 kprintf+0x173 r9 0x1 r10 0x25 r11 0xc2761c5a42ea38c0 r12 0x3000000008 r13 0xffff800024e0fbd0 r14 0x100 r15 0x1 rip 0xffffffff81a712a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800024e0fbb0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=107994 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b29658,0xffffffff82395800 process=0xffff800020b2ae10 user=0xffff800024e0a000, vmspace=0xfffffd807f00bcf0 estcpu=36, cpticks=5, pctcpu=0.0 user=0, sys=5, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 93609 247141 66804 32767 2 0x10 syz-executor.0 93609 477760 66804 32767 3 0x4000090 fsleep syz-executor.0 93609 4415 66804 32767 2 0x4000010 syz-executor.0 *93609 107994 66804 32767 7 0x4000010 syz-executor.0 66804 370854 87840 32767 3 0x90 nanosleep syz-executor.0 87840 46446 6042 0 3 0x82 wait syz-executor.0 73666 235691 1 32767 2 0x10 syz-executor.1 25814 181346 0 0 3 0x14200 bored sosplice 6042 296628 25914 0 2 0x482 syz-fuzzer 6042 2871 25914 0 3 0x4000082 thrsleep syz-fuzzer 6042 364468 25914 0 3 0x4000082 thrsleep syz-fuzzer 6042 355785 25914 0 3 0x4000082 thrsleep syz-fuzzer 6042 347101 25914 0 3 0x4000082 thrsleep syz-fuzzer 6042 123578 25914 0 3 0x4000082 thrsleep syz-fuzzer 6042 205080 25914 0 3 0x4000082 thrsleep syz-fuzzer 6042 149700 25914 0 3 0x4000082 thrsleep syz-fuzzer 6042 32400 25914 0 3 0x4000082 thrsleep syz-fuzzer 6042 360295 25914 0 3 0x4000082 kqread syz-fuzzer 25914 341187 55320 0 3 0x10008a pause ksh 55320 518999 55852 0 3 0x92 select sshd 40187 441015 1 0 3 0x100083 ttyin getty 55852 353505 1 0 3 0x80 select sshd 20208 274676 48578 73 7 0x100010 syslogd 48578 392685 1 0 3 0x100082 netio syslogd 5717 116321 1 77 3 0x100090 poll dhclient 35028 289281 1 0 3 0x80 poll dhclient 77038 483646 0 0 3 0x14200 pgzero zerothread 61219 70914 0 0 3 0x14200 aiodoned aiodoned 84912 134163 0 0 3 0x14200 syncer update 77653 327610 0 0 3 0x14200 cleaner cleaner 41670 69711 0 0 3 0x14200 reaper reaper 33326 506890 0 0 3 0x14200 pgdaemon pagedaemon 96606 319310 0 0 3 0x14200 bored crynlk 64583 369190 0 0 3 0x14200 bored crypto 12707 143550 0 0 3 0x40014200 acpi0 acpi0 42830 194003 0 0 3 0x40014200 idle1 17878 467631 0 0 3 0x14200 bored softnet 90452 73904 0 0 3 0x14200 bored systqmp 32800 509732 0 0 3 0x14200 bored systq 20108 507164 0 0 3 0x40014200 bored softclock 91574 475046 0 0 3 0x40014200 idle0 45114 58703 0 0 3 0x14200 bored smr 1 87611 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 93609 (syz-executor.0) thread 0xffff800020b28510 (107994) exclusive rrwlock inode r = 0 (0xfffffd8064f85b48) #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:561 [inline] #4 vn_write+0x169 sys/kern/vfs_vnops.c:401 #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 73666 (syz-executor.1) thread 0xffff800020b298d0 (235691) exclusive rrwlock inode r = 0 (0xfffffd8064f854e8) #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 ufs_ihashins+0x45 sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x13e 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+0xce sys/kern/vfs_vops.c:449 #8 domkdirat+0x121 sys/kern/vfs_syscalls.c:2983 #9 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #9 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #10 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd8064f85818) #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 vfs_lookup+0xec sys/kern/vfs_lookup.c:418 #6 namei+0x61c sys/kern/vfs_lookup.c:248 #7 domkdirat+0x75 sys/kern/vfs_syscalls.c:2968 #8 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #8 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #9 Xsyscall+0x128 Process 20208 (syslogd) thread 0xffff800020b60778 (274676) exclusive rrwlock inode r = 0 (0xfffffd806ebc02b8) #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 9460 6321K 6321K 78643K 10632 0 0 pcb 13 8K 8K 78643K 13 0 0 rtable 105 3K 3K 78643K 949 0 0 ifaddr 35 10K 10K 78643K 141 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 63 0 0 iov 0 0K 28K 78643K 70 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 76K 78643K 1670 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 8 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 106 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 33K 78643K 1072 0 0 sigio 0 0K 0K 78643K 18 0 0 proc 41 38K 70K 78643K 1120 0 0 subproc 33 2K 2K 78643K 323 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 149 0 0 in_multi 33 2K 2K 78643K 251 0 0 ether_multi 1 0K 0K 78643K 8 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 480 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 87 20K 25K 78643K 4336 0 0 UVM aobj 43 2K 2K 78643K 48 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 46 0 0 NDP 5 0K 0K 78643K 60 0 0 temp 121 2750K 2818K 78643K 7212 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 40 0 34 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 75 0 73 1 0 1 1 0 8 0 rtentry 112 232 0 188 2 0 2 2 0 8 0 unpcb 120 377 0 369 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 3087 0 3087 2 2 0 2 0 8 0 tcpcb 544 222 0 218 1 0 1 1 0 8 0 inpcb 280 570 0 563 1 0 1 1 0 8 0 nd6 48 57 0 51 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 965 0 774 12 0 12 12 0 8 0 art_table 32 966 0 774 2 0 2 2 0 8 0 art_node 16 231 0 191 1 0 1 1 0 8 0 sysvmsgpl 40 28 0 18 1 0 1 1 0 8 0 semapl 112 100 0 90 1 0 1 1 0 8 0 shmpl 112 46 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2515 0 1088 47 0 47 47 0 8 0 ffsino 272 2515 0 1088 96 0 96 96 0 8 0 nchpl 144 3934 0 2307 61 0 61 61 0 8 0 uvmvnodes 72 2847 0 0 52 0 52 52 0 8 0 vnodes 200 2847 0 0 150 0 150 150 0 8 0 namei 1024 13794 0 13793 5 4 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 10836 0 10836 11 10 1 6 0 8 1 plimitpl 152 197 0 188 1 0 1 1 0 8 0 sigapl 432 1192 0 1178 4 2 2 3 0 8 0 futexpl 56 8963 0 8962 4 3 1 1 0 8 0 knotepl 112 602 0 583 1 0 1 1 0 8 0 kqueuepl 104 250 0 248 1 0 1 1 0 8 0 pipepl 112 784 0 765 3 2 1 2 0 8 0 fdescpl 488 1193 0 1178 3 0 3 3 0 8 0 filepl 152 6920 0 6818 7 2 5 6 0 8 0 lockfpl 104 234 0 234 4 3 1 1 0 8 1 lockfspl 48 74 0 74 4 3 1 1 0 8 1 sessionpl 112 34 0 24 1 0 1 1 0 8 0 pgrppl 48 42 0 32 1 0 1 1 0 8 0 ucredpl 96 1759 0 1750 1 0 1 1 0 8 0 zombiepl 144 1178 0 1177 7 6 1 1 0 8 0 processpl 896 1209 0 1177 4 0 4 4 0 8 0 procpl 632 2986 0 2942 8 3 5 5 0 8 1 srpgc 64 34 0 34 3 3 0 1 0 8 0 sosppl 128 25 0 25 5 4 1 1 0 8 1 sockpl 384 1038 0 1021 5 2 3 3 0 8 1 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 9 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 7 0 0 1 0 1 1 0 8 0 mcl4k 4096 12 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 239 0 0 29 1 28 29 0 8 2 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 294 0 0 17 0 17 17 0 8 0 bufpl 256 9048 0 2024 440 0 440 440 0 8 0 anonpl 16 131930 0 124855 72 30 42 44 0 125 2 amapchunkpl 152 8675 0 8589 14 10 4 8 0 158 0 amappl16 192 5311 0 4951 65 38 27 31 0 8 8 amappl15 184 217 0 213 1 0 1 1 0 8 0 amappl14 176 297 0 290 1 0 1 1 0 8 0 amappl13 168 68 0 68 2 2 0 1 0 8 0 amappl12 160 43 0 43 4 4 0 1 0 8 0 amappl11 152 459 0 446 1 0 1 1 0 8 0 amappl10 144 255 0 253 2 1 1 1 0 8 0 amappl9 136 789 0 786 1 0 1 1 0 8 0 amappl8 128 288 0 267 1 0 1 1 0 8 0 amappl7 120 268 0 258 1 0 1 1 0 8 0 amappl6 112 402 0 391 1 0 1 1 0 8 0 amappl5 104 261 0 251 1 0 1 1 0 8 0 amappl4 96 1373 0 1345 2 1 1 2 0 8 0 amappl3 88 363 0 351 1 0 1 1 0 8 0 amappl2 80 7517 0 7449 4 2 2 3 0 8 0 amappl1 72 39501 0 39062 23 13 10 19 0 8 0 amappl 80 3451 0 3416 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 47 0 5 1 0 1 1 0 8 0 uaddrrnd 24 1193 0 1178 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1193 0 1178 1 0 1 1 0 8 0 vmmpekpl 168 13827 0 13798 2 0 2 2 0 8 0 vmmpepl 168 156809 0 155310 121 40 81 84 0 357 11 vmsppl 368 1192 0 1178 2 0 2 2 0 8 0 pdppl 4096 2393 0 2356 6 0 6 6 0 8 1 pvpl 32 386754 0 376548 170 60 110 115 0 265 12 pmappl 232 1192 0 1178 4 3 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 619 0 7 18 0 18 18 0 8 0