panic: lock (rwlock) solock not locked Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *494772 89285 32767 0x10 0x4000000 0 syz-executor.5 351534 91800 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(fffffd8068b419a8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd8068b41990,fffffd8068b41ad8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8068b41990,fffffd8068b41ad8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8068b411f0,0,0,0) at sosplice+0x550 sosetopt(fffffd8068b411f0,ffff,1023,fffffd8063890000) at sosetopt+0x7f4 sys_setsockopt(ffff80002b0597a0,ffff80002e4a43f8,ffff80002e4a4440) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e4a44c0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e4a44c0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5b248f4f3a0, 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(fffffd8068b419a8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd8068b41990,fffffd8068b41ad8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8068b41990,fffffd8068b41ad8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8068b411f0,0,0,0) at sosplice+0x550 sosetopt(fffffd8068b411f0,ffff,1023,fffffd8063890000) at sosetopt+0x7f4 sys_setsockopt(ffff80002b0597a0,ffff80002e4a43f8,ffff80002e4a4440) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e4a44c0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e4a44c0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5b248f4f3a0, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002e4a4140 rbx 0xffffffff829bab8f cpu_info_full_primary+0x2b8f rdx 0xffff800000bded80 rcx 0 rax 0xffff80002b0597a0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x36dae50f6dd95092 r11 0x9ff1b3140d2abb68 r12 0xffffffff829ba990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff81fd76c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e4a4130 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.5) pid=494772 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=79, nice=20 forw=0xffffffffffffffff, list=0xffff80002b0582a0,0xffffffff82b7cfd0 process=0xffff80002129a150 user=0xffff80002e49f000, vmspace=0xfffffd80694bc018 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 89285 267604 4679 32767 2 0x10 syz-executor.5 *89285 494772 4679 32767 7 0x4000010 syz-executor.5 55529 375471 33358 32767 2 0x10 syz-executor.1 55529 218915 33358 32767 2 0x4000010 syz-executor.1 74832 29808 73601 32767 2 0x10 syz-executor.4 74832 190143 73601 32767 3 0x4000090 fsleep syz-executor.4 2128 143910 52778 32767 2 0x10 syz-executor.2 2128 167728 52778 32767 3 0x4000090 fsleep syz-executor.2 92590 36194 52939 32767 2 0x10 syz-executor.6 92590 120189 52939 32767 3 0x4000090 fsleep syz-executor.6 86126 169647 91800 32767 2 0x10 syz-executor.7 86126 493593 91800 32767 3 0x4000090 fsleep syz-executor.7 86126 341753 91800 32767 3 0x4000090 fsleep syz-executor.7 32935 393683 27076 32767 2 0x10 syz-executor.0 32935 177418 27076 32767 2 0x4000010 syz-executor.0 32935 488069 27076 32767 3 0x4000090 fsleep syz-executor.0 32935 516834 27076 32767 3 0x4000090 fsleep syz-executor.0 52939 251656 53387 32767 2 0x10 syz-executor.6 53387 428005 20071 0 3 0x82 wait syz-executor.6 33358 353638 28445 32767 2 0x490 syz-executor.1 28445 118118 20071 0 3 0x82 wait syz-executor.1 64782 399593 0 0 3 0x14200 bored sosplice 73601 120864 20050 32767 2 0x10 syz-executor.4 91800 351534 68759 32767 7 0x10 syz-executor.7 4679 11096 84960 32767 2 0x10 syz-executor.5 68759 327932 20071 0 3 0x82 wait syz-executor.7 84960 30702 20071 0 3 0x82 wait syz-executor.5 13798 15043 23703 32767 2 0x10 syz-executor.3 20050 135471 20071 0 3 0x82 wait syz-executor.4 52778 166865 74120 32767 2 0x490 syz-executor.2 23703 209919 20071 0 3 0x82 wait syz-executor.3 74120 523168 20071 0 3 0x82 wait syz-executor.2 27076 273518 38139 32767 3 0x90 nanoslp syz-executor.0 38139 400000 20071 0 3 0x82 wait syz-executor.0 20071 371832 49417 0 3 0x82 thrsleep syz-fuzzer 20071 405367 49417 0 3 0x4000082 thrsleep syz-fuzzer 20071 113313 49417 0 3 0x4000082 wait syz-fuzzer 20071 36573 49417 0 3 0x4000082 thrsleep syz-fuzzer 20071 265608 49417 0 3 0x4000082 wait syz-fuzzer 20071 38605 49417 0 3 0x4000082 wait syz-fuzzer 20071 192921 49417 0 3 0x4000082 thrsleep syz-fuzzer 20071 431759 49417 0 3 0x4000082 thrsleep syz-fuzzer 20071 513487 49417 0 3 0x4000082 wait syz-fuzzer 20071 274781 49417 0 3 0x4000082 wait syz-fuzzer 20071 117458 49417 0 3 0x4000082 wait syz-fuzzer 20071 317185 49417 0 3 0x4000082 wait syz-fuzzer 20071 169065 49417 0 3 0x4000082 wait syz-fuzzer 20071 275589 49417 0 3 0x4000082 kqread syz-fuzzer 20071 232877 49417 0 3 0x4000082 thrsleep syz-fuzzer 20071 205791 49417 0 3 0x4000082 thrsleep syz-fuzzer 49417 246655 40574 0 3 0x10008a sigsusp ksh 40574 76763 24284 0 3 0x9a kqread sshd 2511 414537 1 0 3 0x100083 ttyin getty 24284 354500 1 0 3 0x88 kqread sshd 82709 115316 73046 73 3 0x1100090 kqread syslogd 73046 174654 1 0 3 0x100082 netio syslogd 24988 192309 1 0 3 0x100080 kqread resolvd 31507 519904 96858 77 3 0x100092 kqread dhcpleased 98030 258300 96858 77 3 0x100092 kqread dhcpleased 96858 421700 1 0 3 0x80 kqread dhcpleased 1454 378802 0 0 3 0x14200 bored smr 64354 394572 0 0 2 0x14200 zerothread 86891 263720 0 0 3 0x14200 aiodoned aiodoned 12122 146341 0 0 3 0x14200 syncer update 46744 480658 0 0 3 0x14200 cleaner cleaner 45470 446260 0 0 3 0x14200 reaper reaper 86196 3026 0 0 3 0x14200 pgdaemon pagedaemon 22571 312604 0 0 3 0x14200 bored viomb 80319 141709 0 0 3 0x40014200 acpi0 acpi0 26031 20370 0 0 3 0x40014200 idle1 60576 147134 0 0 3 0x14200 bored softnet 37264 509352 0 0 3 0x14200 bored softnet 61430 102700 0 0 3 0x14200 bored softnet 74633 473696 0 0 3 0x14200 bored softnet 28467 172756 0 0 3 0x14200 bored systqmp 76017 378814 0 0 3 0x14200 bored systq 72363 416863 0 0 2 0x40014200 softclock 79327 258560 0 0 3 0x40014200 idle0 1 278907 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 89285 (syz-executor.5) thread 0xffff80002b0597a0 (494772) 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 10216 6412K 6420K 78643K 11332 0 pcb 13 12K 14K 78643K 17 0 rtable 244 6K 7K 78643K 1137 0 ifaddr 82 17K 17K 78643K 142 0 sysctl 3 1K 2K 78643K 5 0 counters 56 35K 35K 78643K 72 0 ioctlops 0 0K 2K 78643K 73 0 iov 0 0K 32K 78643K 1871 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1271 79K 79K 78643K 2767 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 96 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 3279 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 25 93K 117K 78643K 9201 0 sigio 0 0K 0K 78643K 108 0 proc 56 78K 115K 78643K 1235 0 subproc 104 6K 6K 78643K 208 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 982 0 in_multi 99 6K 6K 78643K 319 0 ether_multi 1 0K 0K 78643K 49 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 241 1076K 1076K 78643K 241 0 exec 0 0K 2K 78643K 1911 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 355 89K 978K 78643K 58523 0 UVM aobj 131 6K 6K 78643K 139 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 292 0 NDP 11 0K 2K 78643K 51 0 temp 124 4726K 4854K 78643K 25228 0 kqueue 12 18K 26K 78643K 908 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 1045 0 1041 13 12 1 3 0 8 0 rtentry 112 215 0 100 4 0 4 4 0 8 0 unpcb 144 45179 0 45157 132 121 11 13 0 8 10 syncache 296 100 0 100 16 16 0 1 0 8 0 tcpqe 32 32 0 32 12 12 0 1 0 8 0 tcpcb 768 4175 0 4097 118 110 8 17 0 8 0 arp 120 37 0 18 1 0 1 1 0 8 0 ipq 40 8 0 6 5 4 1 1 0 8 0 ipqe 40 92 0 90 5 4 1 1 0 8 0 inpcb 368 8395 0 8383 125 115 10 17 0 8 8 nd6 48 61 0 33 1 0 1 1 0 8 0 kcovpl 48 16 0 8 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 846 0 371 30 0 30 30 0 8 0 art_table 32 847 0 371 4 0 4 4 0 8 0 art_node 16 214 0 109 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 16 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 3275 0 3265 1 0 1 1 0 8 0 shmpl 112 136 0 8 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 14564 0 13101 92 0 92 92 0 8 0 ffsino 272 14564 0 13101 98 0 98 98 0 8 0 nchpl 144 27795 0 26159 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 89137 0 89137 2 1 1 1 0 8 1 percpumem 16 48 0 8 1 0 1 1 0 8 0 kstatmem 264 38 0 16 2 0 2 2 0 8 0 scxspl 216 85405 0 85405 32 29 3 8 0 8 3 plimitpl 152 2718 0 2695 12 11 1 2 0 8 0 sigapl 424 9462 0 9408 7 0 7 7 0 8 0 futexpl 64 93478 0 93471 2 1 1 1 0 8 0 knotepl 120 544 0 0 11 1 10 10 0 8 0 kqueuepl 216 3091 0 3081 51 46 5 6 0 8 4 pipepl 320 2523 0 2494 62 59 3 9 0 8 0 fdescpl 496 9444 0 9408 7 2 5 6 0 8 0 filepl 152 95865 0 95608 172 150 22 24 0 8 12 lockfpl 104 882 0 880 1 0 1 1 0 8 0 lockfspl 48 363 0 361 1 0 1 1 0 8 0 sessionpl 144 31 0 15 1 0 1 1 0 8 0 pgrppl 48 43 0 27 1 0 1 1 0 8 0 ucredpl 104 9901 0 9883 1 0 1 1 0 8 0 zombiepl 144 9408 0 9408 1 0 1 1 0 8 1 processpl 1064 9462 0 9408 4 0 4 4 0 8 0 procpl 672 28610 0 28531 20 12 8 9 0 8 1 sosppl 168 130 0 128 14 13 1 1 0 8 0 sockpl 488 54781 0 54746 1176 1131 45 46 0 8 40 mcl64k 65536 25 0 0 3 0 3 3 0 8 0 mcl16k 16384 23 0 0 3 0 3 3 0 8 0 mcl12k 12288 33 0 0 3 0 3 3 0 8 0 mcl9k 9216 26 0 0 2 1 1 2 0 8 0 mcl8k 8192 21 0 0 3 0 3 3 0 8 0 mcl4k 4096 49 0 0 6 2 4 4 0 8 0 mcl2k2 2112 12 0 0 1 0 1 1 0 8 0 mcl2k 2048 345 0 0 38 7 31 38 0 8 0 mtagpl 96 6 0 0 1 0 1 1 0 8 0 mbufpl 256 1204 0 0 63 0 63 63 0 8 0 bufpl 288 20043 0 13713 453 0 453 453 0 8 0 anonpl 24 2004682 0 1990968 245 132 113 131 0 186 7 amapchunkpl 152 655560 0 654846 4499 4457 42 4417 0 158 13 amappl16 200 33132 0 32720 183 152 31 47 0 8 8 amappl15 192 1228 0 1219 1 0 1 1 0 8 0 amappl14 184 847 0 838 1 0 1 1 0 8 0 amappl13 176 1253 0 1250 1 0 1 1 0 8 0 amappl12 168 135 0 128 1 0 1 1 0 8 0 amappl11 160 94 0 78 1 0 1 1 0 8 0 amappl10 152 1390 0 1385 1 0 1 1 0 8 0 amappl9 144 1462 0 1459 1 0 1 1 0 8 0 amappl8 136 4682 0 4534 6 0 6 6 0 8 0 amappl7 128 3804 0 3773 3 1 2 2 0 8 1 amappl6 120 1222 0 1207 2 1 1 2 0 8 0 amappl5 112 9466 0 9442 1 0 1 1 0 8 0 amappl4 104 1208 0 1180 2 0 2 2 0 8 0 amappl3 96 30765 0 30698 2 0 2 2 0 8 0 amappl2 88 2176 0 2132 4 2 2 2 0 8 0 amappl1 80 237372 0 236612 23 6 17 19 0 8 1 amappl 88 57441 0 57245 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 138 0 8 3 0 3 3 0 8 0 uaddrrnd 24 9444 0 9408 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 9444 0 9408 1 0 1 1 0 8 0 vmmpekpl 168 84486 0 84440 3 0 3 3 0 8 0 vmmpepl 168 943461 0 940488 262 121 141 154 0 357 10 vmsppl 368 9443 0 9408 4 0 4 4 0 8 0 rwobjpl 56 245628 0 238048 130 19 111 114 0 8 0 pdppl 4096 18895 0 18816 265 184 81 91 0 8 2 pvpl 32 3753675 0 3734536 478 283 195 255 0 265 21 pmappl 248 9443 0 9408 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1192 0 311 26 0 26 26 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(fffffd8068b419a8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd8068b41990,fffffd8068b41ad8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8068b41990,fffffd8068b41ad8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8068b411f0,0,0,0) at sosplice+0x550 sosetopt(fffffd8068b411f0,ffff,1023,fffffd8063890000) at sosetopt+0x7f4 sys_setsockopt(ffff80002b0597a0,ffff80002e4a43f8,ffff80002e4a4440) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e4a44c0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e4a44c0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5b248f4f3a0, count: -9 ddb{0}> machine ddbcpu 1