witness: userret: returning with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd8069293c58) #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 *309969 36822 32767 0x10 0x4000000 1 syz-executor.1 76450 11767 32767 0x10 0x480 0 syz-executor.1 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,ffffffff822097ec) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff822097ec) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020a89650) at userret+0x36a sys/kern/kern_sig.c:1916 syscall(ffff800024f6d380) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800024f6d380) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,16,ffffffffffffff87,0,4,bcbd38291b0) at Xsyscall+0x128 end of kernel end trace frame: 0xbce8d2b3030, 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,ffffffff822097ec) at witness_warn+0x69e witness_debugger sys/kern/subr_witness.c:2509 [inline] witness_warn(2,0,ffffffff822097ec) at witness_warn+0x69e sys/kern/subr_witness.c:1454 userret(ffff800020a89650) at userret+0x36a sys/kern/kern_sig.c:1916 syscall(ffff800024f6d380) at syscall+0x44a mi_syscall_return sys/sys/syscall_mi.h:115 [inline] syscall(ffff800024f6d380) at syscall+0x44a sys/arch/amd64/amd64/trap.c:577 Xsyscall(6,16,ffffffffffffff87,0,4,bcbd38291b0) at Xsyscall+0x128 end of kernel end trace frame: 0xbce8d2b3030, count: -6 ddb{1}> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800024f6d0c0 rbx 0xffff800024f6d170 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800023164000 rax 0xffff800000ac56c0 r8 0xffffffff81b4c2a3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x792fee0023f64c15 r12 0x3000000008 r13 0xffff800024f6d0d0 r14 0x100 r15 0x1 rip 0xffffffff82139998 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800024f6d0b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=309969 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020a889f8,0xffffffff82622ea8 process=0xffff800020a8b890 user=0xffff800024f68000, vmspace=0xfffffd807f00b8a0 estcpu=36, cpticks=4, pctcpu=0.0 user=0, sys=4, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 36822 376079 11767 32767 2 0x10 syz-executor.1 36822 183288 11767 32767 3 0x4000090 fsleep syz-executor.1 36822 158946 11767 32767 2 0x4000010 syz-executor.1 *36822 309969 11767 32767 7 0x4000010 syz-executor.1 87443 422884 47316 32767 3 0x90 piperd syz-executor.0 47316 500549 13750 0 3 0x82 wait syz-executor.0 11767 76450 44763 32767 7 0x490 syz-executor.1 44763 51910 13750 0 3 0x82 wait syz-executor.1 74847 103737 0 0 3 0x14200 bored sosplice 13750 370233 58592 0 3 0x82 thrsleep syz-fuzzer 13750 454762 58592 0 3 0x4000082 thrsleep syz-fuzzer 13750 118221 58592 0 3 0x4000082 thrsleep syz-fuzzer 13750 415199 58592 0 2 0x4000082 syz-fuzzer 13750 443947 58592 0 3 0x4000082 thrsleep syz-fuzzer 13750 236577 58592 0 3 0x4000082 thrsleep syz-fuzzer 13750 479823 58592 0 3 0x4000082 thrsleep syz-fuzzer 13750 346578 58592 0 3 0x4000082 thrsleep syz-fuzzer 13750 284584 58592 0 3 0x4000082 thrsleep syz-fuzzer 13750 56934 58592 0 3 0x4000082 thrsleep syz-fuzzer 58592 187935 67656 0 3 0x10008a pause ksh 67656 201990 23071 0 3 0x92 select sshd 382 454323 1 0 3 0x100083 ttyin getty 23071 287021 1 0 3 0x80 select sshd 87614 374877 4355 73 2 0x100090 syslogd 4355 168406 1 0 3 0x100082 netio syslogd 77536 458346 1 77 3 0x100090 poll dhclient 40529 85383 1 0 3 0x80 poll dhclient 14768 334775 0 0 3 0x14200 pgzero zerothread 9456 307424 0 0 3 0x14200 aiodoned aiodoned 25214 449691 0 0 3 0x14200 syncer update 92947 334504 0 0 3 0x14200 cleaner cleaner 41637 232812 0 0 3 0x14200 reaper reaper 52706 441683 0 0 3 0x14200 pgdaemon pagedaemon 72540 210068 0 0 3 0x14200 bored crynlk 38361 88600 0 0 3 0x14200 bored crypto 6806 74909 0 0 3 0x40014200 acpi0 acpi0 54522 98203 0 0 3 0x40014200 idle1 29534 114907 0 0 3 0x14200 bored softnet 12830 435774 0 0 3 0x14200 bored systqmp 5449 105880 0 0 3 0x14200 bored systq 69889 14755 0 0 3 0x40014200 bored softclock 13324 106198 0 0 3 0x40014200 idle0 63532 73247 0 0 3 0x14200 bored smr 1 305178 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 36822 (syz-executor.1) thread 0xffff800020a89650 (309969) exclusive rrwlock inode r = 0 (0xfffffd8069293c58) #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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9464 6322K 6322K 78643K 12121 0 0 pcb 13 8K 8K 78643K 13 0 0 rtable 105 3K 3K 78643K 14379 0 0 ifaddr 37 18K 20K 78643K 1954 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 793 0 0 iov 0 0K 32K 78643K 1337 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 76K 78643K 9148 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 236 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 1952 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 7 21K 33K 78643K 17675 0 0 sigio 0 0K 0K 78643K 146 0 0 proc 41 38K 70K 78643K 14714 0 0 subproc 34 2K 2K 78643K 5372 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 2092 0 0 in_multi 33 2K 2K 78643K 4054 0 0 ether_multi 1 0K 0K 78643K 127 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 5320 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 107 22K 31K 78643K 58296 0 0 UVM aobj 130 4K 4K 78643K 143 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 1176 0 0 NDP 5 0K 0K 78643K 951 0 0 temp 121 3554K 3634K 78643K 76682 0 0 kqueue 0 0K 0K 78643K 216 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 638 0 632 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 1573 0 1571 1 0 1 1 0 8 0 rtentry 112 3503 0 3459 2 0 2 2 0 8 0 unpcb 120 6612 0 6604 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 3936 0 3936 2 2 0 1 0 8 0 tcpcb 544 4143 0 4139 1 0 1 1 0 8 0 ipq 40 20 0 20 15 15 0 1 0 8 0 ipqe 40 40 0 40 15 15 0 1 0 8 0 inpcb 280 9856 0 9845 17 15 2 2 0 8 1 nd6 48 948 0 942 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 14287 0 14093 24 11 13 13 0 8 0 art_table 32 14288 0 14093 2 0 2 2 0 8 0 art_node 16 3502 0 3462 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 5 1 0 1 1 0 8 0 semapl 112 1949 0 1939 1 0 1 1 0 8 0 shmpl 112 141 0 13 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 19529 0 18064 53 5 48 48 0 8 0 ffsino 272 19529 0 18064 103 5 98 99 0 8 0 nchpl 144 40204 0 38575 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 172793 0 172793 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 108912 0 108912 56 55 1 7 0 8 1 plimitpl 152 3141 0 3132 1 0 1 1 0 8 0 sigapl 432 16904 0 16889 13 11 2 3 0 8 0 futexpl 56 169221 0 169220 1 0 1 1 0 8 0 knotepl 112 10133 0 10114 1 0 1 1 0 8 0 kqueuepl 104 4040 0 4038 1 0 1 1 0 8 0 pipepl 112 10842 0 10823 23 22 1 2 0 8 0 fdescpl 488 16905 0 16889 3 0 3 3 0 8 0 filepl 152 104702 0 104596 34 29 5 7 0 8 0 lockfpl 104 3017 0 3017 24 23 1 1 0 8 1 lockfspl 48 930 0 930 24 23 1 1 0 8 1 sessionpl 112 331 0 321 1 0 1 1 0 8 0 pgrppl 48 525 0 515 1 0 1 1 0 8 0 ucredpl 96 29824 0 29815 1 0 1 1 0 8 0 zombiepl 144 16889 0 16889 3 2 1 1 0 8 1 processpl 896 16921 0 16889 4 0 4 4 0 8 0 procpl 632 44165 0 44121 53 48 5 5 0 8 1 srpgc 64 628 0 628 49 48 1 1 0 8 1 sosppl 128 337 0 337 64 63 1 1 0 8 1 sockpl 384 18383 0 18366 11 8 3 4 0 8 1 mcl64k 65536 15 0 0 2 0 2 2 0 8 0 mcl16k 16384 32 0 0 4 2 2 3 0 8 0 mcl12k 12288 89 0 0 2 0 2 2 0 8 0 mcl9k 9216 50 0 0 2 1 1 2 0 8 0 mcl8k 8192 31 0 0 4 1 3 3 0 8 0 mcl4k 4096 41 0 0 4 1 3 3 0 8 0 mcl2k2 2112 10 0 0 1 0 1 1 0 8 0 mcl2k 2048 154 0 0 14 5 9 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 989 0 0 14 3 11 12 0 8 0 bufpl 256 33761 0 26747 439 0 439 439 0 8 0 anonpl 16 1796275 0 1788985 320 277 43 58 0 124 0 amapchunkpl 152 134771 0 134678 207 202 5 18 0 158 0 amappl16 192 78335 0 77948 427 403 24 44 0 8 0 amappl15 184 2094 0 2092 38 37 1 1 0 8 0 amappl14 176 4083 0 4076 1 0 1 1 0 8 0 amappl13 168 2442 0 2441 34 33 1 1 0 8 0 amappl12 160 1849 0 1846 1 0 1 1 0 8 0 amappl11 152 3397 0 3386 1 0 1 1 0 8 0 amappl10 144 2648 0 2640 2 1 1 1 0 8 0 amappl9 136 6317 0 6314 1 0 1 1 0 8 0 amappl8 128 4999 0 4963 6 4 2 2 0 8 0 amappl7 120 2928 0 2915 1 0 1 1 0 8 0 amappl6 112 2615 0 2608 1 0 1 1 0 8 0 amappl5 104 4095 0 4084 1 0 1 1 0 8 0 amappl4 96 16572 0 16536 2 1 1 2 0 8 0 amappl3 88 4018 0 4008 1 0 1 1 0 8 0 amappl2 80 111115 0 111048 4 2 2 3 0 8 0 amappl1 72 459009 0 458566 40 31 9 19 0 8 0 amappl 80 49546 0 49508 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 142 0 13 3 0 3 3 0 8 0 uaddrrnd 24 16905 0 16889 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 16905 0 16889 1 0 1 1 0 8 0 vmmpekpl 168 137834 0 137802 2 0 2 2 0 8 0 vmmpepl 168 2161537 0 2159931 441 362 79 97 0 357 2 vmsppl 368 16904 0 16889 2 0 2 2 0 8 0 pdppl 4096 33817 0 33778 6 0 6 6 0 8 0 pvpl 32 4880607 0 4870077 772 669 103 151 0 265 3 pmappl 232 16904 0 16889 32 31 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 626 0 32 18 0 18 18 0 8 0