panic: lock (rwlock) solock not locked Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 140712 82449 32767 0x10 0 1 syz-executor.6 *200071 82449 32767 0x10 0x4000000 0K syz-executor.6 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(fffffd80721e0da8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 somove(fffffd80721e0038,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd80721e0038,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd80721e0038,3,0,0) at sosplice+0x50b sys/kern/uipc_socket.c:1346 sosetopt(fffffd80721e0038,ffff,1023,fffffd80668cdd00) at sosetopt+0x7f4 sys_setsockopt(ffff800024784a88,ffff8000263c4138,ffff8000263c4180) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff8000263c4200) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000263c4200) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x222f6157850, 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(fffffd80721e0da8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 somove(fffffd80721e0038,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd80721e0038,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd80721e0038,3,0,0) at sosplice+0x50b sys/kern/uipc_socket.c:1346 sosetopt(fffffd80721e0038,ffff,1023,fffffd80668cdd00) at sosetopt+0x7f4 sys_setsockopt(ffff800024784a88,ffff8000263c4138,ffff8000263c4180) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff8000263c4200) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000263c4200) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x222f6157850, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000263c3e30 rbx 0xffffffff829bab8f cpu_info_full_primary+0x2b8f rdx 0xffff800000c03100 rcx 0 rax 0xffff800024784a88 r8 0x101010101010101 r9 0x8080808080808080 r10 0xcfd2edcf7dc5b968 r11 0xb2cd33848e01088 r12 0xffffffff829ba990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff81fd76c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000263c3e20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.6) pid=200071 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=76, nice=20 forw=0xffffffffffffffff, list=0xffff800024785508,0xffff8000247842b8 process=0xffff8000ffff1d30 user=0xffff8000263bf000, vmspace=0xfffffd80668192f8 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 57499 259638 66785 32767 2 0x10 syz-executor.1 93368 217823 23754 32767 2 0x10 syz-executor.4 68973 33962 62138 32767 2 0x10 syz-executor.0 99942 465882 94085 32767 2 0x10 syz-executor.7 71180 85558 30417 32767 2 0x10 syz-executor.2 71180 28322 30417 32767 3 0x4000090 fsleep syz-executor.2 82449 140712 64033 32767 7 0x10 syz-executor.6 *82449 200071 64033 32767 7 0x4000010 syz-executor.6 40284 183474 56684 32767 2 0x10 syz-executor.3 73565 89120 32089 32767 2 0x10 syz-executor.5 73565 112356 32089 32767 3 0x4000090 ttyout syz-executor.5 73565 234163 32089 32767 3 0x4000090 fsleep syz-executor.5 23754 315425 19477 32767 3 0x90 nanoslp syz-executor.4 19477 385047 57809 0 3 0x82 wait syz-executor.4 30417 326327 55813 32767 3 0x90 nanoslp syz-executor.2 55813 476304 57809 0 3 0x82 wait syz-executor.2 53533 242525 0 0 3 0x14200 bored sosplice 64033 178850 65611 32767 3 0x90 nanoslp syz-executor.6 94085 141504 60017 32767 3 0x90 nanoslp syz-executor.7 60017 241057 57809 0 3 0x82 wait syz-executor.7 32089 27639 11820 32767 3 0x90 nanoslp syz-executor.5 65611 451325 57809 0 3 0x82 wait syz-executor.6 11820 428133 57809 0 3 0x82 wait syz-executor.5 56684 115037 93653 32767 3 0x90 nanoslp syz-executor.3 93653 151430 57809 0 3 0x82 wait syz-executor.3 66785 174859 94586 32767 3 0x90 nanoslp syz-executor.1 94586 118338 57809 0 3 0x82 wait syz-executor.1 62138 324864 88741 32767 3 0x90 nanoslp syz-executor.0 88741 283985 57809 0 3 0x82 wait syz-executor.0 57809 259665 22919 0 3 0x82 wait syz-fuzzer 57809 259502 22919 0 3 0x4000082 thrsleep syz-fuzzer 57809 386756 22919 0 3 0x4000082 thrsleep syz-fuzzer 57809 419360 22919 0 3 0x4000082 wait syz-fuzzer 57809 330508 22919 0 3 0x4000082 thrsleep syz-fuzzer 57809 301486 22919 0 3 0x4000082 wait syz-fuzzer 57809 445775 22919 0 3 0x4000082 thrsleep syz-fuzzer 57809 278669 22919 0 3 0x4000082 wait syz-fuzzer 57809 237532 22919 0 3 0x4000082 thrsleep syz-fuzzer 57809 7732 22919 0 3 0x4000082 wait syz-fuzzer 57809 40412 22919 0 3 0x4000082 kqread syz-fuzzer 57809 494816 22919 0 3 0x4000082 wait syz-fuzzer 57809 102811 22919 0 3 0x4000082 wait syz-fuzzer 57809 448133 22919 0 3 0x4000082 wait syz-fuzzer 57809 463346 22919 0 3 0x4000082 thrsleep syz-fuzzer 57809 507921 22919 0 3 0x4000082 thrsleep syz-fuzzer 22919 305318 79687 0 3 0x10008a sigsusp ksh 79687 266475 3178 0 3 0x9a kqread sshd 6171 365238 1 0 3 0x100083 ttyin getty 3178 425161 1 0 3 0x88 kqread sshd 54587 375760 11421 73 3 0x1100090 kqread syslogd 11421 327304 1 0 3 0x100082 netio syslogd 20545 35297 1 0 3 0x100080 kqread resolvd 97340 446173 39926 77 3 0x100092 kqread dhcpleased 33739 457415 39926 77 3 0x100092 kqread dhcpleased 39926 320704 1 0 3 0x80 kqread dhcpleased 59386 127235 0 0 3 0x14200 bored smr 57602 190902 0 0 2 0x14200 zerothread 65532 431506 0 0 3 0x14200 aiodoned aiodoned 10607 17509 0 0 3 0x14200 syncer update 48840 488213 0 0 3 0x14200 cleaner cleaner 76421 71657 0 0 3 0x14200 reaper reaper 64874 466069 0 0 3 0x14200 pgdaemon pagedaemon 90208 369285 0 0 3 0x14200 bored viomb 33499 380666 0 0 3 0x40014200 acpi0 acpi0 57936 157893 0 0 3 0x40014200 idle1 99263 174893 0 0 3 0x14200 bored softnet 70216 495264 0 0 3 0x14200 bored softnet 7383 480905 0 0 3 0x14200 bored softnet 86969 259099 0 0 3 0x14200 bored softnet 61032 412050 0 0 3 0x14200 bored systqmp 56453 180252 0 0 3 0x14200 bored systq 62519 221590 0 0 3 0x40014200 bored softclock 39829 249447 0 0 3 0x40014200 idle0 1 164717 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 82449 (syz-executor.6) thread 0xffff800024784a88 (200071) 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 10204 6411K 6420K 78643K 11307 0 pcb 13 10K 12K 78643K 15 0 rtable 236 6K 6K 78643K 658 0 ifaddr 82 16K 16K 78643K 112 0 counters 56 35K 35K 78643K 64 0 ioctlops 0 0K 2K 78643K 43 0 iov 0 0K 16K 78643K 495 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1271 79K 79K 78643K 2730 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 45 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 619 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 26 97K 125K 78643K 3235 0 sigio 0 0K 0K 78643K 20 0 proc 56 78K 103K 78643K 792 0 subproc 104 6K 6K 78643K 156 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 196 0 in_multi 99 6K 6K 78643K 174 0 ether_multi 1 0K 0K 78643K 8 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 169 758K 758K 78643K 169 0 exec 0 0K 2K 78643K 1161 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 320 91K 102K 78643K 22100 0 UVM aobj 131 4K 4K 78643K 131 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 62 0 NDP 11 0K 2K 78643K 39 0 temp 124 4726K 4854K 78643K 11130 0 kqueue 12 18K 27K 78643K 327 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 282 0 279 5 4 1 3 0 8 0 rtentry 112 159 0 48 4 0 4 4 0 8 0 unpcb 144 2027 0 2010 19 15 4 6 0 8 3 syncache 296 47 0 47 9 8 1 1 0 8 1 tcpqe 32 11 0 11 5 5 0 1 0 8 0 tcpcb 768 1721 0 1707 71 61 10 16 0 8 8 arp 120 27 0 8 1 0 1 1 0 8 0 ipq 40 1 0 1 1 1 0 1 0 8 0 ipqe 40 4 0 4 1 1 0 1 0 8 0 inpcb 368 2704 0 2691 57 49 8 13 0 8 6 nd6 48 39 0 15 1 0 1 1 0 8 0 kcovpl 48 12 0 4 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 657 0 205 31 2 29 30 0 8 0 art_table 32 658 0 205 4 0 4 4 0 8 0 art_node 16 158 0 57 1 0 1 1 0 8 0 sysvmsgpl 40 41 0 1 1 0 1 1 0 8 0 semapl 112 617 0 607 1 0 1 1 0 8 0 shmpl 112 128 0 0 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 6919 0 5483 91 0 91 91 0 8 0 ffsino 272 6919 0 5483 97 0 97 97 0 8 0 nchpl 144 11633 0 9999 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 40868 0 40868 2 1 1 2 0 8 1 percpumem 16 44 0 4 1 0 1 1 0 8 0 kstatmem 264 30 0 8 2 0 2 2 0 8 0 scxspl 216 29541 0 29541 19 18 1 8 0 8 1 plimitpl 152 507 0 485 1 0 1 1 0 8 0 sigapl 424 3518 0 3463 7 0 7 7 0 8 0 futexpl 64 28800 0 28798 1 0 1 1 0 8 0 knotepl 120 336 0 0 10 0 10 10 0 8 0 kqueuepl 216 1300 0 1292 35 32 3 8 0 8 2 pipepl 320 722 0 694 13 10 3 8 0 8 0 fdescpl 496 3500 0 3463 7 1 6 6 0 8 0 filepl 152 25989 0 25747 53 40 13 17 0 8 3 lockfpl 104 451 0 449 1 0 1 1 0 8 0 lockfspl 48 188 0 186 1 0 1 1 0 8 0 sessionpl 144 27 0 11 1 0 1 1 0 8 0 pgrppl 48 30 0 14 1 0 1 1 0 8 0 ucredpl 104 7741 0 7723 1 0 1 1 0 8 0 zombiepl 144 3463 0 3463 1 0 1 1 0 8 1 processpl 1064 3518 0 3463 5 1 4 5 0 8 0 procpl 672 9670 0 9596 14 6 8 9 0 8 0 srpgc 96 1 0 1 1 1 0 1 0 8 0 sosppl 168 41 0 38 5 4 1 1 0 8 0 sockpl 488 5045 0 5014 125 113 12 21 0 8 8 mcl64k 65536 19 0 0 3 0 3 3 0 8 0 mcl16k 16384 18 0 0 3 0 3 3 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 12 0 0 1 0 1 1 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 31 0 0 4 0 4 4 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 411 0 0 51 0 51 51 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 1150 0 0 62 0 62 62 0 8 0 bufpl 288 8031 0 1701 453 0 453 453 0 8 0 anonpl 24 667477 0 654490 134 49 85 107 0 186 1 amapchunkpl 152 64461 0 63793 66 36 30 40 0 158 1 amappl16 200 9212 0 8838 56 34 22 32 0 8 2 amappl15 192 186 0 181 1 0 1 1 0 8 0 amappl14 184 206 0 201 1 0 1 1 0 8 0 amappl13 176 795 0 789 1 0 1 1 0 8 0 amappl12 168 11 0 9 1 0 1 1 0 8 0 amappl11 160 1605 0 1582 3 1 2 2 0 8 0 amappl10 152 19 0 15 1 0 1 1 0 8 0 amappl9 144 757 0 752 1 0 1 1 0 8 0 amappl8 136 1162 0 1053 4 0 4 4 0 8 0 amappl7 128 539 0 516 1 0 1 1 0 8 0 amappl6 120 466 0 455 2 1 1 2 0 8 0 amappl5 112 2475 0 2456 1 0 1 1 0 8 0 amappl4 104 3246 0 3200 2 0 2 2 0 8 0 amappl3 96 10240 0 10181 2 0 2 2 0 8 0 amappl2 88 1266 0 1225 2 1 1 2 0 8 0 amappl1 80 88904 0 88176 19 2 17 19 0 8 0 amappl 88 21373 0 21190 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 130 0 0 3 0 3 3 0 8 0 uaddrrnd 24 3501 0 3464 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3501 0 3464 1 0 1 1 0 8 0 vmmpekpl 168 29750 0 29673 4 0 4 4 0 8 0 vmmpepl 168 348280 0 345420 168 35 133 140 0 357 6 vmsppl 368 3500 0 3464 4 0 4 4 0 8 0 rwobjpl 56 92861 0 85402 108 1 107 107 0 8 0 pdppl 4096 7009 0 6928 203 122 81 95 0 8 0 pvpl 32 1353990 0 1335821 267 110 157 241 0 265 1 pmappl 248 3500 0 3464 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1071 0 176 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(fffffd80721e0da8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 somove(fffffd80721e0038,1) at somove+0x25d sbspace sys/sys/socketvar.h:209 [inline] somove(fffffd80721e0038,1) at somove+0x25d sys/kern/uipc_socket.c:1487 sosplice(fffffd80721e0038,3,0,0) at sosplice+0x50b sys/kern/uipc_socket.c:1346 sosetopt(fffffd80721e0038,ffff,1023,fffffd80668cdd00) at sosetopt+0x7f4 sys_setsockopt(ffff800024784a88,ffff8000263c4138,ffff8000263c4180) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff8000263c4200) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff8000263c4200) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x222f6157850, count: -9 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020dd8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 end of kernel end trace frame: 0x7f7ffffea430, count: 12 ddb{1}> trace x86_ipi_db(ffff800020dd8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 end of kernel end trace frame: 0x7f7ffffea430, count: -3