panic: lock (rwlock) solock not locked Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 70602 39701 32767 0x10 0x4000000 0 syz-executor.5 52204 99514 32767 0x10 0 1 syz-executor.2 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(fffffd806a71cda8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 somove(fffffd806a71c220,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd806a71c220,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd806a71c220,3,0,0) at sosplice+0x50b sys/kern/uipc_socket.c:1346 sosetopt(fffffd806a71c220,ffff,1023,fffffd806a9c5300) at sosetopt+0x7f4 sys_setsockopt(ffff800024771268,ffff80002e502648,ffff80002e502690) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e502710) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e502710) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1b028770a20, 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(fffffd806a71cda8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 somove(fffffd806a71c220,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd806a71c220,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd806a71c220,3,0,0) at sosplice+0x50b sys/kern/uipc_socket.c:1346 sosetopt(fffffd806a71c220,ffff,1023,fffffd806a9c5300) at sosetopt+0x7f4 sys_setsockopt(ffff800024771268,ffff80002e502648,ffff80002e502690) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e502710) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e502710) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1b028770a20, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002e502340 rbx 0xffffffff829bab8f cpu_info_full_primary+0x2b8f rdx 0xffff800000bf4500 rcx 0 rax 0xffff800024771268 r8 0x101010101010101 r9 0x8080808080808080 r10 0xe1a7baa79ab9f588 r11 0xe5c33a3928fce5d0 r12 0xffffffff829ba990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff81fd76c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e502330 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.5) pid=70602 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=77, nice=20 forw=0xffffffffffffffff, list=0xffff800024771ce8,0xffff800024771518 process=0xffff8000ffff10b8 user=0xffff80002e4fd000, vmspace=0xfffffd806c479a20 estcpu=27, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 85124 524257 89605 32767 2 0x10 syz-executor.0 85124 470820 89605 32767 3 0x4000090 fsleep syz-executor.0 22697 518699 17455 32767 2 0x10 syz-executor.1 22697 264382 17455 32767 3 0x4000090 fsleep syz-executor.1 39482 167418 49558 32767 2 0x10 syz-executor.6 62628 67649 81664 32767 2 0x10 syz-executor.7 62628 428064 81664 32767 3 0x4000090 fsleep syz-executor.7 17643 166857 66447 32767 2 0x10 syz-executor.3 17643 91302 66447 32767 3 0x4000090 fsleep syz-executor.3 39701 243080 71667 32767 2 0x10 syz-executor.5 *39701 70602 71667 32767 7 0x4000010 syz-executor.5 26506 184645 99514 32767 2 0x10 syz-executor.2 26506 300780 99514 32767 3 0x4000090 fsleep syz-executor.2 49558 398990 69799 32767 3 0x90 nanoslp syz-executor.6 69799 188330 5750 0 3 0x82 wait syz-executor.6 81664 288767 83019 32767 3 0x90 nanoslp syz-executor.7 83019 54074 5750 0 3 0x82 wait syz-executor.7 66447 323811 28910 32767 2 0x10 syz-executor.3 28910 191894 5750 0 3 0x82 wait syz-executor.3 1421 14588 0 0 3 0x14200 bored sosplice 71667 276488 73927 32767 3 0x90 nanoslp syz-executor.5 73401 458870 96625 32767 2 0x10 syz-executor.4 73927 304366 5750 0 3 0x82 wait syz-executor.5 99514 52204 39339 32767 7 0x10 syz-executor.2 96625 168941 5750 0 3 0x82 wait syz-executor.4 39339 234351 5750 0 3 0x82 wait syz-executor.2 17455 359317 57270 32767 3 0x90 nanoslp syz-executor.1 89605 8074 92064 32767 2 0x490 syz-executor.0 57270 103456 5750 0 3 0x82 wait syz-executor.1 92064 201590 5750 0 3 0x82 wait syz-executor.0 5750 483639 5230 0 3 0x82 wait syz-fuzzer 5750 129556 5230 0 3 0x4000082 nanoslp syz-fuzzer 5750 361976 5230 0 3 0x4000082 wait syz-fuzzer 5750 65021 5230 0 3 0x4000082 thrsleep syz-fuzzer 5750 235464 5230 0 3 0x4000082 thrsleep syz-fuzzer 5750 316471 5230 0 3 0x4000082 wait syz-fuzzer 5750 481909 5230 0 3 0x4000082 wait syz-fuzzer 5750 154297 5230 0 3 0x4000082 wait syz-fuzzer 5750 402684 5230 0 3 0x4000082 thrsleep syz-fuzzer 5750 319788 5230 0 3 0x4000082 wait syz-fuzzer 5750 462265 5230 0 3 0x4000082 thrsleep syz-fuzzer 5750 396830 5230 0 3 0x4000082 wait syz-fuzzer 5750 356639 5230 0 3 0x4000082 wait syz-fuzzer 5750 42485 5230 0 3 0x4000082 thrsleep syz-fuzzer 5750 323012 5230 0 3 0x4000082 thrsleep syz-fuzzer 5750 113157 5230 0 3 0x4000082 kqread syz-fuzzer 5230 21034 64868 0 3 0x10008a sigsusp ksh 64868 256218 83958 0 3 0x9a kqread sshd 32312 292753 1 0 3 0x100083 ttyin getty 83958 368991 1 0 3 0x88 kqread sshd 36601 282536 85323 73 3 0x1100090 kqread syslogd 85323 57782 1 0 3 0x100082 netio syslogd 32962 392556 1 0 3 0x100080 kqread resolvd 45238 389128 59225 77 3 0x100092 kqread dhcpleased 99969 150370 59225 77 3 0x100092 kqread dhcpleased 59225 234779 1 0 3 0x80 kqread dhcpleased 19275 108226 0 0 3 0x14200 bored smr 57488 229315 0 0 2 0x14200 zerothread 29199 378954 0 0 3 0x14200 aiodoned aiodoned 80088 43256 0 0 3 0x14200 syncer update 69675 450056 0 0 3 0x14200 cleaner cleaner 87566 245931 0 0 3 0x14200 reaper reaper 26166 83441 0 0 3 0x14200 pgdaemon pagedaemon 90549 499272 0 0 3 0x14200 bored viomb 86088 481112 0 0 3 0x40014200 acpi0 acpi0 21798 103580 0 0 3 0x40014200 idle1 73709 367887 0 0 3 0x14200 bored softnet 77967 253528 0 0 3 0x14200 bored softnet 96654 98416 0 0 3 0x14200 bored softnet 48598 303402 0 0 3 0x14200 bored softnet 64220 467969 0 0 3 0x14200 bored systqmp 22903 157505 0 0 3 0x14200 bored systq 95782 449676 0 0 2 0x40014200 softclock 34499 5825 0 0 3 0x40014200 idle0 1 397208 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 39701 (syz-executor.5) thread 0xffff800024771268 (70602) 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 10215 6412K 6420K 78643K 11346 0 pcb 13 12K 14K 78643K 17 0 rtable 238 6K 7K 78643K 1193 0 ifaddr 82 17K 17K 78643K 177 0 sysctl 3 1K 1K 78643K 3 0 counters 56 35K 35K 78643K 82 0 ioctlops 0 0K 2K 78643K 107 0 iov 0 0K 20K 78643K 976 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1271 79K 79K 78643K 2973 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 33 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 1K 78643K 1728 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 25 93K 109K 78643K 11131 0 sigio 0 0K 0K 78643K 261 0 proc 56 78K 115K 78643K 1375 0 subproc 104 6K 6K 78643K 273 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 827 0 in_multi 99 6K 7K 78643K 506 0 ether_multi 1 0K 0K 78643K 72 0 mrt 2 0K 0K 78643K 2 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 235 1049K 1049K 78643K 235 0 exec 0 0K 2K 78643K 1522 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 352 94K 98K 78643K 62334 0 UVM aobj 7 6K 6K 78643K 7 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 622 0 NDP 11 0K 2K 78643K 66 0 temp 124 4726K 4854K 78643K 28265 0 kqueue 13 20K 26K 78643K 799 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 536 0 533 4 3 1 3 0 8 0 rtentry 112 265 0 153 4 0 4 4 0 8 0 unpcb 144 15903 0 15888 89 88 1 10 0 8 0 syncache 296 221 0 221 20 20 0 1 0 8 0 tcpqe 32 101 0 101 12 12 0 1 0 8 0 tcpcb 768 4320 0 4315 122 119 3 19 0 8 2 arp 120 47 0 29 1 0 1 1 0 8 0 ipq 40 13 0 13 4 4 0 1 0 8 0 ipqe 40 101 0 101 4 4 0 1 0 8 0 inpcb 368 8949 0 8940 141 137 4 14 0 8 3 nd6 48 71 0 45 1 0 1 1 0 8 0 kcovpl 48 21 0 13 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1068 0 597 31 1 30 30 0 8 0 art_table 32 1069 0 597 4 0 4 4 0 8 0 art_node 16 264 0 162 1 0 1 1 0 8 0 sysvmsgpl 40 40 0 40 1 1 0 1 0 8 0 semapl 112 1716 0 1706 1 0 1 1 0 8 0 shmpl 112 4 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 16093 0 14639 92 0 92 92 0 8 0 ffsino 272 16093 0 14639 99 1 98 98 0 8 0 nchpl 144 30930 0 29294 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 92691 0 92691 4 3 1 2 0 8 1 percpumem 16 53 0 13 1 0 1 1 0 8 0 kstatmem 264 48 0 26 2 0 2 2 0 8 0 scxspl 216 84869 0 84869 33 30 3 7 0 8 3 plimitpl 152 1550 0 1527 8 7 1 2 0 8 0 sigapl 424 11393 0 11339 7 0 7 7 0 8 0 futexpl 64 87350 0 87345 3 2 1 1 0 8 0 knotepl 120 876 0 0 17 3 14 17 0 8 0 kqueuepl 216 1905 0 1896 23 20 3 7 0 8 2 pipepl 320 2063 0 2035 50 47 3 13 0 8 0 fdescpl 496 11375 0 11339 7 2 5 6 0 8 0 filepl 152 68516 0 68276 147 136 11 25 0 8 1 lockfpl 104 2541 0 2539 1 0 1 1 0 8 0 lockfspl 48 1127 0 1125 1 0 1 1 0 8 0 sessionpl 144 36 0 20 1 0 1 1 0 8 0 pgrppl 48 1527 0 1511 1 0 1 1 0 8 0 ucredpl 104 12625 0 12607 1 0 1 1 0 8 0 zombiepl 144 11339 0 11339 3 2 1 1 0 8 1 processpl 1064 11393 0 11339 4 0 4 4 0 8 0 procpl 672 28684 0 28609 31 23 8 9 0 8 1 sosppl 168 219 0 217 14 13 1 1 0 8 0 sockpl 488 25563 0 25534 414 405 9 37 0 8 4 mcl64k 65536 25 0 0 4 1 3 3 0 8 0 mcl16k 16384 25 0 0 3 0 3 3 0 8 0 mcl12k 12288 46 0 0 2 0 2 2 0 8 0 mcl9k 9216 21 0 0 2 0 2 2 0 8 0 mcl8k 8192 41 0 0 4 1 3 3 0 8 0 mcl4k 4096 41 0 0 5 2 3 4 0 8 0 mcl2k2 2112 7 0 0 1 0 1 1 0 8 0 mcl2k 2048 583 0 0 23 0 23 23 0 8 0 mtagpl 96 7 0 0 1 0 1 1 0 8 0 mbufpl 256 3110 0 0 180 1 179 179 0 8 0 bufpl 288 19051 0 12724 453 0 453 453 0 8 0 anonpl 24 2084359 0 2072698 164 89 75 112 0 186 2 amapchunkpl 152 177916 0 177278 71 44 27 35 0 158 0 amappl16 200 31441 0 31141 142 124 18 43 0 8 2 amappl15 192 599 0 593 1 0 1 1 0 8 0 amappl14 184 516 0 512 1 0 1 1 0 8 0 amappl13 176 1492 0 1489 1 0 1 1 0 8 0 amappl12 168 2212 0 2200 1 0 1 1 0 8 0 amappl11 160 650 0 633 1 0 1 1 0 8 0 amappl10 152 2778 0 2764 1 0 1 1 0 8 0 amappl9 144 4241 0 4233 1 0 1 1 0 8 0 amappl8 136 1165 0 1008 7 1 6 6 0 8 0 amappl7 128 285 0 264 1 0 1 1 0 8 0 amappl6 120 4018 0 3992 2 1 1 2 0 8 0 amappl5 112 12779 0 12751 1 0 1 1 0 8 0 amappl4 104 3103 0 3072 11 10 1 2 0 8 0 amappl3 96 34844 0 34776 2 0 2 2 0 8 0 amappl2 88 2486 0 2436 4 2 2 2 0 8 0 amappl1 80 274496 0 273739 23 6 17 19 0 8 1 amappl 88 61087 0 60897 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 6 0 0 1 0 1 1 0 8 0 uaddrrnd 24 11376 0 11340 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 11376 0 11340 1 0 1 1 0 8 0 vmmpekpl 168 83380 0 83323 3 0 3 3 0 8 0 vmmpepl 168 1106711 0 1103843 262 130 132 145 0 357 3 vmsppl 368 11375 0 11340 4 0 4 4 0 8 0 rwobjpl 56 264822 0 257470 113 7 106 110 0 8 0 pdppl 4096 22759 0 22680 387 306 81 87 0 8 2 pvpl 32 4350351 0 4333301 329 181 148 255 0 265 8 pmappl 248 11375 0 11340 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1437 0 455 30 1 29 29 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(fffffd806a71cda8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 somove(fffffd806a71c220,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd806a71c220,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd806a71c220,3,0,0) at sosplice+0x50b sys/kern/uipc_socket.c:1346 sosetopt(fffffd806a71c220,ffff,1023,fffffd806a9c5300) at sosetopt+0x7f4 sys_setsockopt(ffff800024771268,ffff80002e502648,ffff80002e502690) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e502710) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e502710) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1b028770a20, count: -9 ddb{0}> machine ddbcpu 1