witness: userret: returning with the following locks held: exclusive rwlock solock r = 0 (0xfffffd806f095bf0) #0 witness_lock+0x44d #1 unp_solock_peer+0xa6 sys/kern/uipc_usrreq.c:163 #2 uipc_usrreq+0x7c6 sys/kern/uipc_usrreq.c:350 #3 sosend+0x61b sys/kern/uipc_socket.c:657 #4 sendit+0x65d sys/kern/uipc_syscalls.c:682 #5 sys_sendmsg+0x198 sys/kern/uipc_syscalls.c:589 #6 syscall+0x4c3 mi_syscall sys/sys/syscall_mi.h:101 [inline] #6 syscall+0x4c3 sys/arch/amd64/amd64/trap.c:585 #7 Xsyscall+0x128 panic: witness_warn Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 69239 11336 0 0x2 0 0 syz-executor2996160033 357086 41198 73 0x1100010 0 1 syslogd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82595df3) at panic+0x177 sys/kern/subr_prf.c:202 witness_warn(2,0,ffffffff8262507e) at witness_warn+0x65e witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_warn(2,0,ffffffff8262507e) at witness_warn+0x65e sys/kern/subr_witness.c:1473 userret(ffff800021233a48) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff8000212be700) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff8000212be700) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffec000, 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 *cpu0: witness_warn ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82595df3) at panic+0x177 sys/kern/subr_prf.c:202 witness_warn(2,0,ffffffff8262507e) at witness_warn+0x65e witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_warn(2,0,ffffffff8262507e) at witness_warn+0x65e sys/kern/subr_witness.c:1473 userret(ffff800021233a48) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff8000212be700) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff8000212be700) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffec000, count: -6 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000212be430 rbx 0xffffffff82926bb7 cpu_info_full_primary+0x2bb7 rdx 0x3fd rcx 0 rax 0x14 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3b9d0078653f3133 r11 0x1d06c59f56b81ce0 r12 0xffffffff829269b8 cpu_info_full_primary+0x29b8 r13 0 r14 0 r15 0x1 rip 0xffffffff81844108 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000212be420 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor2996160033) pid=69239 stat=onproc flags process=2 proc=0 pri=50, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800021233ce8,0xffffffff82b7b3a8 process=0xffff8000ffff0860 user=0xffff8000212b9000, vmspace=0xfffffd800874e2e0 estcpu=1, cpticks=4, pctcpu=0.0 user=0, sys=4, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *11336 69239 88219 0 7 0x2 syz-executor2996160033 88219 82384 51055 0 3 0x10008a sigsusp ksh 51055 411509 73529 0 3 0x9a kqread sshd 35363 170086 1 0 3 0x100083 ttyin getty 73529 205041 1 0 3 0x88 kqread sshd 41198 357086 2767 73 7 0x1100010 syslogd 2767 242491 1 0 3 0x100082 netio syslogd 10916 132184 1 0 3 0x100080 kqread resolvd 46427 175544 20176 77 3 0x100092 kqread dhcpleased 47023 357863 20176 77 3 0x100092 kqread dhcpleased 20176 130016 1 0 3 0x80 kqread dhcpleased 89480 268149 0 0 3 0x14200 bored smr 59247 499002 0 0 3 0x14200 pgzero zerothread 24555 423097 0 0 3 0x14200 aiodoned aiodoned 5932 379787 0 0 3 0x14200 syncer update 64409 458638 0 0 3 0x14200 cleaner cleaner 75929 447553 0 0 3 0x14200 reaper reaper 62722 309067 0 0 3 0x14200 pgdaemon pagedaemon 84242 490718 0 0 3 0x14200 bored viomb 81585 50006 0 0 3 0x40014200 acpi0 acpi0 25467 23247 0 0 3 0x40014200 idle1 13730 106644 0 0 3 0x14200 bored softnet 52033 128346 0 0 3 0x14200 bored softnet 10917 20714 0 0 3 0x14200 bored softnet 31101 164405 0 0 3 0x14200 bored softnet 68605 267421 0 0 3 0x14200 bored systqmp 70836 181527 0 0 3 0x14200 bored systq 51903 459701 0 0 2 0x40014200 softclock 18035 68147 0 0 3 0x40014200 idle0 1 95815 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 11336 (syz-executor2996160033) thread 0xffff800021233a48 (69239) exclusive rwlock solock r = 0 (0xfffffd806f095bf0) #0 witness_lock+0x44d #1 unp_solock_peer+0xa6 sys/kern/uipc_usrreq.c:163 #2 uipc_usrreq+0x7c6 sys/kern/uipc_usrreq.c:350 #3 sosend+0x61b sys/kern/uipc_socket.c:657 #4 sendit+0x65d sys/kern/uipc_syscalls.c:682 #5 sys_sendmsg+0x198 sys/kern/uipc_syscalls.c:589 #6 syscall+0x4c3 mi_syscall sys/sys/syscall_mi.h:101 [inline] #6 syscall+0x4c3 sys/arch/amd64/amd64/trap.c:585 #7 Xsyscall+0x128 Process 41198 (syslogd) thread 0xffff8000ffff7cf0 (357086) exclusive rrwlock inode r = 0 (0xfffffd806e6efc50) #0 witness_lock+0x44d #1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310 #2 rrw_enter+0x8b sys/kern/kern_rwlock.c:465 #3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:518 #4 vn_lock+0x84 sys/kern/vfs_vnops.c:567 #5 sys_fsync+0xf5 sys/kern/vfs_syscalls.c:2939 #6 syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] #6 syscall+0x435 sys/arch/amd64/amd64/trap.c:585 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10146 6388K 6420K 78643K 11236 0 pcb 13 8K 8K 78643K 13 0 rtable 58 1K 2K 78643K 104 0 ifaddr 24 7K 7K 78643K 24 0 counters 40 33K 33K 78643K 40 0 ioctlops 0 0K 2K 78643K 25 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1166 73K 73K 78643K 1179 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 1K 1K 78643K 2 0 sem 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 1 0K 0K 78643K 1 0 proc 55 78K 79K 78643K 226 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 11 0K 0K 78643K 11 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 25 122K 122K 78643K 25 0 exec 0 0K 2K 78643K 391 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 52 2K 4K 78643K 1402 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 3 0K 0K 78643K 3 0 temp 18 4709K 4773K 78643K 2268 0 kqueue 11 16K 18K 78643K 24 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 17 0 14 1 0 1 1 0 8 0 rtentry 112 23 0 1 1 0 1 1 0 8 0 unpcb 144 35 0 20 1 0 1 1 0 8 0 syncache 296 5 0 5 2 1 1 1 0 8 1 tcpcb 736 8 0 5 1 0 1 1 0 8 0 arp 120 2 0 0 1 0 1 1 0 8 0 inpcb 320 25 0 19 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 96 0 0 6 0 6 6 0 8 0 art_table 32 97 0 0 1 0 1 1 0 8 0 art_node 16 22 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1416 0 38 87 0 87 87 0 8 0 ffsino 272 1416 0 38 92 0 92 92 0 8 0 nchpl 144 1603 0 47 58 0 58 58 0 8 0 uvmvnodes 80 1425 0 0 30 0 30 30 0 8 0 vnodes 224 1425 0 0 84 0 84 84 0 8 0 namei 1024 4175 0 4175 2 1 1 1 0 8 1 percpumem 16 32 0 0 1 0 1 1 0 8 0 kstatmem 264 6 0 0 1 0 1 1 0 8 0 scxspl 216 3774 0 3774 2 1 1 2 0 8 1 plimitpl 152 15 0 9 1 0 1 1 0 8 0 sigapl 424 295 0 265 4 0 4 4 0 8 0 knotepl 120 52 0 0 2 0 2 2 0 8 0 kqueuepl 224 20 0 13 1 0 1 1 0 8 0 pipepl 336 79 0 76 2 1 1 1 0 8 0 fdescpl 496 278 0 265 3 1 2 3 0 8 0 filepl 152 1045 0 990 3 0 3 3 0 8 0 lockfpl 104 6 0 4 1 0 1 1 0 8 0 lockfspl 48 4 0 2 1 0 1 1 0 8 0 sessionpl 144 17 0 9 1 0 1 1 0 8 0 pgrppl 48 17 0 9 1 0 1 1 0 8 0 ucredpl 104 64 0 54 1 0 1 1 0 8 0 zombiepl 144 265 0 265 2 1 1 1 0 8 1 processpl 1064 295 0 265 3 0 3 3 0 8 0 procpl 672 295 0 265 3 0 3 3 0 8 0 sockpl 504 77 0 53 3 0 3 3 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 65 0 0 9 0 9 9 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 106 0 0 7 0 7 7 0 8 0 bufpl 288 1936 0 91 132 0 132 132 0 8 0 anonpl 24 34966 0 33191 14 2 12 13 0 186 1 amapchunkpl 152 2539 0 2452 5 1 4 5 0 158 0 amappl16 200 86 0 81 1 0 1 1 0 8 0 amappl13 176 32 0 31 2 1 1 1 0 8 0 amappl12 168 3 0 3 2 1 1 1 0 8 1 amappl11 160 60 0 47 1 0 1 1 0 8 0 amappl10 152 1 0 1 1 1 0 1 0 8 0 amappl9 144 481 0 479 1 0 1 1 0 8 0 amappl8 136 333 0 332 2 1 1 1 0 8 0 amappl7 128 48 0 45 1 0 1 1 0 8 0 amappl6 120 93 0 83 1 0 1 1 0 8 0 amappl5 112 83 0 74 1 0 1 1 0 8 0 amappl4 104 566 0 547 1 0 1 1 0 8 0 amappl3 96 371 0 351 1 0 1 1 0 8 0 amappl2 88 417 0 379 1 0 1 1 0 8 0 amappl1 80 8682 0 8309 10 1 9 9 0 8 0 amappl 88 1149 0 1113 2 1 1 2 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 278 0 265 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 278 0 265 1 0 1 1 0 8 0 vmmpekpl 168 5980 0 5966 1 0 1 1 0 8 0 vmmpepl 168 24858 0 24081 39 1 38 38 0 357 2 vmsppl 368 277 0 265 2 0 2 2 0 8 0 rwobjpl 56 9020 0 7075 29 0 29 29 0 8 0 pdppl 4096 563 0 530 46 13 33 41 0 8 0 pvpl 32 115769 0 112140 34 1 33 33 0 265 1 pmappl 248 277 0 265 2 1 1 2 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 398 0 17 11 0 11 11 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82595df3) at panic+0x177 sys/kern/subr_prf.c:202 witness_warn(2,0,ffffffff8262507e) at witness_warn+0x65e witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_warn(2,0,ffffffff8262507e) at witness_warn+0x65e sys/kern/subr_witness.c:1473 userret(ffff800021233a48) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff8000212be700) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff8000212be700) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffec000, count: -6 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020dd8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0xb sys/dev/kcov.c:144 __mp_acquire_count(ffffffff829fb820,1) at __mp_acquire_count+0x48 sys/kern/kern_lock.c:227 mi_switch() at mi_switch+0x3bb sys/kern/sched_bsd.c:416 sleep_finish(ffff8000212b84a0,1) at sleep_finish+0x180 sys/kern/kern_synch.c:420 tsleep(fffffd806e8c6530,11,ffffffff825af94c,0) at tsleep+0x12c sys/kern/kern_synch.c:158 vwaitforio(fffffd806e8c64b0,0,ffffffff825af94c,ffffffffffffffff) at vwaitforio+0x98 sys/kern/vfs_subr.c:1897 ffs_fsync(ffff8000212b85f0) at ffs_fsync+0x38e sys/ufs/ffs/ffs_vnops.c:495 VOP_FSYNC(fffffd806e8c64b0,fffffd807f7d7958,1,ffff8000ffff7cf0) at VOP_FSYNC+0xce sys/kern/vfs_vops.c:311 sys_fsync(ffff8000ffff7cf0,ffff8000212b86e0,ffff8000212b8730) at sys_fsync+0x109 sys/kern/vfs_syscalls.c:2939 syscall(ffff8000212b87b0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000212b87b0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe4340, count: 1 ddb{1}> trace x86_ipi_db(ffff800020dd8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0xb sys/dev/kcov.c:144 __mp_acquire_count(ffffffff829fb820,1) at __mp_acquire_count+0x48 sys/kern/kern_lock.c:227 mi_switch() at mi_switch+0x3bb sys/kern/sched_bsd.c:416 sleep_finish(ffff8000212b84a0,1) at sleep_finish+0x180 sys/kern/kern_synch.c:420 tsleep(fffffd806e8c6530,11,ffffffff825af94c,0) at tsleep+0x12c sys/kern/kern_synch.c:158 vwaitforio(fffffd806e8c64b0,0,ffffffff825af94c,ffffffffffffffff) at vwaitforio+0x98 sys/kern/vfs_subr.c:1897 ffs_fsync(ffff8000212b85f0) at ffs_fsync+0x38e sys/ufs/ffs/ffs_vnops.c:495 VOP_FSYNC(fffffd806e8c64b0,fffffd807f7d7958,1,ffff8000ffff7cf0) at VOP_FSYNC+0xce sys/kern/vfs_vops.c:311 sys_fsync(ffff8000ffff7cf0,ffff8000212b86e0,ffff8000212b8730) at sys_fsync+0x109 sys/kern/vfs_syscalls.c:2939 syscall(ffff8000212b87b0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000212b87b0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe4340, count: -14 ddb{1}>