panic: lock (rwlock) solock not locked Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 20249 50375 32767 0x10 0x4000000 0K syz-executor.6 212818 73671 32767 0x10 0 1 syz-executor.7 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(fffffd8079d517d0,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd8079d517b8,fffffd8079d51900) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8079d517b8,fffffd8079d51900) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8079d51d70,3,0,0) at sosplice+0x550 sosetopt(fffffd8079d51d70,ffff,1023,fffffd8068e66f00) at sosetopt+0x7f4 sys_setsockopt(ffff8000fffea540,ffff80002e48e7f8,ffff80002e48e840) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e48e8c0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e48e8c0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb4713c73c10, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: lock (rwlock) solock not locked ddb{0}> 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(fffffd8079d517d0,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd8079d517b8,fffffd8079d51900) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8079d517b8,fffffd8079d51900) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8079d51d70,3,0,0) at sosplice+0x550 sosetopt(fffffd8079d51d70,ffff,1023,fffffd8068e66f00) at sosetopt+0x7f4 sys_setsockopt(ffff8000fffea540,ffff80002e48e7f8,ffff80002e48e840) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e48e8c0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e48e8c0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb4713c73c10, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002e48e540 rbx 0xffffffff829bab8f cpu_info_full_primary+0x2b8f rdx 0xffff800000bef900 rcx 0 rax 0xffff8000fffea540 r8 0x101010101010101 r9 0x8080808080808080 r10 0xa8942a90e836c928 r11 0x8e1d800929d4e9ef r12 0xffffffff829ba990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff81fd76c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e48e530 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.6) pid=20249 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=77, nice=20 forw=0xffffffffffffffff, list=0xffff8000fffeb7a0,0xffffffff82b7cfd0 process=0xffff8000fffef620 user=0xffff80002e489000, vmspace=0xfffffd8076654748 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 55397 171930 21153 32767 2 0x10 syz-executor.1 50375 498494 89766 32767 2 0x10 syz-executor.6 *50375 20249 89766 32767 7 0x4000010 syz-executor.6 73671 212818 27911 32767 7 0x10 syz-executor.7 73671 143423 27911 32767 3 0x4000090 netcon2 syz-executor.7 73671 124828 27911 32767 3 0x4000090 kqread syz-executor.7 73671 139468 27911 32767 3 0x4000090 netcon syz-executor.7 92513 195829 45011 32767 3 0x90 nanoslp syz-executor.2 45011 228099 17903 0 3 0x82 wait syz-executor.2 86424 318602 87922 32767 3 0x90 piperd syz-executor.0 87922 117336 17903 0 3 0x82 wait syz-executor.0 91528 135831 38158 32767 3 0x90 piperd syz-executor.4 38158 345895 17903 0 3 0x82 wait syz-executor.4 41830 413442 0 0 3 0x14200 bored sosplice 27911 162148 35443 32767 3 0x90 nanoslp syz-executor.7 68971 150992 26074 32767 3 0x90 piperd syz-executor.5 35443 209261 17903 0 3 0x82 wait syz-executor.7 89766 271122 40609 32767 3 0x90 nanoslp syz-executor.6 40609 16194 17903 0 3 0x82 wait syz-executor.6 50659 86966 46814 32767 3 0x90 nanoslp syz-executor.3 46814 425707 17903 0 3 0x82 wait syz-executor.3 26074 270763 17903 0 3 0x82 wait syz-executor.5 21153 515940 87952 32767 3 0x90 nanoslp syz-executor.1 87952 388818 17903 0 3 0x82 wait syz-executor.1 17903 421941 62181 0 3 0x82 wait syz-fuzzer 17903 350084 62181 0 3 0x4000082 nanoslp syz-fuzzer 17903 9408 62181 0 3 0x4000082 thrsleep syz-fuzzer 17903 297057 62181 0 3 0x4000082 kqread syz-fuzzer 17903 47149 62181 0 3 0x4000082 wait syz-fuzzer 17903 456332 62181 0 3 0x4000082 thrsleep syz-fuzzer 17903 361957 62181 0 3 0x4000082 wait syz-fuzzer 17903 300777 62181 0 3 0x4000082 wait syz-fuzzer 17903 98238 62181 0 3 0x4000082 thrsleep syz-fuzzer 17903 284791 62181 0 3 0x4000082 thrsleep syz-fuzzer 17903 16078 62181 0 3 0x4000082 wait syz-fuzzer 17903 143139 62181 0 3 0x4000082 wait syz-fuzzer 17903 88013 62181 0 3 0x4000082 thrsleep syz-fuzzer 17903 465977 62181 0 3 0x4000082 thrsleep syz-fuzzer 17903 386205 62181 0 3 0x4000082 wait syz-fuzzer 17903 496174 62181 0 3 0x4000082 wait syz-fuzzer 62181 520013 60891 0 3 0x10008a sigsusp ksh 60891 396177 78736 0 3 0x9a kqread sshd 48933 20377 1 0 3 0x100083 ttyin getty 78736 234323 1 0 3 0x88 kqread sshd 24173 499730 34080 73 3 0x1100090 kqread syslogd 34080 43804 1 0 3 0x100082 netio syslogd 35401 34368 1 0 3 0x100080 kqread resolvd 96339 321658 23832 77 3 0x100092 kqread dhcpleased 7421 45112 23832 77 3 0x100092 kqread dhcpleased 23832 399995 1 0 3 0x80 kqread dhcpleased 73928 38769 0 0 3 0x14200 bored smr 74820 214076 0 0 2 0x14200 zerothread 19977 110777 0 0 3 0x14200 aiodoned aiodoned 18216 119813 0 0 3 0x14200 syncer update 75614 76770 0 0 3 0x14200 cleaner cleaner 8055 483175 0 0 3 0x14200 reaper reaper 99956 389351 0 0 3 0x14200 pgdaemon pagedaemon 78818 357516 0 0 3 0x14200 bored viomb 97585 212106 0 0 3 0x40014200 acpi0 acpi0 4312 63742 0 0 3 0x40014200 idle1 13556 185862 0 0 3 0x14200 bored softnet 67176 143166 0 0 3 0x14200 bored softnet 60827 446785 0 0 3 0x14200 bored softnet 70429 339652 0 0 3 0x14200 bored softnet 62904 384178 0 0 3 0x14200 bored systqmp 51592 482161 0 0 3 0x14200 bored systq 65736 130391 0 0 3 0x40014200 bored softclock 39902 440826 0 0 3 0x40014200 idle0 1 304949 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 50375 (syz-executor.6) thread 0xffff8000fffea540 (20249) 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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10214 6412K 6420K 78643K 11327 0 pcb 13 10K 12K 78643K 15 0 rtable 234 6K 7K 78643K 789 0 ifaddr 82 17K 17K 78643K 135 0 sysctl 2 0K 0K 78643K 2 0 counters 56 35K 35K 78643K 70 0 ioctlops 0 0K 2K 78643K 49 0 iov 0 0K 12K 78643K 414 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1270 79K 79K 78643K 1581 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 9 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 1K 78643K 264 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 21 77K 121K 78643K 1906 0 sigio 0 0K 0K 78643K 143 0 proc 56 78K 103K 78643K 723 0 subproc 104 6K 6K 78643K 195 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 110 0 in_multi 99 6K 6K 78643K 218 0 ether_multi 1 0K 0K 78643K 25 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 229 1023K 1023K 78643K 229 0 exec 0 0K 2K 78643K 1368 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 250 83K 96K 78643K 12826 0 UVM aobj 131 6K 6K 78643K 134 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 39 0 NDP 11 0K 2K 78643K 48 0 temp 125 4726K 4790K 78643K 8226 0 kqueue 13 20K 30K 78643K 233 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 169 0 166 3 0 3 3 0 8 2 rtentry 112 189 0 79 4 0 4 4 0 8 0 unpcb 144 1442 0 1427 18 17 1 6 0 8 0 syncache 296 43 0 43 5 4 1 1 0 8 1 tcpqe 32 6 0 6 2 2 0 1 0 8 0 tcpcb 768 2211 0 2163 44 35 9 17 0 8 4 arp 120 32 0 14 1 0 1 1 0 8 0 ipq 40 5 0 4 3 2 1 1 0 8 0 ipqe 40 45 0 44 3 2 1 1 0 8 0 inpcb 368 3144 0 3133 33 25 8 11 0 8 6 nd6 48 46 0 22 1 0 1 1 0 8 0 kcovpl 48 15 0 7 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 777 0 321 30 1 29 30 0 8 0 art_table 32 778 0 321 4 0 4 4 0 8 0 art_node 16 188 0 88 1 0 1 1 0 8 0 sysvmsgpl 40 19 0 13 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 262 0 252 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 3714 0 2278 91 0 91 91 0 8 0 ffsino 272 3714 0 2278 97 0 97 97 0 8 0 nchpl 144 6426 0 4794 63 0 63 63 0 8 0 uvmvnodes 80 3918 0 0 80 0 80 80 0 8 0 vnodes 216 3918 0 0 218 0 218 218 0 8 0 namei 1024 20915 0 20915 2 1 1 2 0 8 1 percpumem 16 47 0 7 1 0 1 1 0 8 0 kstatmem 264 36 0 14 2 0 2 2 0 8 0 scxspl 216 17818 0 17818 13 12 1 8 0 8 1 plimitpl 152 314 0 292 2 1 1 2 0 8 0 sigapl 424 2172 0 2120 7 0 7 7 0 8 0 futexpl 64 15631 0 15631 1 0 1 1 0 8 1 knotepl 120 366 0 0 10 0 10 10 0 8 0 kqueuepl 216 697 0 687 17 12 5 5 0 8 4 pipepl 320 441 0 413 12 6 6 6 0 8 3 fdescpl 496 2154 0 2122 7 2 5 6 0 8 0 filepl 152 13663 0 13423 36 21 15 20 0 8 4 lockfpl 104 121 0 119 1 0 1 1 0 8 0 lockfspl 48 61 0 59 1 0 1 1 0 8 0 sessionpl 144 30 0 14 1 0 1 1 0 8 0 pgrppl 48 32 0 16 1 0 1 1 0 8 0 ucredpl 104 1777 0 1759 1 0 1 1 0 8 0 zombiepl 144 2122 0 2120 1 0 1 1 0 8 0 processpl 1064 2172 0 2120 5 1 4 5 0 8 0 procpl 672 5554 0 5483 10 2 8 8 0 8 1 sosppl 168 24 0 22 5 4 1 1 0 8 0 sockpl 488 4777 0 4744 83 70 13 29 0 8 6 mcl64k 65536 17 0 0 3 0 3 3 0 8 0 mcl16k 16384 11 0 0 2 0 2 2 0 8 0 mcl12k 12288 16 0 0 2 0 2 2 0 8 0 mcl9k 9216 8 0 0 1 0 1 1 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 246 0 0 30 0 30 30 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 1084 0 0 67 0 67 67 0 8 0 bufpl 288 5852 0 128 409 0 409 409 0 8 0 anonpl 24 420980 0 409236 131 33 98 107 0 186 3 amapchunkpl 152 36877 0 36274 48 20 28 40 0 158 0 amappl16 200 6539 0 6121 71 40 31 36 0 8 8 amappl15 192 507 0 501 1 0 1 1 0 8 0 amappl14 184 329 0 322 1 0 1 1 0 8 0 amappl13 176 243 0 242 1 0 1 1 0 8 0 amappl12 168 241 0 235 2 1 1 1 0 8 0 amappl11 160 532 0 514 1 0 1 1 0 8 0 amappl10 152 307 0 300 1 0 1 1 0 8 0 amappl9 144 591 0 584 1 0 1 1 0 8 0 amappl8 136 711 0 644 3 0 3 3 0 8 0 amappl7 128 166 0 145 1 0 1 1 0 8 0 amappl6 120 336 0 322 2 1 1 2 0 8 0 amappl5 112 1431 0 1409 1 0 1 1 0 8 0 amappl4 104 1990 0 1952 2 0 2 2 0 8 0 amappl3 96 6261 0 6208 2 0 2 2 0 8 0 amappl2 88 648 0 614 2 1 1 2 0 8 0 amappl1 80 55128 0 54473 20 3 17 19 0 8 1 amappl 88 12207 0 12045 6 1 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 133 0 3 3 0 3 3 0 8 0 uaddrrnd 24 2154 0 2122 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2154 0 2122 1 0 1 1 0 8 0 vmmpekpl 168 21133 0 21088 3 0 3 3 0 8 0 vmmpepl 168 215764 0 213286 175 35 140 140 0 357 14 vmsppl 368 2153 0 2122 4 0 4 4 0 8 0 rwobjpl 56 58375 0 52964 81 1 80 80 0 8 0 pdppl 4096 4315 0 4244 174 93 81 93 0 8 10 pvpl 32 891779 0 875237 271 97 174 248 0 265 8 pmappl 248 2153 0 2122 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 955 0 122 24 0 24 24 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(ffffffff82585177) at panic+0x177 sys/kern/subr_prf.c:198 witness_assert(fffffd8079d517d0,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd8079d517b8,fffffd8079d51900) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8079d517b8,fffffd8079d51900) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8079d51d70,3,0,0) at sosplice+0x550 sosetopt(fffffd8079d51d70,ffff,1023,fffffd8068e66f00) at sosetopt+0x7f4 sys_setsockopt(ffff8000fffea540,ffff80002e48e7f8,ffff80002e48e840) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e48e8c0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e48e8c0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb4713c73c10, count: -9 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 end of kernel end trace frame: 0x7f7ffffd1340, count: 12 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 end of kernel end trace frame: 0x7f7ffffd1340, count: -3