panic: solock: lock not held Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *312298 34882 0 0 0x4000000 0 syz-executor.0 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(fffffd8070569730) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 somove(fffffd806d170b78,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd806d170b78,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd806d170b78,3,0,0) at sosplice+0x502 sys/kern/uipc_socket.c:1346 sosetopt(fffffd806d170b78,ffff,1023,fffffd8070358300) at sosetopt+0x7ec sys_setsockopt(ffff800026615cf0,ffff80002b4f1d98,ffff80002b4f1df0) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002b4f1e60) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x354610577b0, 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(fffffd8070569730) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 somove(fffffd806d170b78,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd806d170b78,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd806d170b78,3,0,0) at sosplice+0x502 sys/kern/uipc_socket.c:1346 sosetopt(fffffd806d170b78,ffff,1023,fffffd8070358300) at sosetopt+0x7ec sys_setsockopt(ffff800026615cf0,ffff80002b4f1d98,ffff80002b4f1df0) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002b4f1e60) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x354610577b0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002b4f1ac0 rbx 0xfffffd8073a96c78 rdx 0xffff800000bedf80 rcx 0 rax 0xffff800026615cf0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xb618a9006d5221ec r11 0x9d58eeb853808a5d r12 0 r13 0xfffffd8070569728 r14 0 r15 0x1 rip 0xffffffff8101e5c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002b4f1ab0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=312298 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=82, nice=20 forw=0xffffffffffffffff, list=0xffff800026615a50,0xffff8000217afa58 process=0xffff80002170b798 user=0xffff80002b4ec000, vmspace=0xfffffd806c615010 estcpu=32, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 99205 411189 0 0 2 0x14200 sosplice 53572 103851 70522 0 2 0 syz-executor.3 53572 342527 70522 0 2 0x4000000 syz-executor.3 48682 444524 68201 0 2 0 syz-executor.7 48682 66450 68201 0 3 0x4000080 fsleep syz-executor.7 6315 415351 84872 0 3 0x80 nanoslp syz-executor.5 6315 394307 84872 0 3 0x4000080 lockf syz-executor.5 6315 319617 84872 0 3 0x4000080 fsleep syz-executor.5 34882 367193 14963 0 2 0 syz-executor.0 *34882 312298 14963 0 7 0x4000000 syz-executor.0 68304 289716 70224 -1 3 0x90 nanoslp syz-executor.4 68304 374898 70224 -1 3 0x4000090 fsleep syz-executor.4 40109 66573 2390 0 3 0x80 nanoslp syz-executor.1 40109 309505 2390 0 3 0x4000080 ttyout syz-executor.1 40109 263256 2390 0 3 0x4000080 kqpoll syz-executor.1 40109 174588 2390 0 3 0x4000080 fsleep syz-executor.1 84872 274167 60113 0 3 0x82 nanoslp syz-executor.5 70224 472946 60113 0 3 0x82 nanoslp syz-executor.4 70522 434684 60113 0 3 0x82 nanoslp syz-executor.3 68146 25067 1 0 3 0x100083 ttyin getty 2390 433856 60113 0 3 0x82 nanoslp syz-executor.1 14963 120242 60113 0 3 0x82 nanoslp syz-executor.0 67473 178036 60113 0 2 0x2 syz-executor.6 68201 10237 60113 0 3 0x82 nanoslp syz-executor.7 41624 438257 60113 0 2 0x2 syz-executor.2 60113 22154 68333 0 3 0x82 wait syz-fuzzer 60113 400960 68333 0 3 0x4000082 nanoslp syz-fuzzer 60113 486351 68333 0 3 0x4000082 thrsleep syz-fuzzer 60113 463659 68333 0 3 0x4000082 wait syz-fuzzer 60113 215573 68333 0 3 0x4000082 wait syz-fuzzer 60113 445599 68333 0 3 0x4000082 thrsleep syz-fuzzer 60113 394417 68333 0 3 0x4000082 kqread syz-fuzzer 60113 336082 68333 0 3 0x4000082 thrsleep syz-fuzzer 60113 198869 68333 0 3 0x4000082 wait syz-fuzzer 60113 466758 68333 0 3 0x4000082 wait syz-fuzzer 60113 222765 68333 0 3 0x4000082 thrsleep syz-fuzzer 60113 20513 68333 0 3 0x4000082 wait syz-fuzzer 60113 228510 68333 0 3 0x4000082 wait syz-fuzzer 60113 412986 68333 0 3 0x4000082 wait syz-fuzzer 68333 274385 84102 0 3 0x10008a sigsusp ksh 84102 518048 86532 0 3 0x9a kqread sshd 86532 236678 1 0 3 0x88 kqread sshd 53216 361559 27219 73 3 0x1100090 kqread syslogd 27219 319187 1 0 3 0x100082 netio syslogd 12726 353661 1 0 3 0x100080 kqread resolvd 65099 437668 81882 77 3 0x100092 kqread dhcpleased 17015 496728 81882 77 3 0x100092 kqread dhcpleased 81882 221682 1 0 3 0x80 kqread dhcpleased 46113 64271 0 0 3 0x14200 bored smr 39888 187422 0 0 2 0x14200 zerothread 17373 286191 0 0 3 0x14200 aiodoned aiodoned 21326 311134 0 0 3 0x14200 syncer update 70904 332587 0 0 3 0x14200 cleaner cleaner 98604 449837 0 0 3 0x14200 reaper reaper 35183 520909 0 0 3 0x14200 pgdaemon pagedaemon 59680 378371 0 0 3 0x14200 bored viomb 50982 490310 0 0 3 0x40014200 acpi0 acpi0 58157 446507 0 0 3 0x14200 bored softnet 51375 294695 0 0 3 0x14200 bored softnet 49474 479933 0 0 3 0x14200 bored softnet 40128 65292 0 0 3 0x14200 bored softnet 50814 250217 0 0 3 0x14200 bored systqmp 3379 164952 0 0 3 0x14200 bored systq 45416 174959 0 0 3 0x40014200 bored softclock 99515 56870 0 0 3 0x40014200 idle0 1 101785 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 10169 6397K 6759K 78643K 12771 0 pcb 13 12K 14K 78643K 240 0 rtable 157 8K 13K 78643K 840 0 ifaddr 68 15K 19K 78643K 587 0 sysctl 1 1K 1K 78643K 1 0 counters 24 17K 17K 78643K 58 0 ioctlops 0 0K 4K 78643K 1264 0 iov 0 0K 12K 78643K 99 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1369 86K 86K 78643K 2014 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 17 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 200 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 16 57K 73K 78643K 1361 0 sigio 0 0K 0K 78643K 35 0 proc 61 67K 75K 78643K 738 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 29 0 in_multi 63 4K 6K 78643K 207 0 ether_multi 2 0K 0K 78643K 3 0 mrt 1 0K 0K 78643K 25 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 67 307K 307K 78643K 67 0 exec 0 0K 2K 78643K 909 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 265 129K 129K 78643K 8609 0 UVM aobj 34 2K 2K 78643K 43 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 33 0 NDP 9 0K 1K 78643K 74 0 temp 115 4717K 5742K 78643K 27165 0 kqueue 13 20K 24K 78643K 136 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 194 0 191 4 3 1 3 0 8 0 rtentry 112 223 0 157 4 0 4 4 0 8 0 unpcb 144 876 0 861 8 7 1 6 0 8 0 syncache 296 16 0 16 3 3 0 1 0 8 0 tcpqe 32 150 0 150 1 1 0 1 0 8 0 tcpcb 768 504 0 499 21 19 2 15 0 8 1 arp 88 35 0 23 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 2 1 0 1 1 0 8 0 inpcb 336 1248 0 1239 12 10 2 12 0 8 1 nd6 48 50 0 35 1 0 1 1 0 8 0 pkpcb 40 4 0 4 1 1 0 1 0 8 0 kcovpl 48 16 0 8 1 0 1 1 0 8 0 ppxss 1160 23 0 23 2 2 0 1 0 8 0 pfstscr 40 3 0 0 1 0 1 1 0 8 0 pfosfp 40 2 0 1 1 0 1 1 0 8 0 pfosfpen 112 2 0 1 1 0 1 1 0 8 0 pfrktable 1344 62 0 60 1 0 1 1 0 8 0 pfanchor 1280 271 0 144 14 1 13 14 0 8 0 pftag 88 18 0 12 1 0 1 1 0 8 0 pfqueue 264 1 0 1 1 0 1 1 0 8 1 pfstitem 24 6 0 0 1 0 1 1 0 8 0 pfstkey 120 6 0 4 1 0 1 1 0 8 0 pfstate 336 3 0 0 1 0 1 1 0 8 0 pfrule 1360 1029 0 1022 13 12 1 13 0 8 0 rttmr 136 9 0 9 2 2 0 1 0 8 0 art_heap8 4096 3 0 2 3 2 1 2 0 8 0 art_heap4 256 950 0 661 29 9 20 29 0 8 0 art_table 32 953 0 663 4 0 4 4 0 8 0 art_node 16 222 0 165 1 0 1 1 0 8 0 sysvmsgpl 40 19 0 16 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 198 0 188 1 0 1 1 0 8 0 shmpl 112 40 0 9 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 3083 0 1650 90 0 90 90 0 8 0 ffsino 240 3083 0 1650 85 0 85 85 0 8 0 nchpl 144 4940 0 3306 63 0 63 63 0 8 0 uvmvnodes 80 3720 0 0 76 0 76 76 0 8 0 vnodes 216 3720 0 0 207 0 207 207 0 8 0 namei 1024 19084 0 19082 2 1 1 2 0 8 0 vcpupl 2048 8 0 0 1 0 1 1 0 8 0 vmpool 536 8 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 18 0 18 2 2 0 1 0 8 0 kstatmem 264 80 0 62 2 0 2 2 0 8 0 scxspl 216 14310 0 14310 9 8 1 8 0 8 1 plimitpl 152 305 0 290 1 0 1 1 0 8 0 sigapl 424 1636 0 1592 6 0 6 6 0 8 0 futexpl 64 12652 0 12648 1 0 1 1 0 8 0 knotepl 120 18639 0 18426 13 6 7 7 0 8 0 kqueuepl 184 748 0 737 7 6 1 7 0 8 0 pipepl 288 335 0 307 9 6 3 5 0 8 0 fdescpl 432 1619 0 1592 4 0 4 4 0 8 0 filepl 120 11108 0 10862 15 5 10 14 0 8 2 lockfpl 104 690 0 686 2 1 1 2 0 8 0 lockfspl 48 163 0 160 1 0 1 1 0 8 0 sessionpl 144 33 0 17 1 0 1 1 0 8 0 pgrppl 48 33 0 17 1 0 1 1 0 8 0 ucredpl 104 1166 0 1155 1 0 1 1 0 8 0 zombiepl 144 1592 0 1592 1 0 1 1 0 8 1 processpl 1000 1636 0 1592 7 1 6 6 0 8 0 procpl 672 3554 0 3488 9 2 7 9 0 8 1 sosppl 168 2 0 0 1 0 1 1 0 8 0 sockpl 456 2323 0 2296 34 28 6 20 0 8 2 mcl64k 65536 43 0 43 1 0 1 1 0 8 1 mcl16k 16384 20 0 20 2 1 1 1 0 8 1 mcl12k 12288 73 0 73 1 0 1 1 0 8 1 mcl9k 9216 14 0 14 2 1 1 1 0 8 1 mcl8k 8192 66 0 66 2 1 1 1 0 8 1 mcl4k 4096 128 0 128 1 0 1 1 0 8 1 mcl2k2 2112 14 0 14 1 0 1 1 0 8 1 mcl2k 2048 68985 0 68916 16 6 10 14 0 8 0 mtagpl 96 67 0 43 2 1 1 1 0 8 0 mbufpl 256 117902 0 117681 34 16 18 28 0 8 1 bufpl 288 5614 0 129 392 0 392 392 0 8 0 anonpl 24 277385 0 261485 104 4 100 102 0 188 0 amapchunkpl 152 23096 0 22412 29 1 28 28 0 158 0 amappl16 200 3441 0 2873 35 4 31 33 0 8 0 amappl15 192 121 0 115 1 0 1 1 0 8 0 amappl14 184 194 0 191 1 0 1 1 0 8 0 amappl13 176 329 0 326 1 0 1 1 0 8 0 amappl12 168 33 0 24 1 0 1 1 0 8 0 amappl11 160 340 0 320 1 0 1 1 0 8 0 amappl10 152 145 0 140 1 0 1 1 0 8 0 amappl9 144 866 0 862 1 0 1 1 0 8 0 amappl8 136 690 0 635 2 0 2 2 0 8 0 amappl7 128 149 0 131 1 0 1 1 0 8 0 amappl6 120 611 0 597 2 1 1 2 0 8 0 amappl5 112 1021 0 1007 1 0 1 1 0 8 0 amappl4 104 1469 0 1437 2 1 1 2 0 8 0 amappl3 96 4104 0 4049 2 0 2 2 0 8 0 amappl2 88 738 0 699 2 1 1 2 0 8 0 amappl1 80 41411 0 40747 19 4 15 19 0 8 0 amappl 88 7998 0 7836 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 42 0 9 1 0 1 1 0 8 0 uaddrrnd 24 1627 0 1592 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1627 0 1592 1 0 1 1 0 8 0 vmmpekpl 168 16891 0 16844 3 0 3 3 0 8 0 vmmpepl 168 163002 0 160441 140 19 121 135 0 357 1 vmsppl 272 1626 0 1592 4 1 3 3 0 8 0 rwobjpl 24 42554 0 37237 33 0 33 33 0 8 0 pdppl 4096 3260 0 3192 158 86 72 72 0 8 4 pvpl 32 661738 0 641944 239 44 195 239 0 265 28 pmappl 216 1626 0 1592 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 861 0 153 21 0 21 21 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(fffffd8070569730) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 somove(fffffd806d170b78,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd806d170b78,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd806d170b78,3,0,0) at sosplice+0x502 sys/kern/uipc_socket.c:1346 sosetopt(fffffd806d170b78,ffff,1023,fffffd8070358300) at sosetopt+0x7ec sys_setsockopt(ffff800026615cf0,ffff80002b4f1d98,ffff80002b4f1df0) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002b4f1e60) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x354610577b0, 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(fffffd8070569730) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 somove(fffffd806d170b78,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd806d170b78,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd806d170b78,3,0,0) at sosplice+0x502 sys/kern/uipc_socket.c:1346 sosetopt(fffffd806d170b78,ffff,1023,fffffd8070358300) at sosetopt+0x7ec sys_setsockopt(ffff800026615cf0,ffff80002b4f1d98,ffff80002b4f1df0) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002b4f1e60) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x354610577b0, count: -9