panic: lock (rwlock) solock not locked Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 76629 13579 32767 0x10 0 1 syz-executor.6 *246754 13579 32767 0x10 0x4000000 0K syz-executor.6 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(fffffd807c691b98,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd807c691b80,fffffd807c691cc8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd807c691b80,fffffd807c691cc8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd807c6917b0,3,0,fffffd800878b810) at sosplice+0x550 sosetopt(fffffd807c6917b0,ffff,1023,fffffd80696c2f00) at sosetopt+0x7f4 sys_setsockopt(ffff8000fffeca88,ffff80002ca6e0b8,ffff80002ca6e100) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002ca6e180) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002ca6e180) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe8100b6c740, 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(fffffd807c691b98,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd807c691b80,fffffd807c691cc8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd807c691b80,fffffd807c691cc8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd807c6917b0,3,0,fffffd800878b810) at sosplice+0x550 sosetopt(fffffd807c6917b0,ffff,1023,fffffd80696c2f00) at sosetopt+0x7f4 sys_setsockopt(ffff8000fffeca88,ffff80002ca6e0b8,ffff80002ca6e100) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002ca6e180) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002ca6e180) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe8100b6c740, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002ca6de00 rbx 0xffffffff829bab8f cpu_info_full_primary+0x2b8f rdx 0xffff800000bf3000 rcx 0 rax 0xffff8000fffeca88 r8 0x101010101010101 r9 0x8080808080808080 r10 0x39f448224632724f r11 0x6a8fa6172cbced29 r12 0xffffffff829ba990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff81fd76c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002ca6ddf0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.6) pid=246754 stat=onproc flags process=10 proc=4000000 pri=75, usrpri=75, nice=20 forw=0xffffffffffffffff, list=0xffff8000fffed508,0xffffffff82b7cfd0 process=0xffff8000ffff3620 user=0xffff80002ca69000, vmspace=0xfffffd8077f822f8 estcpu=25, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 18625 486489 89362 32767 3 0x90 nanoslp syz-executor.3 18625 44125 89362 32767 3 0x4000090 netcon2 syz-executor.3 18625 126751 89362 32767 3 0x4000090 fsleep syz-executor.3 13579 76629 87511 32767 7 0x10 syz-executor.6 13579 194093 87511 32767 3 0x4000090 netcon2 syz-executor.6 *13579 246754 87511 32767 7 0x4000010 syz-executor.6 87511 79450 54547 32767 3 0x90 nanoslp syz-executor.6 54547 452611 30591 0 3 0x82 wait syz-executor.6 85883 24165 0 0 3 0x14200 bored sosplice 58291 287095 67354 32767 3 0x90 piperd syz-executor.5 49394 341651 20144 32767 3 0x90 piperd syz-executor.7 20144 234323 30591 0 3 0x82 wait syz-executor.7 89362 157912 62588 32767 3 0x90 nanoslp syz-executor.3 57131 150203 63683 32767 3 0x90 piperd syz-executor.4 67354 386017 30591 0 3 0x82 wait syz-executor.5 63683 372598 30591 0 3 0x82 wait syz-executor.4 34435 33593 17838 32767 3 0x90 piperd syz-executor.2 62588 446534 30591 0 3 0x82 wait syz-executor.3 69042 76585 84456 32767 3 0x90 piperd syz-executor.1 17838 151753 30591 0 3 0x82 wait syz-executor.2 30408 117732 94821 32767 3 0x90 piperd syz-executor.0 84456 418526 30591 0 3 0x82 wait syz-executor.1 94821 107957 30591 0 3 0x82 wait syz-executor.0 30591 386386 45815 0 3 0x82 thrsleep syz-fuzzer 30591 246162 45815 0 3 0x4000082 thrsleep syz-fuzzer 30591 128836 45815 0 3 0x4000082 wait syz-fuzzer 30591 481732 45815 0 3 0x4000082 wait syz-fuzzer 30591 439611 45815 0 3 0x4000082 kqread syz-fuzzer 30591 466516 45815 0 3 0x4000082 thrsleep syz-fuzzer 30591 235110 45815 0 3 0x4000082 wait syz-fuzzer 30591 374002 45815 0 3 0x4000082 wait syz-fuzzer 30591 306847 45815 0 3 0x4000082 thrsleep syz-fuzzer 30591 45815 45815 0 3 0x4000082 wait syz-fuzzer 30591 275502 45815 0 3 0x4000082 wait syz-fuzzer 30591 3294 45815 0 3 0x4000082 wait syz-fuzzer 30591 95908 45815 0 3 0x4000082 thrsleep syz-fuzzer 30591 159163 45815 0 3 0x4000082 wait syz-fuzzer 30591 474841 45815 0 3 0x4000082 thrsleep syz-fuzzer 30591 19099 45815 0 3 0x4000082 thrsleep syz-fuzzer 45815 205554 57880 0 3 0x10008a sigsusp ksh 57880 101455 9614 0 3 0x9a kqread sshd 73979 430912 1 0 3 0x100083 ttyin getty 9614 164704 1 0 3 0x88 kqread sshd 53265 58267 12411 73 2 0x1100010 syslogd 12411 448710 1 0 3 0x100082 netio syslogd 28832 236241 1 0 3 0x100080 kqread resolvd 12643 428570 65296 77 3 0x100092 kqread dhcpleased 58558 432976 65296 77 3 0x100092 kqread dhcpleased 65296 81538 1 0 3 0x80 kqread dhcpleased 14114 140394 0 0 3 0x14200 bored smr 93205 6295 0 0 3 0x14200 pgzero zerothread 53732 261518 0 0 3 0x14200 aiodoned aiodoned 40460 64390 0 0 3 0x14200 syncer update 16495 345358 0 0 3 0x14200 cleaner cleaner 88023 256435 0 0 3 0x14200 reaper reaper 72959 333936 0 0 3 0x14200 pgdaemon pagedaemon 16527 119234 0 0 3 0x14200 bored viomb 28598 209758 0 0 3 0x40014200 acpi0 acpi0 40844 187104 0 0 3 0x40014200 idle1 22511 16954 0 0 3 0x14200 bored softnet 73406 425454 0 0 3 0x14200 bored softnet 89017 125987 0 0 3 0x14200 bored softnet 84969 245898 0 0 3 0x14200 bored softnet 10706 520308 0 0 3 0x14200 bored systqmp 25075 375282 0 0 3 0x14200 bored systq 64654 445932 0 0 3 0x40014200 bored softclock 71488 108676 0 0 3 0x40014200 idle0 1 367856 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 13579 (syz-executor.6) thread 0xffff8000fffeca88 (246754) 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 Process 53265 (syslogd) thread 0xffff800021279cf0 (58267) exclusive rrwlock inode r = 0 (0xfffffd806ebedf78) #0 witness_lock+0x44d #1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310 #2 rrw_enter+0x8b sys/kern/kern_rwlock.c:465 #3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:518 #4 vn_lock+0x84 sys/kern/vfs_vnops.c:564 #5 sys_fsync+0xf5 sys/kern/vfs_syscalls.c:2935 #6 syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] #6 syscall+0x435 sys/arch/amd64/amd64/trap.c:585 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10206 6411K 6420K 78643K 11303 0 pcb 13 8K 8K 78643K 13 0 rtable 238 6K 7K 78643K 486 0 ifaddr 82 16K 16K 78643K 98 0 counters 56 35K 35K 78643K 60 0 ioctlops 0 0K 2K 78643K 39 0 iov 0 0K 12K 78643K 45 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1270 79K 79K 78643K 1631 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 0K 78643K 75 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 20 73K 109K 78643K 770 0 proc 56 78K 103K 78643K 536 0 subproc 104 6K 6K 78643K 130 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 104 0 in_multi 99 6K 6K 78643K 124 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 181 811K 811K 78643K 181 0 exec 0 0K 2K 78643K 765 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 253 82K 101K 78643K 6163 0 UVM aobj 81 7K 7K 78643K 81 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 3 0 NDP 11 0K 2K 78643K 33 0 temp 124 4726K 4790K 78643K 4975 0 kqueue 12 18K 22K 78643K 71 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 56 0 53 1 0 1 1 0 8 0 rtentry 112 135 0 23 4 0 4 4 0 8 0 unpcb 144 498 0 484 9 8 1 6 0 8 0 syncache 296 9 0 9 3 2 1 1 0 8 1 tcpqe 32 92 0 92 1 1 0 1 0 8 0 tcpcb 768 725 0 701 24 19 5 19 0 8 2 arp 120 23 0 4 1 0 1 1 0 8 0 inpcb 368 1008 0 996 15 11 4 9 0 8 2 nd6 48 31 0 6 1 0 1 1 0 8 0 kcovpl 48 10 0 2 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 543 0 88 29 0 29 29 0 8 0 art_table 32 544 0 88 4 0 4 4 0 8 0 art_node 16 134 0 32 1 0 1 1 0 8 0 sysvmsgpl 40 21 0 15 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 73 0 63 1 0 1 1 0 8 0 shmpl 112 78 0 0 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2491 0 1060 90 0 90 90 0 8 0 ffsino 272 2491 0 1060 96 0 96 96 0 8 0 nchpl 144 3600 0 1969 63 0 63 63 0 8 0 uvmvnodes 80 2630 0 0 54 0 54 54 0 8 0 vnodes 216 2630 0 0 147 0 147 147 0 8 0 namei 1024 14608 0 14608 1 0 1 1 0 8 1 percpumem 16 42 0 2 1 0 1 1 0 8 0 kstatmem 264 26 0 4 2 0 2 2 0 8 0 scxspl 216 12190 0 12190 9 8 1 8 0 8 1 plimitpl 152 114 0 92 1 0 1 1 0 8 0 sigapl 424 1043 0 994 8 1 7 7 0 8 0 futexpl 64 5599 0 5598 2 1 1 1 0 8 0 knotepl 120 122 0 0 4 0 4 4 0 8 0 kqueuepl 216 160 0 152 5 4 1 5 0 8 0 pipepl 320 295 0 267 11 8 3 11 0 8 0 fdescpl 496 1025 0 994 6 1 5 6 0 8 0 filepl 152 6413 0 6173 22 12 10 17 0 8 0 lockfpl 104 60 0 58 1 0 1 1 0 8 0 lockfspl 48 30 0 28 1 0 1 1 0 8 0 sessionpl 144 25 0 9 1 0 1 1 0 8 0 pgrppl 48 25 0 9 1 0 1 1 0 8 0 ucredpl 104 1477 0 1459 1 0 1 1 0 8 0 zombiepl 144 994 0 994 1 0 1 1 0 8 1 processpl 1064 1043 0 994 4 0 4 4 0 8 0 procpl 672 2414 0 2346 10 2 8 8 0 8 1 sosppl 168 56 0 53 1 0 1 1 0 8 0 sockpl 488 1604 0 1577 40 33 7 28 0 8 3 mcl64k 65536 14 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 7 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 10 0 0 2 0 2 2 0 8 0 mcl4k 4096 15 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 303 0 0 37 0 37 37 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 405 0 0 22 0 22 22 0 8 0 bufpl 288 5106 0 130 356 0 356 356 0 8 0 anonpl 24 191049 0 179193 110 4 106 109 0 186 21 amapchunkpl 152 17959 0 17327 41 3 38 39 0 158 9 amappl16 200 1801 0 1451 20 0 20 20 0 8 1 amappl15 192 182 0 174 1 0 1 1 0 8 0 amappl14 184 24 0 20 1 0 1 1 0 8 0 amappl13 176 203 0 199 1 0 1 1 0 8 0 amappl12 168 246 0 238 1 0 1 1 0 8 0 amappl11 160 81 0 66 1 0 1 1 0 8 0 amappl10 152 15 0 14 1 0 1 1 0 8 0 amappl9 144 487 0 482 1 0 1 1 0 8 0 amappl8 136 794 0 727 3 0 3 3 0 8 0 amappl7 128 348 0 323 1 0 1 1 0 8 0 amappl6 120 212 0 197 2 1 1 2 0 8 0 amappl5 112 565 0 547 1 0 1 1 0 8 0 amappl4 104 835 0 808 2 1 1 2 0 8 0 amappl3 96 2867 0 2811 4 2 2 3 0 8 0 amappl2 88 646 0 608 2 1 1 2 0 8 0 amappl1 80 26841 0 26186 19 2 17 19 0 8 1 amappl 88 5670 0 5510 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 80 0 0 2 0 2 2 0 8 0 uaddrrnd 24 1026 0 995 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1026 0 995 1 0 1 1 0 8 0 vmmpekpl 168 13215 0 13161 3 0 3 3 0 8 0 vmmpepl 168 102133 0 99772 136 10 126 128 0 357 4 vmsppl 368 1025 0 995 4 0 4 4 0 8 0 rwobjpl 56 28630 0 24620 59 1 58 58 0 8 0 pdppl 4096 2059 0 1990 124 43 81 87 0 8 12 pvpl 32 487886 0 471355 257 33 224 255 0 265 71 pmappl 248 1025 0 995 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 788 0 56 21 0 21 21 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(fffffd807c691b98,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd807c691b80,fffffd807c691cc8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd807c691b80,fffffd807c691cc8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd807c6917b0,3,0,fffffd800878b810) at sosplice+0x550 sosetopt(fffffd807c6917b0,ffff,1023,fffffd80696c2f00) at sosetopt+0x7f4 sys_setsockopt(ffff8000fffeca88,ffff80002ca6e0b8,ffff80002ca6e100) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002ca6e180) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002ca6e180) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe8100b6c740, 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: 0x7f7fffff2a00, 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: 0x7f7fffff2a00, count: -3