witness: userret: returning with the following locks held: exclusive rwlock solock r = 0 (0xfffffd8069868de8) #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 262175 40668 32767 0x10 0 0 syz-executor.2 *152375 99614 32767 0x10 0x4000000 1 syz-executor.0 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(ffff8000fffec008) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff80002e478ef0) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff80002e478ef0) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x72237895510, 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 *cpu1: witness_warn ddb{1}> 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(ffff8000fffec008) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff80002e478ef0) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff80002e478ef0) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x72237895510, count: -6 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002e478c20 rbx 0xffff800020dd9bb7 rdx 0xffff800000bcb200 rcx 0 rax 0xffff8000fffec008 r8 0x101010101010101 r9 0x8080808080808080 r10 0x694fa8d78b8d211a r11 0xe67115fad6441bcd r12 0xffff800020dd99b8 r13 0 r14 0 r15 0x1 rip 0xffffffff81844108 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e478c10 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=152375 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=84, nice=20 forw=0xffffffffffffffff, list=0xffff8000fffec7e8,0xffff8000fffec2b8 process=0xffff8000ffff2dc8 user=0xffff80002e473000, vmspace=0xfffffd806ef3f458 estcpu=34, cpticks=5, pctcpu=0.0 user=0, sys=4, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 40668 262175 62450 32767 7 0x10 syz-executor.2 40668 63736 62450 32767 2 0x4000090 syz-executor.2 40668 170139 62450 32767 2 0x4000090 syz-executor.2 53354 510112 13829 32767 2 0x10 syz-executor.4 53354 66008 13829 32767 2 0x4000090 syz-executor.4 53354 418719 13829 32767 2 0x4000010 syz-executor.4 4464 519616 69809 32767 2 0x10 syz-executor.7 4464 174682 69809 32767 3 0x4000090 fsleep syz-executor.7 4464 170458 69809 32767 3 0x4000090 fsleep syz-executor.7 44736 313612 20960 32767 2 0x10 syz-executor.5 44736 502372 20960 32767 3 0x4000090 fsleep syz-executor.5 21160 257700 62631 32767 2 0x10 syz-executor.3 21160 453757 62631 32767 3 0x4000090 fsleep syz-executor.3 21160 143128 62631 32767 3 0x4000090 fsleep syz-executor.3 99614 300513 76677 32767 2 0x10 syz-executor.0 *99614 152375 76677 32767 7 0x4000010 syz-executor.0 69809 375271 38361 32767 2 0x490 syz-executor.7 38361 441254 15321 0 3 0x82 wait syz-executor.7 62631 233243 87228 32767 2 0x490 syz-executor.3 87228 198247 15321 0 3 0x82 wait syz-executor.3 34650 261248 79743 32767 2 0x10 syz-executor.6 79743 344821 15321 0 3 0x82 wait syz-executor.6 20960 251430 86786 32767 2 0x490 syz-executor.5 86786 150761 15321 0 3 0x82 wait syz-executor.5 76677 65679 45417 32767 3 0x90 nanoslp syz-executor.0 45417 19580 15321 0 3 0x82 wait syz-executor.0 62450 6512 82116 32767 2 0x490 syz-executor.2 82116 323053 15321 0 3 0x82 wait syz-executor.2 13829 47822 98802 32767 2 0x490 syz-executor.4 98802 404041 15321 0 3 0x82 wait syz-executor.4 62646 227393 16667 32767 2 0x10 syz-executor.1 16667 425292 15321 0 3 0x82 wait syz-executor.1 31135 472444 0 0 3 0x14200 bored sosplice 15321 210594 88429 0 3 0x82 thrsleep syz-fuzzer 15321 74919 88429 0 2 0x4000082 syz-fuzzer 15321 324008 88429 0 3 0x4000082 thrsleep syz-fuzzer 15321 272174 88429 0 3 0x4000082 thrsleep syz-fuzzer 15321 469617 88429 0 3 0x4000082 thrsleep syz-fuzzer 15321 19294 88429 0 3 0x4000082 thrsleep syz-fuzzer 15321 502438 88429 0 3 0x4000082 kqread syz-fuzzer 15321 244193 88429 0 3 0x4000082 thrsleep syz-fuzzer 88429 455985 4299 0 3 0x10008a sigsusp ksh 4299 268935 24785 0 3 0x9a kqread sshd 56409 506248 1 0 3 0x100083 ttyin getty 24785 195426 1 0 3 0x88 kqread sshd 62300 223049 78992 73 2 0x1100090 syslogd 78992 94412 1 0 3 0x100082 netio syslogd 76671 246780 1 0 3 0x100080 kqread resolvd 72485 307584 28993 77 3 0x100092 kqread dhcpleased 6771 33297 28993 77 3 0x100092 kqread dhcpleased 28993 383799 1 0 3 0x80 kqread dhcpleased 61522 416094 0 0 3 0x14200 bored smr 46857 162627 0 0 2 0x14200 zerothread 75081 361011 0 0 3 0x14200 aiodoned aiodoned 90019 253204 0 0 3 0x14200 syncer update 41303 300796 0 0 3 0x14200 cleaner cleaner 62779 301880 0 0 3 0x14200 reaper reaper 64757 392227 0 0 3 0x14200 pgdaemon pagedaemon 803 196387 0 0 3 0x14200 bored viomb 67589 165971 0 0 3 0x40014200 acpi0 acpi0 23213 136222 0 0 3 0x40014200 idle1 38502 449519 0 0 3 0x14200 bored softnet 10781 453026 0 0 3 0x14200 bored softnet 36481 353683 0 0 3 0x14200 bored softnet 17147 374996 0 0 2 0x14200 softnet 38456 353922 0 0 2 0x14200 systqmp 8297 465100 0 0 3 0x14200 bored systq 5437 98160 0 0 3 0x40014200 bored softclock 96049 378480 0 0 3 0x40014200 idle0 1 234256 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 99614 (syz-executor.0) thread 0xffff8000fffec008 (152375) exclusive rwlock solock r = 0 (0xfffffd8069868de8) #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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10219 6414K 6420K 78643K 11602 0 pcb 13 16K 20K 78643K 19 0 rtable 236 6K 7K 78643K 5563 0 ifaddr 81 18K 18K 78643K 764 0 sysctl 3 1K 5K 78643K 6 0 counters 56 35K 35K 78643K 250 0 ioctlops 0 0K 2K 78643K 576 0 iov 0 0K 44K 78643K 64743 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1271 79K 79K 78643K 12762 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 580 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 14424 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 24 89K 117K 78643K 51351 0 sigio 0 0K 0K 78643K 789 0 proc 59 91K 115K 78643K 7017 0 subproc 104 6K 6K 78643K 1365 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 4708 0 in_multi 99 6K 7K 78643K 1747 0 ether_multi 1 0K 0K 78643K 178 0 mrt 1 0K 0K 78643K 2 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 313 1394K 1394K 78643K 313 0 exec 0 0K 2K 78643K 11362 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 392 89K 108K 78643K 323120 0 UVM aobj 131 8K 8K 78643K 161 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 1536 0 NDP 11 0K 2K 78643K 318 0 temp 125 4726K 4810K 78643K 129666 0 kqueue 12 18K 28K 78643K 4042 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> 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 4531 0 4528 55 54 1 3 0 8 0 rtentry 112 1225 0 1114 4 0 4 4 0 8 0 unpcb 144 53269 0 53254 430 424 6 15 0 8 5 syncache 296 519 0 519 86 86 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 241 0 241 70 70 0 1 0 8 0 tcpcb 736 20201 0 20195 505 500 5 24 0 8 3 arp 120 226 0 208 1 0 1 1 0 8 0 inpcb 320 41488 0 41480 585 580 5 18 0 8 4 ip6q 72 55 0 55 13 13 0 1 0 8 0 ip6af 40 165 0 165 13 13 0 1 0 8 0 nd6 48 348 0 323 1 0 1 1 0 8 0 kcovpl 48 105 0 97 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 4869 0 4406 40 10 30 30 0 8 0 art_table 32 4870 0 4406 4 0 4 4 0 8 0 art_node 16 1224 0 1123 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 11 1 0 1 1 0 8 0 semapl 112 14422 0 14412 1 0 1 1 0 8 0 shmpl 112 158 0 30 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 80713 0 79162 98 0 98 98 0 8 0 ffsino 272 80713 0 79162 104 0 104 104 0 8 0 nchpl 144 158324 0 156678 63 1 62 63 0 8 0 uvmvnodes 80 7725 0 0 158 0 158 158 0 8 0 vnodes 224 7725 0 0 455 0 455 455 0 8 0 namei 1024 558380 0 558380 16 15 1 2 0 8 1 percpumem 16 137 0 97 1 0 1 1 0 8 0 kstatmem 264 216 0 194 2 0 2 2 0 8 0 scxspl 216 478123 0 478123 144 140 4 8 0 8 4 plimitpl 152 10874 0 10851 45 44 1 2 0 8 0 sigapl 424 51437 0 51384 7 0 7 7 0 8 0 futexpl 64 502777 0 502772 17 16 1 1 0 8 0 knotepl 120 2446 0 0 18 2 16 17 0 8 0 kqueuepl 224 17563 0 17555 281 280 1 15 0 8 0 pipepl 336 13541 0 13513 314 308 6 13 0 8 3 fdescpl 496 51419 0 51384 7 2 5 6 0 8 0 filepl 152 405960 0 405720 524 509 15 24 0 8 4 lockfpl 104 31108 0 31106 15 13 2 2 0 8 1 lockfspl 48 13137 0 13135 1 0 1 1 0 8 0 sessionpl 144 120 0 104 1 0 1 1 0 8 0 pgrppl 48 4518 0 4502 1 0 1 1 0 8 0 ucredpl 104 67654 0 67636 1 0 1 1 0 8 0 zombiepl 144 51384 0 51384 1 0 1 1 0 8 1 processpl 1064 51437 0 51384 4 0 4 4 0 8 0 procpl 672 153911 0 153841 69 61 8 8 0 8 1 sosppl 168 889 0 889 70 69 1 1 0 8 1 sockpl 504 100859 0 100831 1973 1961 12 50 0 8 8 mcl64k 65536 81 0 0 4 1 3 3 0 8 0 mcl16k 16384 89 0 0 7 4 3 3 0 8 0 mcl12k 12288 81 0 0 2 0 2 2 0 8 0 mcl9k 9216 33 0 0 3 1 2 2 0 8 0 mcl8k 8192 49 0 0 5 2 3 3 0 8 0 mcl4k 4096 73 0 0 5 2 3 3 0 8 0 mcl2k2 2112 30 0 0 2 0 2 2 0 8 0 mcl2k 2048 647 0 0 20 5 15 19 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 7509 0 0 431 3 428 428 0 8 0 bufpl 288 93332 0 85606 552 0 552 552 0 8 0 anonpl 24 10535858 0 10523389 476 368 108 128 0 186 0 amapchunkpl 152 979557 0 978958 475 442 33 39 0 158 1 amappl16 200 158300 0 157928 647 615 32 47 0 8 8 amappl15 192 3455 0 3451 1 0 1 1 0 8 0 amappl14 184 3657 0 3650 1 0 1 1 0 8 0 amappl13 176 12042 0 12038 1 0 1 1 0 8 0 amappl12 168 11899 0 11892 1 0 1 1 0 8 0 amappl11 160 1582 0 1567 1 0 1 1 0 8 0 amappl10 152 4983 0 4972 1 0 1 1 0 8 0 amappl9 144 12075 0 12071 1 0 1 1 0 8 0 amappl8 136 7952 0 7725 8 0 8 8 0 8 0 amappl7 128 5111 0 5096 1 0 1 1 0 8 0 amappl6 120 12486 0 12461 2 1 1 2 0 8 0 amappl5 112 36292 0 36268 1 0 1 1 0 8 0 amappl4 104 8401 0 8367 2 0 2 2 0 8 0 amappl3 96 175766 0 175699 3 1 2 3 0 8 0 amappl2 88 77962 0 77876 7 4 3 3 0 8 0 amappl1 80 1230215 0 1229492 27 11 16 19 0 8 0 amappl 88 308787 0 308601 5 0 5 5 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 160 0 30 3 0 3 3 0 8 0 uaddrrnd 24 51419 0 51384 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 51419 0 51384 1 0 1 1 0 8 0 vmmpekpl 168 421676 0 421618 4 0 4 4 0 8 0 vmmpepl 168 5155495 0 5152578 677 539 138 155 0 357 0 vmsppl 368 51418 0 51384 4 0 4 4 0 8 0 rwobjpl 56 1269644 0 1260221 207 71 136 137 0 8 0 pdppl 4096 102845 0 102768 1260 1179 81 91 0 8 4 pvpl 32 20129581 0 20111358 1294 1101 193 249 0 265 1 pmappl 248 51418 0 51384 4 1 3 3 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 5345 0 3992 40 0 40 40 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff82925ff0) 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 end of kernel end trace frame: 0x7f7ffffcc480, count: 12 ddb{0}> trace x86_ipi_db(ffffffff82925ff0) 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 end of kernel end trace frame: 0x7f7ffffcc480, count: -3 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x18: addq $0x8,%rsp 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(ffff8000fffec008) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff80002e478ef0) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff80002e478ef0) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x72237895510, count: 9 ddb{1}> 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(ffff8000fffec008) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff80002e478ef0) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff80002e478ef0) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x72237895510, count: -6