witness: userret: returning with the following locks held: exclusive rwlock solock r = 0 (0xfffffd806474a440) #0 witness_lock+0x44d #1 unp_solock_peer+0x64 sys/kern/uipc_usrreq.c:168 #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 *514536 25930 0 0 0x4000000 1 syz-executor.4 188349 90885 0 0 0 0 syz-executor.7 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82593e80) at panic+0x177 sys/kern/subr_prf.c:202 witness_warn(2,0,ffffffff82620d13) at witness_warn+0x65e witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_warn(2,0,ffffffff82620d13) at witness_warn+0x65e sys/kern/subr_witness.c:1473 userret(ffff8000fffe6008) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff80002affe8b0) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff80002affe8b0) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xaf8e7b23360, 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(ffffffff82593e80) at panic+0x177 sys/kern/subr_prf.c:202 witness_warn(2,0,ffffffff82620d13) at witness_warn+0x65e witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_warn(2,0,ffffffff82620d13) at witness_warn+0x65e sys/kern/subr_witness.c:1473 userret(ffff8000fffe6008) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff80002affe8b0) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff80002affe8b0) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xaf8e7b23360, count: -6 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002affe5e0 rbx 0xffff800020dd9bb7 rdx 0xffff800000bf5cc0 rcx 0 rax 0xffff8000fffe6008 r8 0x101010101010101 r9 0x8080808080808080 r10 0x6384f5fb2da41692 r11 0xfcab83a8ca53417b r12 0xffff800020dd99b8 r13 0 r14 0 r15 0x1 rip 0xffffffff81d03c18 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002affe5d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.4) pid=514536 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800021232d28,0xffff8000fffe6d38 process=0xffff800027a00020 user=0xffff80002aff9000, vmspace=0xfffffd8064346cf0 estcpu=36, cpticks=5, pctcpu=0.0 user=0, sys=5, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 25930 182117 44802 0 2 0 syz-executor.4 *25930 514536 44802 0 7 0x4000000 syz-executor.4 11517 134278 76863 0 2 0 syz-executor.6 90885 188349 60717 0 7 0 syz-executor.7 90885 23431 60717 0 2 0x4000000 syz-executor.7 90885 19545 60717 0 3 0x4000080 fsleep syz-executor.7 64682 278479 3010 0 2 0 syz-executor.0 56737 193870 92955 0 2 0x480 syz-executor.5 56737 328132 92955 0 3 0x4000080 fsleep syz-executor.5 56737 249445 92955 0 3 0x4000080 fsleep syz-executor.5 56737 40185 92955 0 3 0x4000080 fsleep syz-executor.5 44076 149112 67154 0 2 0 syz-executor.2 44076 334814 67154 0 3 0x4000080 fsleep syz-executor.2 44076 292592 67154 0 2 0x4000000 syz-executor.2 3010 277429 67056 0 3 0x82 nanoslp syz-executor.0 60717 233411 67056 0 2 0x482 syz-executor.7 92955 195731 67056 0 3 0x82 nanoslp syz-executor.5 98254 116477 67056 0 2 0x482 syz-executor.3 58261 339216 67056 0 2 0x2 syz-executor.1 44802 315127 67056 0 3 0x82 nanoslp syz-executor.4 39873 70029 1 0 3 0x100083 ttyopn getty 67154 457914 67056 0 3 0x82 nanoslp syz-executor.2 76863 204514 67056 0 2 0x482 syz-executor.6 52511 296459 0 0 3 0x14200 bored sosplice 55433 518901 0 0 3 0x14280 nfsidl nfsio 38183 122515 0 0 3 0x14280 nfsidl nfsio 39382 491497 0 0 3 0x14280 nfsidl nfsio 43761 508625 0 0 3 0x14280 nfsidl nfsio 54938 233680 0 0 3 0x14280 nfsidl nfsio 14780 411589 0 0 3 0x14280 nfsidl nfsio 53946 184931 0 0 3 0x14280 nfsidl nfsio 50248 240505 0 0 3 0x14280 nfsidl nfsio 63904 405230 0 0 3 0x14280 nfsidl nfsio 18908 373916 0 0 3 0x14280 nfsidl nfsio 5116 272159 0 0 3 0x14280 nfsidl nfsio 65666 246791 0 0 3 0x14280 nfsidl nfsio 93660 467793 0 0 3 0x14280 nfsidl nfsio 87367 433018 0 0 3 0x14280 nfsidl nfsio 4054 267002 0 0 3 0x14280 nfsidl nfsio 83954 233597 0 0 3 0x14280 nfsidl nfsio 4563 373390 0 0 3 0x14280 nfsidl nfsio 46261 296851 0 0 3 0x14280 nfsidl nfsio 79729 111710 0 0 3 0x14280 nfsidl nfsio 23310 262240 0 0 3 0x14280 nfsidl nfsio 67056 255370 2510 0 3 0x82 kqread syz-fuzzer 67056 174352 2510 0 2 0x4000482 syz-fuzzer 67056 490828 2510 0 3 0x4000082 thrsleep syz-fuzzer 67056 243900 2510 0 3 0x4000082 thrsleep syz-fuzzer 67056 264656 2510 0 3 0x4000082 thrsleep syz-fuzzer 67056 156430 2510 0 3 0x4000082 thrsleep syz-fuzzer 67056 247833 2510 0 3 0x4000082 thrsleep syz-fuzzer 67056 277886 2510 0 3 0x4000082 thrsleep syz-fuzzer 67056 287753 2510 0 3 0x4000082 thrsleep syz-fuzzer 2510 212306 79314 0 3 0x10008a sigsusp ksh 79314 320603 62794 0 3 0x9a kqread sshd 62794 434217 1 0 3 0x88 kqread sshd 63312 91343 99705 74 3 0x1100092 bpf pflogd 99705 95292 1 0 3 0x80 netio pflogd 28132 219787 49884 73 2 0x1100090 syslogd 49884 134722 1 0 3 0x100082 netio syslogd 10457 444179 1 0 3 0x100080 kqread resolvd 16955 163520 90176 77 3 0x100092 kqread dhcpleased 13201 260676 90176 77 3 0x100092 kqread dhcpleased 90176 485614 1 0 3 0x80 kqread dhcpleased 12772 85579 0 0 2 0x40014200 smr 97996 298452 0 0 2 0x14200 zerothread 28489 382361 0 0 3 0x14200 aiodoned aiodoned 61456 275017 0 0 3 0x14200 syncer update 33416 144745 0 0 3 0x14200 cleaner cleaner 25080 125711 0 0 3 0x14200 reaper reaper 40653 323519 0 0 3 0x14200 pgdaemon pagedaemon 46454 163637 0 0 3 0x14200 bored viomb 1007 119008 0 0 3 0x40014200 acpi0 acpi0 849 84294 0 0 3 0x40014200 idle1 90016 51523 0 0 3 0x14200 bored softnet 81062 191113 0 0 3 0x14200 bored softnet 10704 462179 0 0 3 0x14200 bored softnet 55281 245712 0 0 3 0x14200 bored softnet 32643 88366 0 0 2 0x14200 systqmp 90794 259795 0 0 3 0x14200 bored systq 57849 248946 0 0 3 0x40014200 bored softclock 86432 205717 0 0 3 0x40014200 idle0 1 192616 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 25930 (syz-executor.4) thread 0xffff8000fffe6008 (514536) exclusive rwlock solock r = 0 (0xfffffd806474a440) #0 witness_lock+0x44d #1 unp_solock_peer+0x64 sys/kern/uipc_usrreq.c:168 #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 10239 6874K 7328K 78643K 48516 0 pcb 17 14K 16K 78643K 1203 0 rtable 212 21K 24K 78643K 2617 0 ifaddr 101 21K 22K 78643K 1309 0 sysctl 2 0K 0K 78643K 2 0 counters 56 35K 36K 78643K 174 0 ioctlops 0 0K 8K 78643K 3182 0 iov 0 0K 28K 78643K 414 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1463 91K 92K 78643K 10805 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 94 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 585 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 16 57K 93K 78643K 8977 0 sigio 0 0K 0K 78643K 80 0 proc 70 91K 128K 78643K 1781 0 subproc 104 6K 6K 78643K 481 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 671 0 in_multi 82 5K 6K 78643K 569 0 ether_multi 1 0K 0K 78643K 33 0 mrt 1 0K 0K 78643K 29 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 169 758K 758K 78643K 169 0 exec 0 0K 2K 78643K 2790 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 387 447K 448K 78643K 53622 0 UVM aobj 131 4K 4K 78643K 137 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 275 0 NDP 14 0K 2K 78643K 160 0 temp 152 4750K 5776K 78643K 105744 0 kqueue 13 20K 24K 78643K 505 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 341 0 338 4 3 1 3 0 8 0 rtentry 112 516 0 438 4 1 3 4 0 8 0 unpcb 144 5821 0 5803 76 75 1 9 0 8 0 syncache 296 45 0 45 12 12 0 1 0 8 0 tcpqe 32 118 38 118 1 1 0 1 0 8 0 tcpcb 736 3354 0 3334 97 89 8 13 0 8 6 arp 120 77 0 65 1 0 1 1 0 8 0 inpcb 320 10049 0 10030 104 97 7 12 0 8 5 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 3 0 3 1 1 0 1 0 8 0 nd6 48 128 0 111 1 0 1 1 0 8 0 pkpcb 40 16 0 16 2 2 0 1 0 8 0 kcovpl 48 37 0 29 1 0 1 1 0 8 0 ppxss 1256 18 0 18 4 4 0 1 0 8 0 pfstscr 40 16 0 16 4 4 0 1 0 8 0 pffrag 232 29 0 28 3 2 1 1 0 482 0 pffrnode 88 29 0 28 3 2 1 1 0 8 0 pffrent 40 72 0 71 4 3 1 1 0 8 0 pfosfp 40 1439 0 1013 5 0 5 5 0 8 0 pfosfpen 112 1439 0 719 21 0 21 21 0 8 0 pfrktable 1344 490 0 475 4 2 2 2 0 8 0 pftag 88 15 0 8 1 0 1 1 0 8 0 pfstitem 24 59 0 57 1 0 1 1 0 8 0 pfstkey 120 83 0 81 1 0 1 1 0 8 0 pfstate 336 70 0 68 3 2 1 3 0 8 0 pfrule 1360 523 0 455 9 3 6 6 0 8 0 rttmr 136 7 0 7 2 2 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2291 0 1903 42 17 25 31 0 8 0 art_table 32 2292 0 1903 5 1 4 4 0 8 0 art_node 16 512 0 444 1 0 1 1 0 8 0 sysvmsgpl 40 20 0 12 1 0 1 1 0 8 0 semapl 112 583 0 573 1 0 1 1 0 8 0 shmpl 112 134 0 6 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 12311 0 10858 92 0 92 92 0 8 0 ffsino 272 12311 0 10858 98 0 98 98 0 8 0 nchpl 144 23741 0 23195 63 40 23 63 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 224 5926 0 0 349 0 349 349 0 8 0 namei 1024 84593 0 84593 4 3 1 2 0 8 1 percpumem 16 99 0 59 1 0 1 1 0 8 0 vcpupl 2048 33 0 0 5 0 5 5 0 8 0 vmpool 568 56 0 23 5 2 3 3 0 8 0 pfiaddrpl 120 175 0 151 1 0 1 1 0 8 0 kstatmem 264 146 0 118 5 3 2 3 0 8 0 scsiplug 72 10 0 10 4 4 0 1 0 8 0 scxspl 216 70562 0 70562 25 24 1 8 0 8 1 plimitpl 152 898 0 883 1 0 1 1 0 8 0 sigapl 424 9250 0 9182 11 3 8 8 0 8 0 futexpl 64 71473 0 71468 1 0 1 1 0 8 0 knotepl 120 502 0 0 7 0 7 7 0 8 0 kqueuepl 224 1375 0 1366 33 32 1 5 0 8 0 pipepl 336 1716 0 1688 42 39 3 8 0 8 0 fdescpl 496 9210 0 9181 5 1 4 5 0 8 0 filepl 152 57825 0 57564 99 86 13 21 0 8 2 lockfpl 104 1988 0 1986 3 2 1 2 0 8 0 lockfspl 48 624 0 622 1 0 1 1 0 8 0 sessionpl 144 54 0 37 1 0 1 1 0 8 0 pgrppl 48 112 0 95 1 0 1 1 0 8 0 ucredpl 104 5849 0 5837 1 0 1 1 0 8 0 zombiepl 144 9183 0 9182 1 0 1 1 0 8 0 processpl 1064 9250 0 9182 5 0 5 5 0 8 0 procpl 672 25230 0 25146 24 16 8 10 0 8 0 srpgc 96 56 0 56 10 10 0 1 0 8 0 sosppl 168 9 0 7 3 2 1 1 0 8 0 sockpl 504 16227 0 16187 305 292 13 29 0 8 7 mcl64k 65536 25 0 0 3 0 3 3 0 8 0 mcl16k 16384 29 0 0 4 1 3 3 0 8 0 mcl12k 12288 25 0 0 2 0 2 2 0 8 0 mcl9k 9216 15 0 0 2 0 2 2 0 8 0 mcl8k 8192 25 0 0 4 1 3 3 0 8 0 mcl4k 4096 24 0 0 3 0 3 3 0 8 0 mcl2k2 2112 8 0 0 1 0 1 1 0 8 0 mcl2k 2048 456 0 0 36 0 36 36 0 8 0 mtagpl 96 1914 0 0 42 0 42 42 0 8 0 mbufpl 256 2150 0 0 119 0 119 119 0 8 0 bufpl 288 16198 0 9869 453 0 453 453 0 8 0 anonpl 24 1785693 0 1764699 232 96 136 157 0 186 0 amapchunkpl 152 155792 0 155108 63 32 31 41 0 158 0 amappl16 200 25644 0 24859 111 64 47 55 0 8 0 amappl15 192 1434 0 1433 2 1 1 1 0 8 0 amappl14 184 965 0 957 2 1 1 1 0 8 0 amappl13 176 2028 0 2021 1 0 1 1 0 8 0 amappl12 168 1570 0 1563 1 0 1 1 0 8 0 amappl11 160 1180 0 1157 1 0 1 1 0 8 0 amappl10 152 1291 0 1283 1 0 1 1 0 8 0 amappl9 144 1874 0 1871 1 0 1 1 0 8 0 amappl8 136 1320 0 1206 4 0 4 4 0 8 0 amappl7 128 319 0 306 1 0 1 1 0 8 0 amappl6 120 1832 0 1809 2 1 1 2 0 8 0 amappl5 112 5170 0 5155 1 0 1 1 0 8 0 amappl4 104 4255 0 4221 2 0 2 2 0 8 0 amappl3 96 29870 0 29815 2 0 2 2 0 8 0 amappl2 88 12970 0 12905 3 1 2 3 0 8 0 amappl1 80 218240 0 217591 21 6 15 20 0 8 0 amappl 88 52472 0 52271 7 2 5 6 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 136 0 6 3 0 3 3 0 8 0 uaddrrnd 24 9266 0 9204 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 9266 0 9204 1 0 1 1 0 8 0 vmmpekpl 168 72379 0 72321 4 0 4 4 0 8 0 vmmpepl 168 898181 0 895246 222 83 139 151 0 357 0 vmsppl 368 9265 0 9204 8 2 6 6 0 8 0 rwobjpl 56 223361 0 215414 123 8 115 117 0 8 0 pdppl 4096 18539 0 18441 455 353 102 102 0 8 4 pvpl 32 3564374 0 3542180 391 195 196 252 0 265 0 pmappl 248 9265 0 9204 5 1 4 4 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 1793 0 808 29 0 29 29 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff82936ff0) 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: 0x7f7ffffd91d0, count: 12 ddb{0}> trace x86_ipi_db(ffffffff82936ff0) 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: 0x7f7ffffd91d0, 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(ffffffff82593e80) at panic+0x177 sys/kern/subr_prf.c:202 witness_warn(2,0,ffffffff82620d13) at witness_warn+0x65e witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_warn(2,0,ffffffff82620d13) at witness_warn+0x65e sys/kern/subr_witness.c:1473 userret(ffff8000fffe6008) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff80002affe8b0) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff80002affe8b0) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xaf8e7b23360, count: 9 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82593e80) at panic+0x177 sys/kern/subr_prf.c:202 witness_warn(2,0,ffffffff82620d13) at witness_warn+0x65e witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_warn(2,0,ffffffff82620d13) at witness_warn+0x65e sys/kern/subr_witness.c:1473 userret(ffff8000fffe6008) at userret+0x265 sys/kern/kern_sig.c:2012 syscall(ffff80002affe8b0) at syscall+0x57e mi_syscall_return sys/sys/syscall_mi.h:128 [inline] syscall(ffff80002affe8b0) at syscall+0x57e sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xaf8e7b23360, count: -6