panic: lock (rwlock) solock not locked Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 299716 2296 32767 0x10 0 0 syz-executor.5 * 64240 2296 32767 0x10 0x4000000 1K syz-executor.5 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82585177) at panic+0x177 sys/kern/subr_prf.c:198 witness_assert(fffffd806956c5e0,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 somove(fffffd806956cd68,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd806956cd68,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd806956cd68,3,0,0) at sosplice+0x50b sys/kern/uipc_socket.c:1346 sosetopt(fffffd806956cd68,ffff,1023,fffffd805d187d00) at sosetopt+0x7f4 sys_setsockopt(ffff800029611cf0,ffff8000261b23f8,ffff8000261b2440) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff8000261b24c0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000261b24c0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x770da59bd40, count: 6 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: lock (rwlock) solock not locked ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82585177) at panic+0x177 sys/kern/subr_prf.c:198 witness_assert(fffffd806956c5e0,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 somove(fffffd806956cd68,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd806956cd68,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd806956cd68,3,0,0) at sosplice+0x50b sys/kern/uipc_socket.c:1346 sosetopt(fffffd806956cd68,ffff,1023,fffffd805d187d00) at sosetopt+0x7f4 sys_setsockopt(ffff800029611cf0,ffff8000261b23f8,ffff8000261b2440) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff8000261b24c0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000261b24c0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x770da59bd40, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff8000261b20f0 rbx 0xffff800020dd9b8f rdx 0xffff800000bc2880 rcx 0 rax 0xffff800029611cf0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3c5b1836f8cfca90 r11 0x4cd82ba976108d86 r12 0xffff800020dd9990 r13 0 r14 0 r15 0x1 rip 0xffffffff81fd76c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000261b20e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.5) pid=64240 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff800029610a90,0xffffffff82b7cfd0 process=0xffff8000295e8440 user=0xffff8000261ad000, vmspace=0xfffffd8067849d08 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 2296 299716 57954 32767 7 0x10 syz-executor.5 * 2296 64240 57954 32767 7 0x4000010 syz-executor.5 32384 490602 64655 32767 2 0x10 syz-executor.3 32384 83924 64655 32767 2 0x4000010 syz-executor.3 54107 483176 87513 32767 3 0x90 nanoslp syz-executor.0 54107 421775 87513 32767 3 0x4000090 fsleep syz-executor.0 67646 197726 55826 32767 3 0x90 nanoslp syz-executor.2 67646 439344 55826 32767 3 0x4000090 netio syz-executor.2 67646 500151 55826 32767 3 0x4000090 fsleep syz-executor.2 22434 303680 4448 32767 3 0x90 nanoslp syz-executor.1 22434 480034 4448 32767 3 0x4000090 netio syz-executor.1 22434 113817 4448 32767 3 0x4000090 fsleep syz-executor.1 87513 491222 98066 32767 3 0x90 nanoslp syz-executor.0 98066 401780 69503 0 3 0x82 wait syz-executor.0 98026 426608 40859 32767 3 0x90 piperd syz-executor.7 40859 116262 69503 0 3 0x82 wait syz-executor.7 78257 168510 54996 32767 3 0x90 nanoslp syz-executor.4 54996 447808 69503 0 3 0x82 wait syz-executor.4 4448 279694 39456 32767 3 0x90 nanoslp syz-executor.1 39456 507464 69503 0 3 0x82 wait syz-executor.1 57954 237680 41139 32767 3 0x90 nanoslp syz-executor.5 41139 388870 69503 0 3 0x82 wait syz-executor.5 64655 255266 11356 32767 3 0x90 nanoslp syz-executor.3 11356 243251 69503 0 3 0x82 wait syz-executor.3 9542 318543 61160 32767 3 0x90 nanoslp syz-executor.6 61160 233037 69503 0 3 0x82 wait syz-executor.6 55826 496061 11406 32767 3 0x90 nanoslp syz-executor.2 11406 59266 69503 0 3 0x82 wait syz-executor.2 2662 143682 0 0 3 0x14200 bored sosplice 69503 433026 40735 0 3 0x82 thrsleep syz-fuzzer 69503 180577 40735 0 3 0x4000082 thrsleep syz-fuzzer 69503 18764 40735 0 3 0x4000082 thrsleep syz-fuzzer 69503 316076 40735 0 3 0x4000082 thrsleep syz-fuzzer 69503 174333 40735 0 3 0x4000082 thrsleep syz-fuzzer 69503 134902 40735 0 3 0x4000082 kqread syz-fuzzer 69503 141745 40735 0 3 0x4000082 wait syz-fuzzer 69503 399690 40735 0 3 0x4000082 thrsleep syz-fuzzer 69503 466332 40735 0 3 0x4000082 wait syz-fuzzer 69503 351674 40735 0 3 0x4000082 wait syz-fuzzer 69503 207076 40735 0 3 0x4000082 thrsleep syz-fuzzer 69503 482614 40735 0 3 0x4000082 wait syz-fuzzer 69503 189790 40735 0 3 0x4000082 wait syz-fuzzer 69503 458690 40735 0 3 0x4000082 wait syz-fuzzer 69503 344669 40735 0 3 0x4000082 wait syz-fuzzer 69503 200714 40735 0 3 0x4000082 thrsleep syz-fuzzer 69503 369447 40735 0 3 0x4000082 wait syz-fuzzer 69503 195376 40735 0 3 0x4000082 thrsleep syz-fuzzer 40735 189666 66673 0 3 0x10008a sigsusp ksh 66673 80207 59575 0 3 0x9a kqread sshd 65980 512124 1 0 3 0x100083 ttyin getty 59575 517069 1 0 3 0x88 kqread sshd 95433 290523 96306 73 3 0x1100090 kqread syslogd 96306 316402 1 0 3 0x100082 netio syslogd 85405 277564 1 0 3 0x100080 kqread resolvd 69922 362745 18599 77 3 0x100092 kqread dhcpleased 50471 461489 18599 77 3 0x100092 kqread dhcpleased 18599 5188 1 0 3 0x80 kqread dhcpleased 66974 138555 0 0 3 0x14200 bored smr 12163 305336 0 0 2 0x14200 zerothread 82505 391196 0 0 3 0x14200 aiodoned aiodoned 9482 94323 0 0 3 0x14200 syncer update 5353 145318 0 0 3 0x14200 cleaner cleaner 27343 467116 0 0 3 0x14200 reaper reaper 66621 392371 0 0 3 0x14200 pgdaemon pagedaemon 15987 477273 0 0 3 0x14200 bored viomb 18001 94511 0 0 3 0x40014200 acpi0 acpi0 45666 81274 0 0 3 0x40014200 idle1 1076 169401 0 0 3 0x14200 bored softnet 20167 508844 0 0 3 0x14200 bored softnet 44126 273211 0 0 3 0x14200 bored softnet 53594 28045 0 0 3 0x14200 bored softnet 7725 29161 0 0 3 0x14200 bored systqmp 64922 178348 0 0 3 0x14200 bored systq 62416 2802 0 0 3 0x40014200 bored softclock 28205 451675 0 0 3 0x40014200 idle0 1 242197 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 2296 (syz-executor.5) thread 0xffff800029611cf0 (64240) exclusive rwlock netlock r = 0 (0xffffffff82971a40) #0 witness_lock+0x44d #1 sys_setsockopt+0x1de sys/kern/uipc_syscalls.c:1233 #2 syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] #2 syscall+0x435 sys/arch/amd64/amd64/trap.c:585 #3 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82a8d100) #0 witness_lock+0x44d #1 syscall+0x41d mi_syscall sys/sys/syscall_mi.h:100 [inline] #1 syscall+0x41d sys/arch/amd64/amd64/trap.c:585 #2 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10218 6413K 6420K 78643K 11499 0 pcb 13 20K 24K 78643K 21 0 rtable 242 6K 7K 78643K 5102 0 ifaddr 82 18K 18K 78643K 531 0 sysctl 3 1K 3K 78643K 88 0 counters 56 35K 35K 78643K 182 0 ioctlops 0 0K 2K 78643K 4381 0 iov 0 0K 36K 78643K 7959 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1271 79K 79K 78643K 10345 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 428 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 12608 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 24 89K 125K 78643K 38068 0 sigio 0 0K 0K 78643K 3012 0 proc 56 78K 103K 78643K 4667 0 subproc 104 6K 6K 78643K 923 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 4039 0 in_multi 99 6K 7K 78643K 1391 0 ether_multi 1 0K 0K 78643K 164 0 mrt 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 253 1129K 1129K 78643K 253 0 exec 0 0K 2K 78643K 7553 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 8 62K 64K 78643K 10 0 UVM amap 438 97K 992K 78643K 233305 0 UVM aobj 131 8K 8K 78643K 141 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 1130 0 NDP 11 0K 2K 78643K 216 0 temp 124 4726K 4854K 78643K 97497 0 kqueue 13 20K 28K 78643K 4529 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 4196 0 4193 61 60 1 7 0 8 0 rtentry 112 854 0 740 4 0 4 4 0 8 0 unpcb 144 44485 0 44466 383 377 6 10 0 8 5 syncache 296 489 0 489 82 82 0 1 0 8 0 tcpqe 32 133 0 133 46 46 0 1 0 8 0 tcpcb 768 48449 0 48437 996 981 15 37 0 8 13 arp 120 157 0 139 1 0 1 1 0 8 0 ipq 40 41 0 40 17 16 1 1 0 8 0 ipqe 40 236 0 235 17 16 1 1 0 8 0 inpcb 368 70407 0 70394 668 658 10 20 0 8 8 nd6 48 250 0 222 1 0 1 1 0 8 0 kcovpl 48 71 0 63 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 3429 0 2940 40 9 31 33 0 8 0 art_table 32 3430 0 2940 5 0 5 5 0 8 0 art_node 16 853 0 749 1 0 1 1 0 8 0 sysvmsgpl 40 24 0 18 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 12605 0 12595 1 0 1 1 0 8 0 shmpl 112 138 0 10 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 54069 0 52553 96 0 96 96 0 8 0 ffsino 272 54069 0 52553 102 0 102 102 0 8 0 nchpl 144 104869 0 103232 63 0 63 63 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 216 5926 0 0 330 0 330 330 0 8 0 namei 1024 365932 0 365932 9 8 1 2 0 8 1 percpumem 16 103 0 63 1 0 1 1 0 8 0 kstatmem 264 148 0 126 2 0 2 2 0 8 0 scxspl 216 331660 0 331660 126 125 1 8 0 8 1 plimitpl 152 7684 0 7662 30 28 2 2 0 8 1 sigapl 424 38220 0 38166 7 0 7 7 0 8 0 futexpl 64 350155 0 350152 11 10 1 1 0 8 0 knotepl 120 2323 0 0 17 0 17 17 0 8 0 kqueuepl 216 13807 0 13797 206 201 5 8 0 8 4 pipepl 320 11115 0 11087 254 251 3 13 0 8 0 fdescpl 496 38202 0 38167 6 1 5 6 0 8 0 filepl 152 313317 0 313068 492 475 17 23 0 8 7 lockfpl 104 6418 0 6416 4 3 1 2 0 8 0 lockfspl 48 1909 0 1907 1 0 1 1 0 8 0 sessionpl 144 86 0 70 1 0 1 1 0 8 0 pgrppl 48 384 0 368 1 0 1 1 0 8 0 ucredpl 104 52366 0 52348 1 0 1 1 0 8 0 zombiepl 144 38168 0 38166 2 1 1 1 0 8 0 processpl 1064 38220 0 38166 5 1 4 5 0 8 0 procpl 672 115368 0 115290 36 27 9 10 0 8 0 sosppl 168 588 0 586 58 57 1 1 0 8 0 sockpl 488 120583 0 120546 2203 2187 16 43 0 8 11 mcl64k 65536 74 0 0 3 0 3 3 0 8 0 mcl16k 16384 73 0 0 6 3 3 3 0 8 0 mcl12k 12288 82 0 0 3 0 3 3 0 8 0 mcl9k 9216 41 0 0 2 0 2 2 0 8 0 mcl8k 8192 81 0 0 6 3 3 3 0 8 0 mcl4k 4096 169 0 0 11 7 4 6 0 8 0 mcl2k2 2112 17 0 0 2 0 2 2 0 8 0 mcl2k 2048 711 0 0 48 28 20 48 0 8 0 mtagpl 96 19 0 0 1 0 1 1 0 8 0 mbufpl 256 9557 0 0 555 0 555 555 0 8 0 bufpl 288 69323 0 62993 453 0 453 453 0 8 0 anonpl 24 7903020 0 7889392 347 240 107 124 0 186 0 amapchunkpl 152 1581459 0 1580747 11151 11118 33 4421 0 158 2 amappl16 200 120939 0 120552 560 537 23 40 0 8 0 amappl15 192 2461 0 2454 1 0 1 1 0 8 0 amappl14 184 2075 0 2058 1 0 1 1 0 8 0 amappl13 176 4396 0 4391 1 0 1 1 0 8 0 amappl12 168 5620 0 5610 1 0 1 1 0 8 0 amappl11 160 7937 0 7923 2 0 2 2 0 8 0 amappl10 152 2798 0 2795 1 0 1 1 0 8 0 amappl9 144 4405 0 4399 1 0 1 1 0 8 0 amappl8 136 14709 0 14444 11 1 10 10 0 8 0 amappl7 128 12194 0 12159 6 4 2 2 0 8 0 amappl6 120 4398 0 4376 2 1 1 2 0 8 0 amappl5 112 31102 0 31080 1 0 1 1 0 8 0 amappl4 104 16777 0 16736 2 0 2 2 0 8 0 amappl3 96 126023 0 125955 11 9 2 3 0 8 0 amappl2 88 8796 0 8757 2 0 2 2 0 8 0 amappl1 80 952507 0 951754 20 3 17 19 0 8 0 amappl 88 229869 0 229658 6 0 6 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 140 0 10 3 0 3 3 0 8 0 uaddrrnd 24 38203 0 38168 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 38203 0 38168 1 0 1 1 0 8 0 vmmpekpl 168 320545 0 320475 4 0 4 4 0 8 0 vmmpepl 168 3822311 0 3819274 571 428 143 157 0 357 0 vmsppl 368 38202 0 38168 4 0 4 4 0 8 0 rwobjpl 56 948639 0 940932 162 50 112 114 0 8 0 pdppl 4096 76413 0 76336 1022 941 81 95 0 8 4 pvpl 32 14938556 0 14919264 944 763 181 242 0 265 0 pmappl 248 38202 0 38168 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 3030 0 1659 40 0 40 40 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff829b9ff0) 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: 0x7f7ffffca180, count: 12 ddb{0}> trace x86_ipi_db(ffffffff829b9ff0) 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: 0x7f7ffffca180, 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(ffffffff82585177) at panic+0x177 sys/kern/subr_prf.c:198 witness_assert(fffffd806956c5e0,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 somove(fffffd806956cd68,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd806956cd68,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd806956cd68,3,0,0) at sosplice+0x50b sys/kern/uipc_socket.c:1346 sosetopt(fffffd806956cd68,ffff,1023,fffffd805d187d00) at sosetopt+0x7f4 sys_setsockopt(ffff800029611cf0,ffff8000261b23f8,ffff8000261b2440) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff8000261b24c0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000261b24c0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x770da59bd40, count: 6 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82585177) at panic+0x177 sys/kern/subr_prf.c:198 witness_assert(fffffd806956c5e0,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 somove(fffffd806956cd68,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd806956cd68,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd806956cd68,3,0,0) at sosplice+0x50b sys/kern/uipc_socket.c:1346 sosetopt(fffffd806956cd68,ffff,1023,fffffd805d187d00) at sosetopt+0x7f4 sys_setsockopt(ffff800029611cf0,ffff8000261b23f8,ffff8000261b2440) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff8000261b24c0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000261b24c0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x770da59bd40, count: -9