panic: solock: lock not held Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *200036 98745 0 0 0x4000000 0 syz-executor.2 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(fffffd8066c604b8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 sbunlock(fffffd8066c604b0,fffffd8066c605d8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8066c604b0,fffffd8066c605d8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8066c602e8,3,0,0) at sosplice+0x547 sosetopt(fffffd8066c602e8,ffff,1023,fffffd80655c3d00) at sosetopt+0x7ec sys_setsockopt(ffff800021704010,ffff80002e8e38f8,ffff80002e8e3950) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e8e39c0) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd88a4ff100, 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(fffffd8066c604b8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 sbunlock(fffffd8066c604b0,fffffd8066c605d8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8066c604b0,fffffd8066c605d8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8066c602e8,3,0,0) at sosplice+0x547 sosetopt(fffffd8066c602e8,ffff,1023,fffffd80655c3d00) at sosetopt+0x7ec sys_setsockopt(ffff800021704010,ffff80002e8e38f8,ffff80002e8e3950) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e8e39c0) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd88a4ff100, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002e8e3670 rbx 0x39 rdx 0xffff800000bea5c0 rcx 0 rax 0xffff800021704010 r8 0x101010101010101 r9 0x8080808080808080 r10 0x8c6282c3e0884300 r11 0xd3644bfb3c20a97d r12 0 r13 0xfffffd8066c60398 r14 0 r15 0x1 rip 0xffffffff8101e5c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e8e3660 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.2) pid=200036 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff8000266137b0,0xffff8000216f1270 process=0xffff800021710410 user=0xffff80002e8de000, vmspace=0xfffffd80683e8ee8 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 88601 270565 18074 0 2 0 syz-executor.3 88601 294184 18074 0 3 0x4000080 fsleep syz-executor.3 98745 248265 79723 0 2 0 syz-executor.2 *98745 200036 79723 0 7 0x4000000 syz-executor.2 42684 306910 75610 0 3 0x80 nanoslp syz-executor.1 42684 269380 75610 0 3 0x4000080 fsleep syz-executor.1 33883 308674 87668 0 2 0 syz-executor.6 33883 98562 87668 0 3 0x4000080 fsleep syz-executor.6 55355 58372 55670 0 3 0x80 nanoslp syz-executor.5 55355 111030 55670 0 3 0x4000080 fsleep syz-executor.5 24765 349833 61685 0 2 0 syz-executor.4 24765 9302 61685 0 3 0x4000080 fsleep syz-executor.4 35806 287185 1 0 3 0x100083 ttyin getty 61685 21317 87098 0 3 0x82 nanoslp syz-executor.4 87668 117454 87098 0 3 0x82 nanoslp syz-executor.6 55670 396144 87098 0 3 0x82 nanoslp syz-executor.5 5161 205456 0 0 3 0x14200 bored sosplice 51516 460632 87098 0 2 0x2 syz-executor.7 18074 233208 87098 0 3 0x82 nanoslp syz-executor.3 79723 221578 87098 0 3 0x82 nanoslp syz-executor.2 76117 59158 87098 0 2 0x2 syz-executor.0 75610 48787 87098 0 3 0x82 nanoslp syz-executor.1 87098 412584 93972 0 3 0x82 wait syz-fuzzer 87098 124179 93972 0 3 0x4000082 nanoslp syz-fuzzer 87098 135945 93972 0 3 0x4000082 wait syz-fuzzer 87098 254677 93972 0 3 0x4000082 wait syz-fuzzer 87098 289066 93972 0 3 0x4000082 thrsleep syz-fuzzer 87098 471126 93972 0 3 0x4000082 thrsleep syz-fuzzer 87098 499233 93972 0 3 0x4000082 wait syz-fuzzer 87098 281282 93972 0 3 0x4000082 thrsleep syz-fuzzer 87098 374657 93972 0 3 0x4000082 kqread syz-fuzzer 87098 365344 93972 0 3 0x4000082 wait syz-fuzzer 87098 56542 93972 0 3 0x4000082 wait syz-fuzzer 87098 131058 93972 0 3 0x4000082 wait syz-fuzzer 87098 213507 93972 0 3 0x4000082 wait syz-fuzzer 87098 259557 93972 0 3 0x4000082 thrsleep syz-fuzzer 93972 442232 48665 0 3 0x10008a sigsusp ksh 48665 439864 11014 0 3 0x9a kqread sshd 11014 340611 1 0 3 0x88 kqread sshd 1047 422068 58371 73 3 0x1100090 kqread syslogd 58371 393806 1 0 3 0x100082 netio syslogd 17655 257656 1 0 3 0x100080 kqread resolvd 16125 431990 44818 77 3 0x100092 kqread dhcpleased 28728 430765 44818 77 3 0x100092 kqread dhcpleased 44818 320647 1 0 3 0x80 kqread dhcpleased 34663 103242 0 0 3 0x14200 bored smr 13516 165531 0 0 2 0x14200 zerothread 46286 49019 0 0 3 0x14200 aiodoned aiodoned 56991 158556 0 0 3 0x14200 syncer update 84244 375504 0 0 3 0x14200 cleaner cleaner 63705 198539 0 0 3 0x14200 reaper reaper 8263 214490 0 0 3 0x14200 pgdaemon pagedaemon 61147 40483 0 0 3 0x14200 bored viomb 50892 260419 0 0 3 0x40014200 acpi0 acpi0 88451 520013 0 0 3 0x14200 bored softnet 58898 303182 0 0 3 0x14200 bored softnet 50070 271946 0 0 3 0x14200 bored softnet 81752 261934 0 0 3 0x14200 bored softnet 20897 108269 0 0 3 0x14200 bored systqmp 89515 184290 0 0 3 0x14200 bored systq 71248 482900 0 0 3 0x40014200 bored softclock 78986 205451 0 0 3 0x40014200 idle0 1 16049 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 10201 6664K 6995K 78643K 14955 0 pcb 13 12K 14K 78643K 298 0 rtable 163 15K 16K 78643K 837 0 ifaddr 81 16K 18K 78643K 429 0 counters 24 17K 17K 78643K 41 0 ioctlops 0 0K 4K 78643K 559 0 iov 0 0K 16K 78643K 267 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1329 83K 83K 78643K 2417 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 22 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 59 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 16 57K 73K 78643K 2175 0 sigio 0 0K 0K 78643K 101 0 proc 62 59K 75K 78643K 732 0 subproc 104 6K 6K 78643K 169 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 319 0 in_multi 57 3K 6K 78643K 192 0 ether_multi 1 0K 0K 78643K 14 0 mrt 1 0K 0K 78643K 35 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 55 254K 254K 78643K 55 0 exec 0 0K 2K 78643K 895 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 292 336K 336K 78643K 13284 0 UVM aobj 81 3K 3K 78643K 93 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 162 0 NDP 12 0K 1K 78643K 59 0 temp 128 4722K 5732K 78643K 25926 0 kqueue 13 20K 22K 78643K 200 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 100 0 97 1 0 1 1 0 8 0 rtentry 112 212 0 148 4 0 4 4 0 8 0 unpcb 144 2362 0 2346 24 16 8 8 0 8 7 syncache 296 33 0 33 3 2 1 1 0 8 1 tcpqe 32 104 0 104 3 3 0 1 0 8 0 tcpcb 768 791 0 780 19 10 9 10 0 8 6 arp 88 30 0 19 1 0 1 1 0 8 0 ipq 40 8 0 7 3 2 1 1 0 8 0 ipqe 40 23 0 22 3 2 1 1 0 8 0 inpcb 336 4025 0 4012 27 19 8 10 0 8 6 nd6 48 46 0 33 1 0 1 1 0 8 0 kcovpl 48 13 0 5 1 0 1 1 0 8 0 ppxss 1160 3 0 3 1 1 0 1 0 8 0 pfrktable 1344 34 0 31 2 1 1 1 0 8 0 pfanchor 1280 68 0 36 3 0 3 3 0 8 0 pftag 88 6 0 3 2 1 1 1 0 8 0 pfqueue 264 3 0 3 1 1 0 1 0 8 0 pfstkey 120 10 0 10 1 1 0 1 0 8 0 pfstate 336 5 0 5 1 1 0 1 0 8 0 pfrule 1360 93 0 66 3 0 3 3 0 8 0 rttmr 136 12 0 12 3 3 0 1 0 8 0 art_heap8 4096 4 0 2 3 1 2 3 0 8 0 art_heap4 256 786 0 528 31 8 23 29 0 8 1 art_table 32 790 0 530 4 0 4 4 0 8 0 art_node 16 211 0 156 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 0 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 51 0 41 1 0 1 1 0 8 0 shmpl 112 90 0 12 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 4446 0 3019 90 0 90 90 0 8 0 ffsino 240 4446 0 3019 85 0 85 85 0 8 0 nchpl 144 7484 0 5850 63 0 63 63 0 8 0 uvmvnodes 80 5150 0 0 106 0 106 106 0 8 0 vnodes 216 5150 0 0 287 0 287 287 0 8 0 namei 1024 26847 0 26847 2 1 1 2 0 8 1 vcpupl 2048 18 0 0 3 0 3 3 0 8 0 vmpool 536 22 0 4 2 0 2 2 0 8 0 pfiaddrpl 120 13 0 9 2 1 1 1 0 8 0 kstatmem 264 58 0 34 2 0 2 2 0 8 0 scxspl 216 20578 0 20578 12 10 2 8 0 8 2 plimitpl 152 464 0 450 1 0 1 1 0 8 0 sigapl 424 2454 0 2410 6 0 6 6 0 8 0 futexpl 64 22758 0 22753 1 0 1 1 0 8 0 knotepl 120 32608 0 32527 15 8 7 7 0 8 3 kqueuepl 184 658 0 649 12 8 4 4 0 8 3 pipepl 288 552 0 524 15 12 3 11 0 8 0 fdescpl 432 2437 0 2410 4 0 4 4 0 8 0 filepl 120 19771 0 19532 37 21 16 16 0 8 8 lockfpl 104 570 0 568 2 0 2 2 0 8 1 lockfspl 48 161 0 159 1 0 1 1 0 8 0 sessionpl 144 29 0 13 1 0 1 1 0 8 0 pgrppl 48 29 0 13 1 0 1 1 0 8 0 ucredpl 104 2755 0 2745 1 0 1 1 0 8 0 zombiepl 144 2410 0 2410 2 1 1 1 0 8 1 processpl 1000 2454 0 2410 7 1 6 6 0 8 0 procpl 672 5619 0 5556 10 3 7 7 0 8 1 sosppl 168 21 0 19 4 3 1 1 0 8 0 sockpl 456 6500 0 6468 114 80 34 39 0 8 29 mcl64k 65536 95 0 95 3 2 1 1 0 8 1 mcl16k 16384 26 0 26 6 5 1 1 0 8 1 mcl12k 12288 86 0 86 2 1 1 1 0 8 1 mcl9k 9216 20 0 20 7 6 1 1 0 8 1 mcl8k 8192 95 0 95 3 2 1 1 0 8 1 mcl4k 4096 221 0 221 3 2 1 1 0 8 1 mcl2k2 2112 18 0 18 3 2 1 1 0 8 1 mcl2k 2048 72621 0 72561 18 8 10 14 0 8 1 mtagpl 96 630 0 230 12 2 10 10 0 8 0 mbufpl 256 133166 0 132572 44 2 42 42 0 8 3 bufpl 288 6841 0 440 458 0 458 458 0 8 0 anonpl 24 452044 0 433592 151 21 130 130 0 188 18 amapchunkpl 152 45893 0 45133 55 14 41 41 0 158 10 amappl16 200 6661 0 6053 57 16 41 45 0 8 8 amappl15 192 215 0 208 1 0 1 1 0 8 0 amappl14 184 7 0 2 1 0 1 1 0 8 0 amappl13 176 372 0 367 1 0 1 1 0 8 0 amappl12 168 581 0 576 1 0 1 1 0 8 0 amappl11 160 601 0 583 1 0 1 1 0 8 0 amappl10 152 13 0 12 1 0 1 1 0 8 0 amappl9 144 638 0 632 1 0 1 1 0 8 0 amappl8 136 1065 0 994 3 0 3 3 0 8 0 amappl7 128 541 0 522 1 0 1 1 0 8 0 amappl6 120 382 0 367 2 1 1 2 0 8 0 amappl5 112 1226 0 1214 1 0 1 1 0 8 0 amappl4 104 1944 0 1913 2 1 1 2 0 8 0 amappl3 96 7282 0 7227 2 0 2 2 0 8 0 amappl2 88 1039 0 1003 2 1 1 2 0 8 0 amappl1 80 61086 0 60439 19 4 15 19 0 8 0 amappl 88 12628 0 12462 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 92 0 12 2 0 2 2 0 8 0 uaddrrnd 24 2459 0 2414 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2459 0 2414 1 0 1 1 0 8 0 vmmpekpl 168 21568 0 21517 3 0 3 3 0 8 0 vmmpepl 168 238369 0 235768 156 26 130 130 0 357 13 vmsppl 272 2458 0 2414 6 2 4 4 0 8 1 rwobjpl 24 63330 0 56502 42 0 42 42 0 8 0 pdppl 4096 4924 0 4846 212 130 82 82 0 8 4 pvpl 32 952057 0 930606 333 130 203 256 0 265 29 pmappl 216 2458 0 2414 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1019 0 197 24 0 24 24 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(fffffd8066c604b8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 sbunlock(fffffd8066c604b0,fffffd8066c605d8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8066c604b0,fffffd8066c605d8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8066c602e8,3,0,0) at sosplice+0x547 sosetopt(fffffd8066c602e8,ffff,1023,fffffd80655c3d00) at sosetopt+0x7ec sys_setsockopt(ffff800021704010,ffff80002e8e38f8,ffff80002e8e3950) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e8e39c0) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd88a4ff100, 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(fffffd8066c604b8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:388 sbunlock(fffffd8066c604b0,fffffd8066c605d8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8066c604b0,fffffd8066c605d8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8066c602e8,3,0,0) at sosplice+0x547 sosetopt(fffffd8066c602e8,ffff,1023,fffffd80655c3d00) at sosetopt+0x7ec sys_setsockopt(ffff800021704010,ffff80002e8e38f8,ffff80002e8e3950) at sys_setsockopt+0x1f5 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e8e39c0) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd88a4ff100, count: -9