witness: userret: returning with the following locks held: exclusive rwlock solock r = 0 (0xfffffd806a57ba10) #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 *273641 43041 32767 0x10 0x4000000 0 syz-executor.7 26480 6807 73 0x1100010 0 1K 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(ffff8000261d8fd0) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff800024d56050) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff800024d56050) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x564d259ec60, 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(ffff8000261d8fd0) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff800024d56050) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff800024d56050) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x564d259ec60, count: -6 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800024d55d80 rbx 0xffffffff82926bb7 cpu_info_full_primary+0x2bb7 rdx 0xffff800000bf74c0 rcx 0 rax 0xffff8000261d8fd0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xffff800024d55b20 r11 0x33df6bd45d6bc92c r12 0xffffffff829269b8 cpu_info_full_primary+0x29b8 r13 0 r14 0 r15 0x1 rip 0xffffffff81844108 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800024d55d70 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.7) pid=273641 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000261d97b0,0xffff8000261d8d40 process=0xffff8000ffff3618 user=0xffff800024d51000, vmspace=0xfffffd8071aaca20 estcpu=36, cpticks=5, pctcpu=0.0 user=0, sys=5, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 43041 455293 47768 32767 2 0x10 syz-executor.7 *43041 273641 47768 32767 7 0x4000010 syz-executor.7 77429 321062 77619 32767 2 0x10 syz-executor.2 77429 46209 77619 32767 2 0x4000010 syz-executor.2 15128 157123 82343 32767 3 0x90 piperd syz-executor.6 82343 214549 82064 0 3 0x82 wait syz-executor.6 55514 335274 59087 32767 3 0x90 piperd syz-executor.1 59087 339871 82064 0 3 0x82 wait syz-executor.1 13817 280086 0 0 3 0x14200 bored sosplice 77619 169826 34585 32767 2 0x490 syz-executor.2 34585 126591 82064 0 3 0x82 wait syz-executor.2 79382 69333 19848 32767 2 0x490 syz-executor.5 19848 75133 82064 0 3 0x82 wait syz-executor.5 47768 214899 35078 32767 3 0x90 nanoslp syz-executor.7 35078 78710 82064 0 3 0x82 wait syz-executor.7 42709 191667 97420 32767 3 0x90 piperd syz-executor.4 57447 509252 40158 32767 3 0x90 piperd syz-executor.3 97420 451058 82064 0 3 0x82 wait syz-executor.4 40158 56985 82064 0 3 0x82 wait syz-executor.3 29441 359048 90995 32767 3 0x90 piperd syz-executor.0 90995 492929 82064 0 3 0x82 wait syz-executor.0 82064 489930 72706 0 3 0x82 thrsleep syz-fuzzer 82064 512373 72706 0 3 0x4000082 thrsleep syz-fuzzer 82064 18680 72706 0 3 0x4000082 thrsleep syz-fuzzer 82064 489037 72706 0 3 0x4000082 thrsleep syz-fuzzer 82064 350104 72706 0 3 0x4000082 thrsleep syz-fuzzer 82064 283616 72706 0 2 0x4000082 syz-fuzzer 82064 50051 72706 0 3 0x4000082 thrsleep syz-fuzzer 82064 146016 72706 0 3 0x4000082 thrsleep syz-fuzzer 82064 498681 72706 0 3 0x4000082 thrsleep syz-fuzzer 72706 64828 68769 0 3 0x10008a sigsusp ksh 68769 279161 12468 0 3 0x9a kqread sshd 15209 254699 1 0 3 0x100083 ttyin getty 12468 482038 1 0 3 0x88 kqread sshd 6807 26480 47681 73 7 0x1100010 syslogd 47681 411911 1 0 3 0x100082 netio syslogd 7705 97282 1 0 3 0x100080 kqread resolvd 8098 40559 59357 77 3 0x100092 kqread dhcpleased 33306 36229 59357 77 3 0x100092 kqread dhcpleased 59357 171255 1 0 3 0x80 kqread dhcpleased 45060 88561 0 0 3 0x14200 bored smr 3557 96492 0 0 2 0x14200 zerothread 82404 303298 0 0 3 0x14200 aiodoned aiodoned 44774 79905 0 0 3 0x14200 syncer update 99215 338913 0 0 3 0x14200 cleaner cleaner 58096 230448 0 0 3 0x14200 reaper reaper 42778 131666 0 0 3 0x14200 pgdaemon pagedaemon 53851 421454 0 0 3 0x14200 bored viomb 70305 8835 0 0 3 0x40014200 acpi0 acpi0 20137 519833 0 0 3 0x40014200 idle1 67214 85000 0 0 3 0x14200 bored softnet 81146 450817 0 0 3 0x14200 bored softnet 39847 459947 0 0 3 0x14200 bored softnet 45602 145848 0 0 3 0x14200 bored softnet 97196 407228 0 0 3 0x14200 bored systqmp 59405 276869 0 0 3 0x14200 bored systq 47136 299710 0 0 2 0x40014200 softclock 19674 521964 0 0 3 0x40014200 idle0 1 207866 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 43041 (syz-executor.7) thread 0xffff8000261d8fd0 (273641) exclusive rwlock solock r = 0 (0xfffffd806a57ba10) #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 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10178 6408K 6420K 78643K 11295 0 pcb 13 8K 8K 78643K 13 0 rtable 236 6K 6K 78643K 634 0 ifaddr 81 17K 17K 78643K 146 0 sysctl 2 0K 0K 78643K 2 0 counters 56 35K 35K 78643K 74 0 ioctlops 0 0K 2K 78643K 50 0 iov 0 0K 16K 78643K 66 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1270 79K 79K 78643K 1438 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 17K 78643K 25 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 61 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 20 73K 106K 78643K 1355 0 sigio 0 0K 0K 78643K 64 0 proc 56 78K 114K 78643K 744 0 subproc 104 6K 6K 78643K 221 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 81 0 in_multi 99 6K 7K 78643K 232 0 ether_multi 1 0K 0K 78643K 5 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 67 307K 307K 78643K 67 0 exec 0 0K 2K 78643K 861 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 191 76K 77K 78643K 7931 0 UVM aobj 41 2K 2K 78643K 45 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 49 0 NDP 11 0K 2K 78643K 54 0 temp 123 4722K 4787K 78643K 6867 0 kqueue 12 18K 24K 78643K 112 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 77 0 74 1 0 1 1 0 8 0 rtentry 112 211 0 100 4 0 4 4 0 8 0 unpcb 144 220 0 205 1 0 1 1 0 8 0 syncache 296 43 0 43 2 1 1 1 0 8 1 tcpqe 32 48 0 48 2 1 1 1 0 8 1 tcpcb 736 248 0 244 9 6 3 7 0 8 2 arp 120 37 0 18 1 0 1 1 0 8 0 inpcb 320 595 0 583 2 0 2 2 0 8 0 ip6q 72 7 0 7 1 0 1 1 0 8 1 ip6af 40 21 0 21 1 0 1 1 0 8 1 nd6 48 51 0 27 1 0 1 1 0 8 0 kcovpl 48 17 0 9 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 858 0 402 29 0 29 29 0 8 0 art_table 32 859 0 402 4 0 4 4 0 8 0 art_node 16 210 0 109 1 0 1 1 0 8 0 sysvmsgpl 40 69 0 69 1 1 0 1 0 8 0 semapl 112 59 0 49 1 0 1 1 0 8 0 shmpl 112 42 0 4 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2809 0 1351 92 0 92 92 0 8 0 ffsino 272 2809 0 1351 98 0 98 98 0 8 0 nchpl 144 4559 0 2923 64 0 64 64 0 8 0 uvmvnodes 80 3039 0 0 63 0 63 63 0 8 0 vnodes 224 3039 0 0 179 0 179 179 0 8 0 namei 1024 13888 0 13888 2 1 1 2 0 8 1 percpumem 16 49 0 9 1 0 1 1 0 8 0 kstatmem 264 40 0 18 2 0 2 2 0 8 0 scxspl 216 14111 0 14110 11 8 3 8 0 8 2 plimitpl 152 116 0 94 1 0 1 1 0 8 0 sigapl 424 1615 0 1565 7 0 7 7 0 8 0 futexpl 64 7362 0 7362 1 0 1 1 0 8 1 knotepl 120 116 0 0 4 0 4 4 0 8 0 kqueuepl 224 241 0 233 1 0 1 1 0 8 0 pipepl 336 269 0 241 4 1 3 4 0 8 0 fdescpl 496 1597 0 1566 7 1 6 6 0 8 0 filepl 152 5161 0 4926 11 1 10 11 0 8 0 lockfpl 104 22 0 20 1 0 1 1 0 8 0 lockfspl 48 12 0 10 1 0 1 1 0 8 0 sessionpl 144 32 0 16 1 0 1 1 0 8 0 pgrppl 48 37 0 21 1 0 1 1 0 8 0 ucredpl 104 769 0 751 1 0 1 1 0 8 0 zombiepl 144 1566 0 1565 1 0 1 1 0 8 0 processpl 1064 1615 0 1565 4 0 4 4 0 8 0 procpl 672 2826 0 2766 10 4 6 7 0 8 0 sosppl 168 6 0 6 1 0 1 1 0 8 1 sockpl 504 892 0 864 5 0 5 5 0 8 0 mcl64k 65536 12 0 0 2 0 2 2 0 8 0 mcl16k 16384 8 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 7 0 0 1 0 1 1 0 8 0 mcl4k 4096 13 0 0 2 0 2 2 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 148 0 0 16 0 16 16 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 516 0 0 31 0 31 31 0 8 0 bufpl 288 5933 0 145 414 0 414 414 0 8 0 anonpl 24 239509 0 231979 56 3 53 53 0 186 2 amapchunkpl 152 20859 0 20423 24 3 21 22 0 158 0 amappl16 200 2843 0 2660 14 2 12 12 0 8 2 amappl15 192 117 0 112 1 0 1 1 0 8 0 amappl14 184 8 0 7 1 0 1 1 0 8 0 amappl13 176 206 0 203 1 0 1 1 0 8 0 amappl12 168 7 0 5 1 0 1 1 0 8 0 amappl11 160 288 0 272 1 0 1 1 0 8 0 amappl10 152 529 0 520 1 0 1 1 0 8 0 amappl9 144 652 0 646 1 0 1 1 0 8 0 amappl8 136 799 0 755 2 0 2 2 0 8 0 amappl7 128 276 0 262 1 0 1 1 0 8 0 amappl6 120 453 0 436 2 1 1 2 0 8 0 amappl5 112 1503 0 1476 2 0 2 2 0 8 1 amappl4 104 1388 0 1359 2 0 2 2 0 8 0 amappl3 96 3422 0 3378 2 0 2 2 0 8 0 amappl2 88 1973 0 1909 3 1 2 3 0 8 0 amappl1 80 37347 0 36723 19 3 16 19 0 8 1 amappl 88 7378 0 7250 5 1 4 4 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 44 0 4 1 0 1 1 0 8 0 uaddrrnd 24 1597 0 1566 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1597 0 1566 1 0 1 1 0 8 0 vmmpekpl 168 14253 0 14198 3 0 3 3 0 8 0 vmmpepl 168 150979 0 148877 121 5 116 116 0 357 10 vmsppl 368 1596 0 1566 4 0 4 4 0 8 0 rwobjpl 56 37624 0 33479 60 0 60 60 0 8 0 pdppl 4096 3201 0 3132 147 66 81 87 0 8 12 pvpl 32 678239 0 666004 252 44 208 252 0 265 93 pmappl 248 1596 0 1566 4 1 3 3 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 864 0 76 23 0 23 23 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(ffff8000261d8fd0) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff800024d56050) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff800024d56050) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x564d259ec60, count: -6 ddb{0}> machine ddbcpu 1