panic: lock (rwlock) solock not locked Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *399500 52088 0 0x2 0 0K syz-executor1980428307 240013 13139 0 0x12 0 1 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82583901) at panic+0x177 sys/kern/subr_prf.c:198 witness_assert(fffffd807829dba8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd807829db90,fffffd807829dcd8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd807829db90,fffffd807829dcd8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd807829d7c0,5,0,0) at sosplice+0x550 sosetopt(fffffd807829d7c0,ffff,1023,fffffd806d346700) at sosetopt+0x7f4 sys_setsockopt(ffff8000212327e8,ffff8000212afdd8,ffff8000212afe20) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff8000212afea0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000212afea0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff9cd0, 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(ffffffff82583901) at panic+0x177 sys/kern/subr_prf.c:198 witness_assert(fffffd807829dba8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd807829db90,fffffd807829dcd8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd807829db90,fffffd807829dcd8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd807829d7c0,5,0,0) at sosplice+0x550 sosetopt(fffffd807829d7c0,ffff,1023,fffffd806d346700) at sosetopt+0x7f4 sys_setsockopt(ffff8000212327e8,ffff8000212afdd8,ffff8000212afe20) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff8000212afea0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000212afea0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff9cd0, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000212afb20 rbx 0xffffffff8296cb8f cpu_info_full_primary+0x2b8f rdx 0x3fd rcx 0 rax 0x27 r8 0x101010101010101 r9 0x8080808080808080 r10 0x8c0a6f5f3e904356 r11 0x7d228f1093222a1c r12 0xffffffff8296c990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff81f03e68 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000212afb10 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor1980428307) pid=399500 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000212337a8,0xffff800021232fd8 process=0xffff800021299900 user=0xffff8000212aa000, vmspace=0xfffffd806ef5a008 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 28773 498374 0 0 2 0x14200 sosplice *52088 399500 89382 0 7 0x2 syz-executor1980428307 89382 189216 13139 0 3 0x10008a sigsusp ksh 13139 240013 87783 0 7 0x12 sshd 71319 424162 1 0 3 0x100083 ttyin getty 87783 146238 1 0 3 0x88 kqread sshd 53745 491677 46750 74 3 0x1100092 bpf pflogd 46750 198214 1 0 3 0x80 netio pflogd 3338 346119 30912 73 3 0x1100090 kqread syslogd 30912 488350 1 0 3 0x100082 netio syslogd 14916 484382 1 0 3 0x100080 kqread resolvd 76753 447174 32550 77 3 0x100092 kqread dhcpleased 28829 302290 32550 77 3 0x100092 kqread dhcpleased 32550 280064 1 0 3 0x80 kqread dhcpleased 92741 410543 0 0 3 0x14200 bored smr 4219 107099 0 0 2 0x14200 zerothread 90400 467760 0 0 3 0x14200 aiodoned aiodoned 74069 277771 0 0 3 0x14200 syncer update 21791 62262 0 0 3 0x14200 cleaner cleaner 14754 154199 0 0 3 0x14200 reaper reaper 77836 272037 0 0 3 0x14200 pgdaemon pagedaemon 39958 386883 0 0 3 0x14200 bored viomb 35362 369270 0 0 3 0x40014200 acpi0 acpi0 69266 445186 0 0 3 0x40014200 idle1 28544 133890 0 0 3 0x14200 bored softnet 94239 218892 0 0 3 0x14200 bored softnet 99597 435515 0 0 3 0x14200 bored softnet 13941 351918 0 0 3 0x14200 bored softnet 62628 32410 0 0 3 0x14200 bored systqmp 68002 478619 0 0 3 0x14200 bored systq 13349 362493 0 0 3 0x40014200 bored softclock 71960 80268 0 0 3 0x40014200 idle0 1 170866 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 52088 (syz-executor1980428307) thread 0xffff8000212327e8 (399500) exclusive rwlock netlock r = 0 (0xffffffff82991290) #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 (0xffffffff829ee950) #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 10162 6456K 6457K 78643K 11252 0 pcb 13 8K 8K 78643K 13 0 rtable 58 1K 2K 78643K 107 0 ifaddr 30 8K 8K 78643K 33 0 counters 40 33K 33K 78643K 40 0 ioctlops 0 0K 4K 78643K 1479 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1167 73K 73K 78643K 1180 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 1K 1K 78643K 2 0 sem 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 1 0K 0K 78643K 1 0 proc 67 91K 91K 78643K 282 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 11 0K 0K 78643K 11 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 25 122K 122K 78643K 25 0 exec 0 0K 2K 78643K 431 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 56 3K 5K 78643K 1532 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 4 0K 0K 78643K 4 0 temp 23 4709K 4773K 78643K 2498 0 kqueue 11 16K 18K 78643K 24 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 17 0 14 1 0 1 1 0 8 0 rtentry 112 23 0 1 1 0 1 1 0 8 0 unpcb 144 36 0 20 1 0 1 1 0 8 0 syncache 296 5 0 5 2 1 1 1 0 8 1 tcpcb 768 9 0 5 1 0 1 1 0 8 0 arp 120 2 0 0 1 0 1 1 0 8 0 inpcb 368 34 0 26 1 0 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 8 0 0 1 0 1 1 0 8 0 pfstkey 120 8 0 0 1 0 1 1 0 8 0 pfstate 336 8 0 0 1 0 1 1 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 97 0 0 7 0 7 7 0 8 0 art_table 32 98 0 0 1 0 1 1 0 8 0 art_node 16 22 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1424 0 39 87 0 87 87 0 8 0 ffsino 272 1424 0 39 93 0 93 93 0 8 0 nchpl 144 1611 0 48 58 0 58 58 0 8 0 uvmvnodes 80 1434 0 0 30 0 30 30 0 8 0 vnodes 216 1434 0 0 80 0 80 80 0 8 0 namei 1024 4383 0 4383 2 1 1 1 0 8 1 percpumem 16 32 0 0 1 0 1 1 0 8 0 kstatmem 264 8 0 0 1 0 1 1 0 8 0 scxspl 216 4090 0 4090 10 2 8 8 0 8 8 plimitpl 152 16 0 9 1 0 1 1 0 8 0 sigapl 424 323 0 290 5 1 4 5 0 8 0 knotepl 120 44 0 0 2 0 2 2 0 8 0 kqueuepl 216 20 0 13 1 0 1 1 0 8 0 pipepl 320 86 0 83 2 1 1 1 0 8 0 fdescpl 496 305 0 290 3 0 3 3 0 8 0 filepl 152 1185 0 1124 3 0 3 3 0 8 0 lockfpl 104 6 0 4 1 0 1 1 0 8 0 lockfspl 48 4 0 2 1 0 1 1 0 8 0 sessionpl 144 18 0 9 1 0 1 1 0 8 0 pgrppl 48 18 0 9 1 0 1 1 0 8 0 ucredpl 104 69 0 57 1 0 1 1 0 8 0 zombiepl 144 290 0 290 2 1 1 1 0 8 1 processpl 1064 323 0 290 3 0 3 3 0 8 0 procpl 672 323 0 290 4 1 3 4 0 8 0 sosppl 168 2 0 0 1 0 1 1 0 8 0 sockpl 488 87 0 60 5 1 4 4 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 74 0 0 9 0 9 9 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 124 0 0 8 0 8 8 0 8 0 bufpl 288 1989 0 85 136 0 136 136 0 8 0 anonpl 24 37825 0 35841 18 4 14 15 0 186 2 amapchunkpl 152 2773 0 2677 6 2 4 6 0 158 0 amappl16 200 31 0 30 2 1 1 1 0 8 0 amappl15 192 67 0 63 1 0 1 1 0 8 0 amappl13 176 36 0 33 1 0 1 1 0 8 0 amappl12 168 3 0 3 2 1 1 1 0 8 1 amappl11 160 66 0 49 1 0 1 1 0 8 0 amappl10 152 2 0 1 1 0 1 1 0 8 0 amappl9 144 473 0 471 1 0 1 1 0 8 0 amappl8 136 364 0 364 2 1 1 1 0 8 1 amappl7 128 66 0 59 1 0 1 1 0 8 0 amappl6 120 90 0 84 1 0 1 1 0 8 0 amappl5 112 92 0 79 1 0 1 1 0 8 0 amappl4 104 632 0 609 1 0 1 1 0 8 0 amappl3 96 442 0 417 1 0 1 1 0 8 0 amappl2 88 312 0 283 1 0 1 1 0 8 0 amappl1 80 9491 0 9071 12 2 10 10 0 8 0 amappl 88 1252 0 1213 2 1 1 2 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 305 0 290 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 305 0 290 1 0 1 1 0 8 0 vmmpekpl 168 6262 0 6247 1 0 1 1 0 8 0 vmmpepl 168 26885 0 26019 48 6 42 42 0 357 3 vmsppl 368 304 0 290 2 0 2 2 0 8 0 rwobjpl 56 9636 0 7625 30 0 30 30 0 8 0 pdppl 4096 617 0 580 61 24 37 45 0 8 0 pvpl 32 126206 0 122249 39 4 35 35 0 265 0 pmappl 248 304 0 290 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 418 0 28 12 0 12 12 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(ffffffff82583901) at panic+0x177 sys/kern/subr_prf.c:198 witness_assert(fffffd807829dba8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd807829db90,fffffd807829dcd8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd807829db90,fffffd807829dcd8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd807829d7c0,5,0,0) at sosplice+0x550 sosetopt(fffffd807829d7c0,ffff,1023,fffffd806d346700) at sosetopt+0x7f4 sys_setsockopt(ffff8000212327e8,ffff8000212afdd8,ffff8000212afe20) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff8000212afea0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000212afea0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff9cd0, 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 __mp_lock(ffffffff829ee748) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff829ee748) at __mp_lock+0x122 sys/kern/kern_lock.c:147 syscall(ffff8000212c4a10) at syscall+0x41d mi_syscall sys/sys/syscall_mi.h:100 [inline] syscall(ffff8000212c4a10) at syscall+0x41d sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe9230, count: 9 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 __mp_lock(ffffffff829ee748) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff829ee748) at __mp_lock+0x122 sys/kern/kern_lock.c:147 syscall(ffff8000212c4a10) at syscall+0x41d mi_syscall sys/sys/syscall_mi.h:100 [inline] syscall(ffff8000212c4a10) at syscall+0x41d sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe9230, count: -6 ddb{1}>