witness: userret: returning with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd807c8a9e78) #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 * 60546 50782 32767 0x10 0x4000000 0 syz-executor.1 361799 59909 73 0x100010 0x80 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,ffffffff822072f8) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff822072f8) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020a88ef0) at userret+0x36a sys/kern/kern_sig.c:1916 syscall(ffff800024f675f0) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800024f675f0) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,0,ffffffffffffff87,0,4,bbf548641b0) at Xsyscall+0x128 end of kernel end trace frame: 0xbc212a406e0, 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,ffffffff822072f8) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff822072f8) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020a88ef0) at userret+0x36a sys/kern/kern_sig.c:1916 syscall(ffff800024f675f0) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800024f675f0) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,0,ffffffffffffff87,0,4,bbf548641b0) at Xsyscall+0x128 end of kernel end trace frame: 0xbc212a406e0, count: -6 ddb{0}> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800024f67330 rbx 0xffff800024f673e0 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800021b5e000 rax 0xffff800000a788c0 r8 0xffffffff81b89d03 kprintf+0x173 r9 0x1 r10 0x25 r11 0xab3d789cd44c0518 r12 0x3000000008 r13 0xffff800024f67340 r14 0x100 r15 0x1 rip 0xffffffff817ece58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800024f67320 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=60546 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020a89168,0xffffffff8262bb10 process=0xffff800020a8aa90 user=0xffff800024f62000, vmspace=0xfffffd806e8a4cf8 estcpu=36, cpticks=5, pctcpu=0.0 user=0, sys=5, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 50782 21280 96557 32767 2 0x10 syz-executor.1 50782 444911 96557 32767 2 0x4000010 syz-executor.1 50782 16675 96557 32767 3 0x4000090 fsleep syz-executor.1 *50782 60546 96557 32767 7 0x4000010 syz-executor.1 21768 401138 54811 32767 2 0x490 syz-executor.0 54811 427695 57085 0 3 0x82 wait syz-executor.0 96557 488790 55560 32767 3 0x90 nanosleep syz-executor.1 55560 303367 57085 0 3 0x82 wait syz-executor.1 66644 433173 0 0 3 0x14200 bored sosplice 57085 35025 9988 0 3 0x82 thrsleep syz-fuzzer 57085 486166 9988 0 3 0x4000082 thrsleep syz-fuzzer 57085 226854 9988 0 3 0x4000082 thrsleep syz-fuzzer 57085 248036 9988 0 3 0x4000082 thrsleep syz-fuzzer 57085 146700 9988 0 3 0x4000082 thrsleep syz-fuzzer 57085 46274 9988 0 3 0x4000082 thrsleep syz-fuzzer 57085 298058 9988 0 3 0x4000082 thrsleep syz-fuzzer 57085 290576 9988 0 3 0x4000082 thrsleep syz-fuzzer 57085 339813 9988 0 3 0x4000082 kqread syz-fuzzer 57085 339172 9988 0 3 0x4000082 thrsleep syz-fuzzer 9988 512616 59213 0 3 0x10008a pause ksh 59213 307327 96979 0 3 0x92 select sshd 73638 514064 1 0 3 0x100083 ttyin getty 96979 480628 1 0 3 0x80 select sshd 59909 361799 43632 73 7 0x100090 syslogd 43632 231337 1 0 3 0x100082 netio syslogd 21728 787 1 77 3 0x100090 poll dhclient 19631 80534 1 0 3 0x80 poll dhclient 7491 91756 0 0 3 0x14200 pgzero zerothread 53888 119990 0 0 3 0x14200 aiodoned aiodoned 12353 327337 0 0 3 0x14200 syncer update 10156 197088 0 0 3 0x14200 cleaner cleaner 9203 454383 0 0 3 0x14200 reaper reaper 41887 249579 0 0 3 0x14200 pgdaemon pagedaemon 89956 49338 0 0 3 0x14200 bored crynlk 10685 255569 0 0 3 0x14200 bored crypto 39092 152001 0 0 3 0x40014200 acpi0 acpi0 85798 464311 0 0 3 0x40014200 idle1 87254 258286 0 0 3 0x14200 bored softnet 52353 486571 0 0 3 0x14200 bored systqmp 27286 196034 0 0 3 0x14200 bored systq 56942 248624 0 0 3 0x40014200 bored softclock 74668 45588 0 0 3 0x40014200 idle0 49441 280142 0 0 3 0x14200 bored smr 1 502367 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 50782 (syz-executor.1) thread 0xffff800020a88ef0 (60546) exclusive rrwlock inode r = 0 (0xfffffd807c8a9e78) #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 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9462 6321K 6321K 78643K 11519 0 0 pcb 13 8K 8K 78643K 13 0 0 rtable 105 3K 3K 78643K 8930 0 0 ifaddr 38 14K 15K 78643K 1232 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 532 0 0 iov 0 0K 28K 78643K 824 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 76K 78643K 6153 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 155 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 1092 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 7 21K 33K 78643K 11471 0 0 sigio 0 0K 0K 78643K 132 0 0 proc 41 38K 70K 78643K 9399 0 0 subproc 34 2K 2K 78643K 3332 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 1499 0 0 in_multi 33 2K 2K 78643K 2555 0 0 ether_multi 1 0K 0K 78643K 79 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 3489 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 97 21K 31K 78643K 38116 0 0 UVM aobj 130 8K 8K 78643K 149 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 742 0 0 NDP 5 0K 0K 78643K 591 0 0 temp 121 3554K 3629K 78643K 49562 0 0 kqueue 0 0K 0K 78643K 169 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 399 0 393 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 911 0 909 1 0 1 1 0 8 0 rtentry 112 2184 0 2140 2 0 2 2 0 8 0 unpcb 120 4458 0 4450 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 3891 0 3891 2 2 0 2 0 8 0 tcpcb 544 2655 0 2651 2 1 1 2 0 8 0 ipq 40 6 0 6 5 5 0 1 0 8 0 ipqe 40 13 0 13 5 5 0 1 0 8 0 inpcb 280 6358 0 6348 22 20 2 2 0 8 1 nd6 48 588 0 582 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 8965 0 8773 27 15 12 13 0 8 0 art_table 32 8966 0 8773 2 0 2 2 0 8 0 art_node 16 2183 0 2143 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 12 2 1 1 1 0 8 0 semapl 112 1090 0 1080 1 0 1 1 0 8 0 shmpl 112 147 0 19 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 13224 0 11768 49 1 48 48 0 8 0 ffsino 272 13224 0 11768 99 1 98 98 0 8 0 nchpl 144 26990 0 25359 61 0 61 61 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 111374 0 111374 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 72815 0 72815 48 47 1 7 0 8 1 plimitpl 152 2054 0 2044 1 0 1 1 0 8 0 sigapl 432 11060 0 11045 16 14 2 3 0 8 0 futexpl 56 107153 0 107152 2 1 1 1 0 8 0 knotepl 112 6279 0 6260 1 0 1 1 0 8 0 kqueuepl 104 2576 0 2574 1 0 1 1 0 8 0 pipepl 112 6972 0 6953 13 12 1 2 0 8 0 fdescpl 488 11061 0 11045 3 0 3 3 0 8 0 filepl 152 67729 0 67626 21 16 5 7 0 8 0 lockfpl 104 2074 0 2074 14 13 1 1 0 8 1 lockfspl 48 631 0 631 14 13 1 1 0 8 1 sessionpl 112 211 0 201 1 0 1 1 0 8 0 pgrppl 48 367 0 357 1 0 1 1 0 8 0 ucredpl 96 19078 0 19069 1 0 1 1 0 8 0 zombiepl 144 11045 0 11044 2 1 1 1 0 8 0 processpl 896 11077 0 11044 4 0 4 4 0 8 0 procpl 632 29246 0 29201 34 29 5 5 0 8 1 srpgc 64 388 0 388 32 31 1 1 0 8 1 sosppl 128 213 0 213 36 36 0 1 0 8 0 sockpl 384 11974 0 11957 15 12 3 4 0 8 1 mcl64k 65536 17 0 0 3 0 3 3 0 8 0 mcl16k 16384 22 0 0 3 1 2 3 0 8 0 mcl12k 12288 41 0 0 2 0 2 2 0 8 0 mcl9k 9216 41 0 0 3 1 2 2 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 9 0 0 1 0 1 1 0 8 0 mcl2k 2048 234 0 0 27 8 19 27 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 741 0 0 16 4 12 16 0 8 0 bufpl 256 24579 0 17565 439 0 439 439 0 8 0 anonpl 16 1234852 0 1227877 241 196 45 59 0 124 7 amapchunkpl 152 90484 0 90390 214 204 10 18 0 158 6 amappl16 192 50945 0 50559 329 297 32 40 0 8 11 amappl15 184 1985 0 1983 19 18 1 1 0 8 0 amappl14 176 2858 0 2851 1 0 1 1 0 8 0 amappl13 168 2062 0 2062 18 18 0 1 0 8 0 amappl12 160 1510 0 1504 2 1 1 1 0 8 0 amappl11 152 1248 0 1237 1 0 1 1 0 8 0 amappl10 144 1756 0 1749 1 0 1 1 0 8 0 amappl9 136 4241 0 4238 1 0 1 1 0 8 0 amappl8 128 3295 0 3265 7 5 2 2 0 8 0 amappl7 120 1807 0 1797 1 0 1 1 0 8 0 amappl6 112 753 0 746 1 0 1 1 0 8 0 amappl5 104 3026 0 3014 1 0 1 1 0 8 0 amappl4 96 10426 0 10393 2 1 1 2 0 8 0 amappl3 88 3317 0 3305 1 0 1 1 0 8 0 amappl2 80 74030 0 73963 3 1 2 3 0 8 0 amappl1 72 302398 0 301959 23 13 10 19 0 8 0 amappl 80 32522 0 32484 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 148 0 19 3 0 3 3 0 8 0 uaddrrnd 24 11061 0 11045 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 11061 0 11045 1 0 1 1 0 8 0 vmmpekpl 168 93761 0 93731 3 0 3 3 0 8 0 vmmpepl 168 1416852 0 1415258 319 234 85 93 0 357 11 vmsppl 368 11060 0 11045 2 0 2 2 0 8 0 pdppl 4096 22129 0 22090 7 1 6 6 0 8 0 pvpl 32 3259692 0 3249484 516 396 120 146 0 265 21 pmappl 232 11060 0 11045 24 23 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 640 0 35 18 0 18 18 0 8 0