panic: lock (rwlock) solock not locked Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 520532 37184 32767 0x10 0x4000000 0 syz-executor.3 *422911 81673 32767 0x10 0x4000000 1K syz-executor.4 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(fffffd806f698208,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd806f6981f0,fffffd806f698338) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd806f6981f0,fffffd806f698338) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd807b835220,3,0,fffffd806ef3c010) at sosplice+0x550 sosetopt(fffffd807b835220,ffff,1023,fffffd80684ba500) at sosetopt+0x7f4 sys_setsockopt(ffff80002599e540,ffff800028230948,ffff800028230990) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff800028230a10) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800028230a10) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4c6104598a0, 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(fffffd806f698208,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd806f6981f0,fffffd806f698338) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd806f6981f0,fffffd806f698338) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd807b835220,3,0,fffffd806ef3c010) at sosplice+0x550 sosetopt(fffffd807b835220,ffff,1023,fffffd80684ba500) at sosetopt+0x7f4 sys_setsockopt(ffff80002599e540,ffff800028230948,ffff800028230990) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff800028230a10) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800028230a10) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4c6104598a0, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800028230690 rbx 0xffff800020dd9b8f rdx 0xffff800000bd3f40 rcx 0 rax 0xffff80002599e540 r8 0x101010101010101 r9 0x8080808080808080 r10 0x19bed16d69c7aece r11 0xe7246179ce48b899 r12 0xffff800020dd9990 r13 0 r14 0 r15 0x1 rip 0xffffffff81fd76c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800028230680 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.4) pid=422911 stat=onproc flags process=10 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2548,0xffff80002599ea90 process=0xffff8000fffef620 user=0xffff80002822b000, vmspace=0xfffffd806a7605d0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 37184 298579 54575 32767 2 0x10 syz-executor.3 37184 520532 54575 32767 7 0x4000010 syz-executor.3 81673 245057 5723 32767 2 0x10 syz-executor.4 81673 1365 5723 32767 3 0x4000090 netcon2 syz-executor.4 *81673 422911 5723 32767 7 0x4000010 syz-executor.4 58951 31999 15025 32767 2 0x10 syz-executor.6 58951 390970 15025 32767 3 0x4000090 fsleep syz-executor.6 58951 421546 15025 32767 3 0x4000090 fsleep syz-executor.6 58951 111604 15025 32767 3 0x4000090 fsleep syz-executor.6 15025 79371 52090 32767 3 0x90 nanoslp syz-executor.6 52090 507488 88127 0 3 0x82 wait syz-executor.6 2266 382221 0 0 3 0x14200 bored sosplice 54575 6553 43313 32767 3 0x90 nanoslp syz-executor.3 43313 334124 88127 0 3 0x82 wait syz-executor.3 15111 374751 38574 32767 3 0x90 piperd syz-executor.1 39959 331462 9338 32767 2 0x490 syz-executor.7 94300 381513 26921 32767 2 0x490 syz-executor.2 5723 252004 52620 32767 3 0x90 nanoslp syz-executor.4 9338 400779 88127 0 3 0x82 wait syz-executor.7 52620 403833 88127 0 3 0x82 wait syz-executor.4 26921 228863 88127 0 3 0x82 wait syz-executor.2 49892 396785 45365 32767 3 0x90 piperd syz-executor.0 38601 401719 98659 32767 2 0x490 syz-executor.5 38574 436493 88127 0 3 0x82 wait syz-executor.1 98659 274361 88127 0 3 0x82 wait syz-executor.5 45365 437008 88127 0 3 0x82 wait syz-executor.0 88127 484909 89426 0 3 0x82 wait syz-fuzzer 88127 278895 89426 0 2 0x4000482 syz-fuzzer 88127 419514 89426 0 3 0x4000082 wait syz-fuzzer 88127 504758 89426 0 3 0x4000082 thrsleep syz-fuzzer 88127 159242 89426 0 3 0x4000082 thrsleep syz-fuzzer 88127 160448 89426 0 3 0x4000082 wait syz-fuzzer 88127 459458 89426 0 3 0x4000082 thrsleep syz-fuzzer 88127 198967 89426 0 3 0x4000082 thrsleep syz-fuzzer 88127 128353 89426 0 3 0x4000082 wait syz-fuzzer 88127 122983 89426 0 3 0x4000082 kqread syz-fuzzer 88127 235624 89426 0 3 0x4000082 wait syz-fuzzer 88127 408707 89426 0 3 0x4000082 wait syz-fuzzer 88127 24545 89426 0 3 0x4000082 thrsleep syz-fuzzer 88127 366707 89426 0 3 0x4000082 wait syz-fuzzer 88127 517990 89426 0 3 0x4000082 thrsleep syz-fuzzer 88127 155826 89426 0 3 0x4000082 wait syz-fuzzer 89426 455404 34136 0 3 0x10008a sigsusp ksh 34136 521641 41024 0 3 0x9a kqread sshd 29658 485677 1 0 3 0x100083 ttyin getty 41024 357625 1 0 3 0x88 kqread sshd 90286 485912 13263 73 3 0x1100090 kqread syslogd 13263 139073 1 0 3 0x100082 netio syslogd 3143 398436 1 0 3 0x100080 kqread resolvd 25209 520070 55717 77 3 0x100092 kqread dhcpleased 87747 333586 55717 77 3 0x100092 kqread dhcpleased 55717 252473 1 0 3 0x80 kqread dhcpleased 98340 116004 0 0 3 0x14200 bored smr 41973 500865 0 0 2 0x14200 zerothread 92573 239650 0 0 3 0x14200 aiodoned aiodoned 93802 36131 0 0 3 0x14200 syncer update 54161 300463 0 0 3 0x14200 cleaner cleaner 29041 458341 0 0 3 0x14200 reaper reaper 96472 44129 0 0 3 0x14200 pgdaemon pagedaemon 11466 216373 0 0 3 0x14200 bored viomb 30760 223121 0 0 3 0x40014200 acpi0 acpi0 43842 264826 0 0 3 0x40014200 idle1 94750 41138 0 0 3 0x14200 bored softnet 27321 320569 0 0 3 0x14200 bored softnet 42373 520892 0 0 3 0x14200 bored softnet 89792 341436 0 0 3 0x14200 bored softnet 96051 399216 0 0 3 0x14200 bored systqmp 84862 100738 0 0 3 0x14200 bored systq 44200 64166 0 0 3 0x40014200 bored softclock 93171 78126 0 0 3 0x40014200 idle0 1 431833 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 81673 (syz-executor.4) thread 0xffff80002599e540 (422911) 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 10224 6413K 6420K 78643K 11328 0 pcb 13 10K 12K 78643K 15 0 rtable 234 6K 6K 78643K 517 0 ifaddr 82 16K 16K 78643K 112 0 counters 56 35K 35K 78643K 64 0 ioctlops 0 0K 2K 78643K 43 0 iov 0 0K 16K 78643K 409 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1270 79K 79K 78643K 1700 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 27 0 VM map 2 1K 1K 78643K 2 0 sem 11 1K 1K 78643K 19 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 21 77K 113K 78643K 2407 0 sigio 0 0K 0K 78643K 14 0 proc 56 78K 115K 78643K 698 0 subproc 104 6K 6K 78643K 156 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 311 0 in_multi 99 6K 6K 78643K 186 0 ether_multi 1 0K 0K 78643K 16 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 289 1288K 1288K 78643K 289 0 exec 0 0K 2K 78643K 1365 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 270 84K 99K 78643K 15690 0 UVM aobj 98 7K 7K 78643K 98 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 110 0 NDP 11 0K 2K 78643K 39 0 temp 124 4726K 4790K 78643K 9005 0 kqueue 12 18K 26K 78643K 207 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 264 0 261 3 2 1 2 0 8 0 rtentry 112 155 0 45 4 0 4 4 0 8 0 unpcb 144 4248 0 4234 30 24 6 10 0 8 5 syncache 296 30 0 30 5 4 1 1 0 8 1 tcpqe 32 8 0 8 4 4 0 1 0 8 0 tcpcb 768 929 0 909 31 28 3 11 0 8 1 arp 120 26 0 8 1 0 1 1 0 8 0 ipq 40 6 0 1 2 1 1 1 0 8 0 ipqe 40 10 0 5 2 1 1 1 0 8 0 inpcb 368 2080 0 2070 40 33 7 14 0 8 6 nd6 48 36 0 12 1 0 1 1 0 8 0 kcovpl 48 12 0 4 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 628 0 176 29 0 29 29 0 8 0 art_table 32 629 0 176 4 0 4 4 0 8 0 art_node 16 154 0 54 1 0 1 1 0 8 0 sysvmsgpl 40 39 0 17 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 17 0 8 1 0 1 1 0 8 0 shmpl 112 95 0 0 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 4479 0 3044 90 0 90 90 0 8 0 ffsino 272 4479 0 3044 96 0 96 96 0 8 0 nchpl 144 7752 0 6115 63 0 63 63 0 8 0 uvmvnodes 80 4644 0 0 95 0 95 95 0 8 0 vnodes 216 4644 0 0 258 0 258 258 0 8 0 namei 1024 25533 0 25533 2 1 1 2 0 8 1 percpumem 16 44 0 4 1 0 1 1 0 8 0 kstatmem 264 30 0 8 2 0 2 2 0 8 0 scxspl 216 21961 0 21961 14 11 3 8 0 8 3 plimitpl 152 690 0 668 2 1 1 2 0 8 0 sigapl 424 2688 0 2635 7 0 7 7 0 8 0 futexpl 64 20176 0 20173 1 0 1 1 0 8 0 knotepl 120 203 0 0 6 0 6 6 0 8 0 kqueuepl 216 1367 0 1358 17 12 5 5 0 8 4 pipepl 320 643 0 615 16 8 8 8 0 8 5 fdescpl 496 2670 0 2638 7 1 6 6 0 8 0 filepl 152 18526 0 18287 50 32 18 22 0 8 8 lockfpl 104 415 0 413 1 0 1 1 0 8 0 lockfspl 48 187 0 185 1 0 1 1 0 8 0 sessionpl 144 27 0 11 1 0 1 1 0 8 0 pgrppl 48 38 0 22 1 0 1 1 0 8 0 ucredpl 104 2671 0 2653 1 0 1 1 0 8 0 zombiepl 144 2638 0 2635 1 0 1 1 0 8 0 processpl 1064 2688 0 2635 4 0 4 4 0 8 0 procpl 672 7066 0 6992 10 2 8 8 0 8 0 sosppl 168 35 0 33 5 4 1 1 0 8 0 sockpl 488 6617 0 6590 147 136 11 36 0 8 7 mcl64k 65536 19 0 0 3 0 3 3 0 8 0 mcl16k 16384 17 0 0 3 0 3 3 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 5 0 0 1 0 1 1 0 8 0 mcl8k 8192 18 0 0 3 0 3 3 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 178 0 0 21 0 21 21 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 1058 0 0 63 0 63 63 0 8 0 bufpl 288 6743 0 413 453 0 453 453 0 8 0 anonpl 24 506378 0 493690 119 27 92 102 0 186 2 amapchunkpl 152 44728 0 44088 47 15 32 37 0 158 3 amappl16 200 7168 0 6787 51 21 30 33 0 8 8 amappl15 192 1160 0 1152 1 0 1 1 0 8 0 amappl14 184 858 0 848 1 0 1 1 0 8 0 amappl13 176 391 0 388 1 0 1 1 0 8 0 amappl12 168 50 0 46 1 0 1 1 0 8 0 amappl11 160 372 0 357 1 0 1 1 0 8 0 amappl10 152 562 0 560 1 0 1 1 0 8 0 amappl9 144 515 0 512 1 0 1 1 0 8 0 amappl8 136 690 0 618 3 0 3 3 0 8 0 amappl7 128 139 0 120 1 0 1 1 0 8 0 amappl6 120 228 0 213 2 0 2 2 0 8 0 amappl5 112 1809 0 1793 1 0 1 1 0 8 0 amappl4 104 2340 0 2299 2 0 2 2 0 8 0 amappl3 96 7536 0 7478 2 0 2 2 0 8 0 amappl2 88 831 0 796 2 1 1 2 0 8 0 amappl1 80 67847 0 67150 19 2 17 19 0 8 0 amappl 88 15077 0 14903 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 97 0 0 2 0 2 2 0 8 0 uaddrrnd 24 2670 0 2638 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2670 0 2638 1 0 1 1 0 8 0 vmmpekpl 168 24046 0 23978 4 0 4 4 0 8 0 vmmpepl 168 263222 0 260716 146 16 130 132 0 357 2 vmsppl 368 2669 0 2638 4 0 4 4 0 8 0 rwobjpl 56 70295 0 64187 88 1 87 87 0 8 0 pdppl 4096 5347 0 5276 163 82 81 89 0 8 10 pvpl 32 1052605 0 1035110 262 93 169 256 0 265 11 pmappl 248 2669 0 2638 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 980 0 118 25 0 25 25 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 copy_fault() at copy_fault syscall(ffff800028236240) at syscall+0x4c3 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800028236240) at syscall+0x4c3 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x12fb4e8b270, count: 9 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 copy_fault() at copy_fault syscall(ffff800028236240) at syscall+0x4c3 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800028236240) at syscall+0x4c3 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x12fb4e8b270, count: -6 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(fffffd806f698208,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd806f6981f0,fffffd806f698338) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd806f6981f0,fffffd806f698338) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd807b835220,3,0,fffffd806ef3c010) at sosplice+0x550 sosetopt(fffffd807b835220,ffff,1023,fffffd80684ba500) at sosetopt+0x7f4 sys_setsockopt(ffff80002599e540,ffff800028230948,ffff800028230990) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff800028230a10) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800028230a10) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4c6104598a0, 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(fffffd806f698208,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd806f6981f0,fffffd806f698338) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd806f6981f0,fffffd806f698338) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd807b835220,3,0,fffffd806ef3c010) at sosplice+0x550 sosetopt(fffffd807b835220,ffff,1023,fffffd80684ba500) at sosetopt+0x7f4 sys_setsockopt(ffff80002599e540,ffff800028230948,ffff800028230990) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff800028230a10) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800028230a10) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4c6104598a0, count: -9