panic: solock: lock not held Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *122584 39911 0 0 0x4000000 0 syz-executor.5 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8254949d) at panic+0x161 sys/kern/subr_prf.c:198 rw_assert_wrlock(fffffd80686b25e8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 somove(fffffd80725868f0,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd80725868f0,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd80725868f0,5,0,0) at sosplice+0x502 sys/kern/uipc_socket.c:1346 sosetopt(fffffd80725868f0,ffff,1023,fffffd8068d62500) at sosetopt+0x7ec sys_setsockopt(ffff80002179e2a8,ffff80002e8bf4c8,ffff80002e8bf520) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e8bf590) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x875dbb41b90, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: solock: lock not held ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8254949d) at panic+0x161 sys/kern/subr_prf.c:198 rw_assert_wrlock(fffffd80686b25e8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 somove(fffffd80725868f0,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd80725868f0,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd80725868f0,5,0,0) at sosplice+0x502 sys/kern/uipc_socket.c:1346 sosetopt(fffffd80725868f0,ffff,1023,fffffd8068d62500) at sosetopt+0x7ec sys_setsockopt(ffff80002179e2a8,ffff80002e8bf4c8,ffff80002e8bf520) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e8bf590) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x875dbb41b90, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002e8bf1f0 rbx 0xfffffd806826ea80 rdx 0 rcx 0 rax 0xffff80002179e2a8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x9ed984fdc724224c r11 0x15e855cd34151509 r12 0 r13 0xfffffd80686b25e0 r14 0 r15 0x1 rip 0xffffffff8101e5c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e8bf1e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.5) pid=122584 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=83, nice=20 forw=0xffffffffffffffff, list=0xffff80002179f7a8,0xffff80002179fa58 process=0xffff80002170abe0 user=0xffff80002e8ba000, vmspace=0xfffffd806ce31cd0 estcpu=33, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 29238 214595 23360 0 2 0 syz-executor.0 29238 278837 23360 0 3 0x4000080 fsleep syz-executor.0 15933 281935 91939 0 2 0 syz-executor.3 15933 301732 91939 0 3 0x4000080 fsleep syz-executor.3 51101 110269 79148 0 2 0 syz-executor.4 51101 522578 79148 0 3 0x4000080 fsleep syz-executor.4 39911 177886 795 0 2 0 syz-executor.5 *39911 122584 795 0 7 0x4000000 syz-executor.5 66630 363127 3979 0 3 0x80 nanoslp syz-executor.6 66630 205494 3979 0 2 0x4000000 syz-executor.6 66630 208876 3979 0 3 0x4000080 fsleep syz-executor.6 66630 397207 3979 0 3 0x4000080 fsleep syz-executor.6 91939 248688 43301 0 3 0x82 nanoslp syz-executor.3 9537 151320 0 0 3 0x14200 bored sosplice 23360 427391 43301 0 3 0x82 nanoslp syz-executor.0 3979 14111 43301 0 3 0x82 nanoslp syz-executor.6 795 405142 43301 0 3 0x82 nanoslp syz-executor.5 79148 155879 43301 0 3 0x82 nanoslp syz-executor.4 33375 358057 43301 0 3 0x82 nanoslp syz-executor.7 2302 214612 43301 0 2 0x2 syz-executor.1 90802 24454 43301 0 3 0x82 nanoslp syz-executor.2 43301 243761 39938 0 3 0x82 thrsleep syz-fuzzer 43301 282150 39938 0 3 0x4000082 nanoslp syz-fuzzer 43301 2990 39938 0 3 0x4000082 wait syz-fuzzer 43301 358649 39938 0 3 0x4000082 wait syz-fuzzer 43301 169795 39938 0 3 0x4000082 wait syz-fuzzer 43301 370893 39938 0 3 0x4000082 thrsleep syz-fuzzer 43301 140433 39938 0 3 0x4000082 wait syz-fuzzer 43301 145155 39938 0 3 0x4000082 wait syz-fuzzer 43301 304337 39938 0 3 0x4000082 thrsleep syz-fuzzer 43301 210597 39938 0 3 0x4000082 wait syz-fuzzer 43301 243442 39938 0 3 0x4000082 kqread syz-fuzzer 43301 112293 39938 0 3 0x4000082 wait syz-fuzzer 43301 252477 39938 0 3 0x4000082 wait syz-fuzzer 43301 225535 39938 0 3 0x4000082 thrsleep syz-fuzzer 39938 73068 95729 0 3 0x10008a sigsusp ksh 95729 407515 67007 0 3 0x9a kqread sshd 22091 337074 1 0 3 0x100083 ttyin getty 67007 280245 1 0 3 0x88 kqread sshd 23682 204034 64423 73 3 0x1100090 kqread syslogd 64423 72554 1 0 3 0x100082 netio syslogd 17943 103069 1 0 3 0x100080 kqread resolvd 88213 124673 28437 77 3 0x100092 kqread dhcpleased 78749 284467 28437 77 3 0x100092 kqread dhcpleased 28437 25918 1 0 3 0x80 kqread dhcpleased 76876 336348 0 0 3 0x14200 bored smr 7824 162285 0 0 2 0x14200 zerothread 81272 387814 0 0 3 0x14200 aiodoned aiodoned 51028 167246 0 0 3 0x14200 syncer update 52400 314477 0 0 3 0x14200 cleaner cleaner 45611 62634 0 0 3 0x14200 reaper reaper 10457 243768 0 0 3 0x14200 pgdaemon pagedaemon 53410 241412 0 0 3 0x14200 bored viomb 90700 269439 0 0 3 0x40014200 acpi0 acpi0 50640 133569 0 0 3 0x14200 bored softnet 54809 17506 0 0 3 0x14200 bored softnet 38845 485547 0 0 3 0x14200 bored softnet 62866 379227 0 0 3 0x14200 bored softnet 36675 34562 0 0 3 0x14200 bored systqmp 42905 486849 0 0 3 0x14200 bored systq 98840 286423 0 0 3 0x40014200 bored softclock 95537 202931 0 0 3 0x40014200 idle0 1 16875 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10182 6485K 6735K 78643K 12024 0 pcb 13 8K 8K 78643K 51 0 rtable 249 11K 11K 78643K 512 0 ifaddr 88 18K 18K 78643K 202 0 counters 27 17K 17K 78643K 43 0 ioctlops 0 0K 4K 78643K 441 0 iov 0 0K 12K 78643K 88 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1332 83K 83K 78643K 1507 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 8 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 68 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 15 53K 73K 78643K 565 0 sigio 0 0K 0K 78643K 8 0 proc 56 58K 75K 78643K 580 0 subproc 104 6K 6K 78643K 143 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 99 6K 6K 78643K 142 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 61 281K 281K 78643K 61 0 exec 0 0K 2K 78643K 729 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 237 80K 80K 78643K 4354 0 UVM aobj 20 2K 2K 78643K 26 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 10 0 NDP 12 0K 2K 78643K 48 0 temp 107 4713K 5737K 78643K 6911 0 kqueue 13 20K 22K 78643K 64 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 110 0 107 3 2 1 3 0 8 0 rtentry 112 149 0 38 4 0 4 4 0 8 0 unpcb 144 329 0 314 6 5 1 6 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpcb 768 36 0 32 3 2 1 2 0 8 0 arp 88 24 0 6 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 7 0 5 1 0 1 1 0 8 0 inpcb 336 259 0 248 9 2 7 7 0 8 6 nd6 48 35 0 10 1 0 1 1 0 8 0 kcovpl 48 11 0 3 1 0 1 1 0 8 0 ppxss 1160 9 0 9 2 2 0 1 0 8 0 pfrktable 1344 24 0 21 2 1 1 1 0 8 0 pfanchor 1280 10 0 2 2 1 1 1 0 8 0 pftag 88 2 0 2 1 1 0 1 0 8 0 pfrule 1360 221 0 206 3 1 2 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 631 0 174 29 0 29 29 0 8 0 art_table 32 632 0 174 4 0 4 4 0 8 0 art_node 16 148 0 47 1 0 1 1 0 8 0 semapl 112 66 0 56 1 0 1 1 0 8 0 shmpl 112 23 0 6 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2004 0 577 90 0 90 90 0 8 0 ffsino 240 2004 0 577 85 0 85 85 0 8 0 nchpl 144 2791 0 1153 63 0 63 63 0 8 0 uvmvnodes 80 2302 0 0 47 0 47 47 0 8 0 vnodes 216 2302 0 0 128 0 128 128 0 8 0 namei 1024 10266 0 10265 4 3 1 2 0 8 0 pfiaddrpl 120 9 0 6 2 1 1 1 0 8 0 kstatmem 264 50 0 26 2 0 2 2 0 8 0 scsiplug 72 4 0 4 2 2 0 1 0 8 0 scxspl 216 8848 0 8848 10 9 1 8 0 8 1 plimitpl 152 43 0 29 1 0 1 1 0 8 0 sigapl 424 847 0 802 7 1 6 6 0 8 0 futexpl 64 4490 0 4485 1 0 1 1 0 8 0 knotepl 120 16375 0 16290 10 3 7 8 0 8 3 kqueuepl 184 224 0 213 5 4 1 4 0 8 0 pipepl 288 184 0 155 3 0 3 3 0 8 0 fdescpl 432 830 0 804 4 0 4 4 0 8 0 filepl 120 4746 0 4492 18 7 11 14 0 8 2 lockfpl 104 65 0 62 1 0 1 1 0 8 0 lockfspl 48 29 0 26 1 0 1 1 0 8 0 sessionpl 144 26 0 10 1 0 1 1 0 8 0 pgrppl 48 26 0 10 1 0 1 1 0 8 0 ucredpl 104 245 0 234 1 0 1 1 0 8 0 zombiepl 144 804 0 802 2 1 1 1 0 8 0 processpl 1000 847 0 802 7 1 6 6 0 8 0 procpl 672 1528 0 1463 8 1 7 7 0 8 1 sosppl 168 7 0 5 1 0 1 1 0 8 0 sockpl 456 698 0 669 29 18 11 20 0 8 7 mcl64k 65536 17 0 17 2 1 1 1 0 8 1 mcl16k 16384 10 0 10 3 2 1 1 0 8 1 mcl12k 12288 16 0 16 3 3 0 1 0 8 0 mcl9k 9216 11 0 11 3 2 1 1 0 8 1 mcl8k 8192 27 0 27 2 1 1 1 0 8 1 mcl4k 4096 45 0 45 3 2 1 1 0 8 1 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 72097 0 72041 12 3 9 11 0 8 0 mtagpl 96 88 0 4 4 1 3 3 0 8 0 mbufpl 256 117217 0 116892 25 1 24 24 0 8 1 bufpl 288 4592 0 133 319 0 319 319 0 8 0 anonpl 24 151379 0 137727 125 15 110 124 0 188 10 amapchunkpl 152 11408 0 10787 29 2 27 28 0 158 0 amappl16 200 2337 0 1798 46 16 30 42 0 8 0 amappl15 192 129 0 124 1 0 1 1 0 8 0 amappl14 184 44 0 39 1 0 1 1 0 8 0 amappl13 176 103 0 99 1 0 1 1 0 8 0 amappl12 168 140 0 130 1 0 1 1 0 8 0 amappl11 160 143 0 126 1 0 1 1 0 8 0 amappl10 152 77 0 72 1 0 1 1 0 8 0 amappl9 144 544 0 538 1 0 1 1 0 8 0 amappl8 136 708 0 650 3 0 3 3 0 8 0 amappl7 128 243 0 226 1 0 1 1 0 8 0 amappl6 120 239 0 230 2 1 1 2 0 8 0 amappl5 112 392 0 380 1 0 1 1 0 8 0 amappl4 104 1003 0 974 2 1 1 2 0 8 0 amappl3 96 1907 0 1854 2 0 2 2 0 8 0 amappl2 88 519 0 483 2 0 2 2 0 8 0 amappl1 80 21766 0 21133 20 5 15 20 0 8 0 amappl 88 3872 0 3721 4 0 4 4 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 25 0 6 1 0 1 1 0 8 0 uaddrrnd 24 830 0 804 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 830 0 804 1 0 1 1 0 8 0 vmmpekpl 168 10898 0 10854 3 0 3 3 0 8 0 vmmpepl 168 85183 0 82778 163 24 139 141 0 357 28 vmsppl 272 829 0 804 4 2 2 3 0 8 0 rwobjpl 24 23877 0 20055 24 0 24 24 0 8 0 pdppl 4096 1666 0 1608 130 68 62 68 0 8 4 pvpl 32 401308 0 383540 283 93 190 241 0 265 23 pmappl 216 829 0 804 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 730 0 88 19 0 19 19 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8254949d) at panic+0x161 sys/kern/subr_prf.c:198 rw_assert_wrlock(fffffd80686b25e8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 somove(fffffd80725868f0,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd80725868f0,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd80725868f0,5,0,0) at sosplice+0x502 sys/kern/uipc_socket.c:1346 sosetopt(fffffd80725868f0,ffff,1023,fffffd8068d62500) at sosetopt+0x7ec sys_setsockopt(ffff80002179e2a8,ffff80002e8bf4c8,ffff80002e8bf520) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e8bf590) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x875dbb41b90, count: -9 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8254949d) at panic+0x161 sys/kern/subr_prf.c:198 rw_assert_wrlock(fffffd80686b25e8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 somove(fffffd80725868f0,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd80725868f0,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd80725868f0,5,0,0) at sosplice+0x502 sys/kern/uipc_socket.c:1346 sosetopt(fffffd80725868f0,ffff,1023,fffffd8068d62500) at sosetopt+0x7ec sys_setsockopt(ffff80002179e2a8,ffff80002e8bf4c8,ffff80002e8bf520) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e8bf590) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x875dbb41b90, count: -9