panic: lock (rwlock) solock not locked Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 320796 74944 32767 0x10 0 0 syz-executor.2 * 19274 72193 32767 0x10 0x4000000 1K syz-executor.5 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(fffffd80684439e8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd80684439d0,fffffd8068443b18) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd80684439d0,fffffd8068443b18) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd806e991998,3,0,0) at sosplice+0x550 sosetopt(fffffd806e991998,ffff,1023,fffffd806c442200) at sosetopt+0x7f4 sys_setsockopt(ffff8000ffff4fd0,ffff80002e4ae6b8,ffff80002e4ae700) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e4ae780) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e4ae780) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd585dd61a70, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu1: lock (rwlock) solock not locked ddb{1}> 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(fffffd80684439e8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd80684439d0,fffffd8068443b18) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd80684439d0,fffffd8068443b18) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd806e991998,3,0,0) at sosplice+0x550 sosetopt(fffffd806e991998,ffff,1023,fffffd806c442200) at sosetopt+0x7f4 sys_setsockopt(ffff8000ffff4fd0,ffff80002e4ae6b8,ffff80002e4ae700) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e4ae780) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e4ae780) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd585dd61a70, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002e4ae400 rbx 0xffff800020dd9b8f rdx 0xffff800000beebc0 rcx 0 rax 0xffff8000ffff4fd0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3d04dae6b3bf5bf4 r11 0x8aeaf0ad545e8f1a r12 0xffff800020dd9990 r13 0 r14 0 r15 0x1 rip 0xffffffff81fd76c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e4ae3f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.5) pid=19274 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5270,0xffff8000ffff57c0 process=0xffff800021298c88 user=0xffff80002e4a9000, vmspace=0xfffffd807effdcf0 estcpu=31, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 81356 501574 65273 32767 2 0x10 syz-executor.0 81356 343505 65273 32767 2 0x4000010 syz-executor.0 74944 320796 88331 32767 7 0x10 syz-executor.2 74944 405556 88331 32767 3 0x4000090 ttyretype syz-executor.2 56312 380768 53407 32767 3 0x90 nanoslp syz-executor.7 56312 97553 53407 32767 3 0x4000090 fsleep syz-executor.7 72193 219245 15058 32767 2 0x10 syz-executor.5 *72193 19274 15058 32767 7 0x4000010 syz-executor.5 73175 138477 67909 32767 3 0x90 nanoslp syz-executor.3 73175 40120 67909 32767 3 0x4000090 kqsel syz-executor.3 73175 57472 67909 32767 3 0x4000090 fsleep syz-executor.3 20771 457129 50298 32767 3 0x90 nanoslp syz-executor.4 20771 191859 50298 32767 3 0x4000090 fsleep syz-executor.4 20771 72300 50298 32767 3 0x4000090 fsleep syz-executor.4 50298 61693 32072 32767 3 0x90 nanoslp syz-executor.4 32072 274672 47869 0 3 0x82 wait syz-executor.4 64206 314195 51800 32767 2 0x10 syz-executor.1 51800 228147 47869 0 3 0x82 wait syz-executor.1 65273 260537 70426 32767 3 0x90 nanoslp syz-executor.0 70426 222380 47869 0 3 0x82 wait syz-executor.0 15838 73451 0 0 3 0x14200 bored sosplice 67909 332840 58362 32767 3 0x90 nanoslp syz-executor.3 53407 440463 27527 32767 3 0x90 nanoslp syz-executor.7 15058 216464 89571 32767 3 0x90 nanoslp syz-executor.5 27527 269792 47869 0 3 0x82 wait syz-executor.7 80995 408759 19705 32767 3 0x90 piperd syz-executor.6 89571 364241 47869 0 3 0x82 wait syz-executor.5 19705 268560 47869 0 3 0x82 wait syz-executor.6 88331 39146 71249 32767 3 0x90 nanoslp syz-executor.2 58362 408431 47869 0 3 0x82 wait syz-executor.3 71249 14631 47869 0 3 0x82 wait syz-executor.2 47869 298539 39013 0 3 0x82 wait syz-fuzzer 47869 94603 39013 0 3 0x4000082 nanoslp syz-fuzzer 47869 5276 39013 0 3 0x4000082 wait syz-fuzzer 47869 440237 39013 0 3 0x4000082 wait syz-fuzzer 47869 477522 39013 0 3 0x4000082 thrsleep syz-fuzzer 47869 193418 39013 0 3 0x4000082 thrsleep syz-fuzzer 47869 244969 39013 0 3 0x4000082 wait syz-fuzzer 47869 10727 39013 0 3 0x4000082 thrsleep syz-fuzzer 47869 468182 39013 0 3 0x4000082 thrsleep syz-fuzzer 47869 283743 39013 0 3 0x4000082 thrsleep syz-fuzzer 47869 114483 39013 0 3 0x4000082 wait syz-fuzzer 47869 480581 39013 0 3 0x4000082 wait syz-fuzzer 47869 298166 39013 0 3 0x4000082 wait syz-fuzzer 47869 298677 39013 0 3 0x4000082 kqread syz-fuzzer 47869 281696 39013 0 3 0x4000082 nanoslp syz-fuzzer 47869 147461 39013 0 3 0x4000082 wait syz-fuzzer 39013 501662 15431 0 3 0x10008a sigsusp ksh 15431 441630 24741 0 3 0x9a kqread sshd 69024 404288 1 0 3 0x100083 ttyin getty 24741 334569 1 0 3 0x88 kqread sshd 64052 251088 68535 73 3 0x1100090 kqread syslogd 68535 442847 1 0 3 0x100082 netio syslogd 69891 443603 1 0 3 0x100080 kqread resolvd 51365 286388 10252 77 3 0x100092 kqread dhcpleased 30958 358568 10252 77 3 0x100092 kqread dhcpleased 10252 398504 1 0 3 0x80 kqread dhcpleased 49272 123519 0 0 3 0x14200 bored smr 29404 50067 0 0 3 0x14200 pgzero zerothread 24621 279616 0 0 3 0x14200 aiodoned aiodoned 34635 247206 0 0 3 0x14200 syncer update 62663 292919 0 0 3 0x14200 cleaner cleaner 50976 45141 0 0 3 0x14200 reaper reaper 16290 351995 0 0 3 0x14200 pgdaemon pagedaemon 92528 227829 0 0 3 0x14200 bored viomb 2902 303254 0 0 3 0x40014200 acpi0 acpi0 1635 283835 0 0 3 0x40014200 idle1 17290 242228 0 0 3 0x14200 bored softnet 60613 82080 0 0 3 0x14200 bored softnet 15562 145313 0 0 3 0x14200 bored softnet 53109 507870 0 0 3 0x14200 bored softnet 28554 121043 0 0 3 0x14200 bored systqmp 19639 200676 0 0 3 0x14200 bored systq 74600 64770 0 0 3 0x40014200 bored softclock 55862 163799 0 0 3 0x40014200 idle0 1 349597 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 72193 (syz-executor.5) thread 0xffff8000ffff4fd0 (19274) 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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10216 6412K 6420K 78643K 11332 0 pcb 13 8K 8K 78643K 13 0 rtable 234 6K 7K 78643K 644 0 ifaddr 82 17K 17K 78643K 142 0 sysctl 2 0K 0K 78643K 2 0 counters 56 35K 35K 78643K 72 0 ioctlops 0 0K 2K 78643K 53 0 iov 0 0K 16K 78643K 365 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1271 79K 79K 78643K 1637 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 36 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 582 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 24 89K 117K 78643K 2306 0 sigio 0 0K 0K 78643K 4 0 proc 56 78K 103K 78643K 848 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 135 0 in_multi 99 6K 7K 78643K 235 0 ether_multi 1 0K 0K 78643K 8 0 mrt 1 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 1024 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 287 90K 531K 78643K 15262 0 UVM aobj 102 6K 6K 78643K 108 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 13 0 NDP 11 0K 2K 78643K 51 0 temp 124 4726K 4790K 78643K 8946 0 kqueue 13 20K 24K 78643K 186 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> 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 183 0 180 4 3 1 3 0 8 0 rtentry 112 200 0 90 4 0 4 4 0 8 0 unpcb 144 5448 0 5429 27 21 6 6 0 8 5 syncache 296 16 0 16 5 4 1 1 0 8 1 tcpqe 32 6 0 6 2 2 0 1 0 8 0 tcpcb 768 727 0 711 24 19 5 8 0 8 2 arp 120 35 0 17 1 0 1 1 0 8 0 ipq 40 1 0 1 1 1 0 1 0 8 0 ipqe 40 3 0 3 1 1 0 1 0 8 0 inpcb 368 1472 0 1462 33 29 4 8 0 8 3 nd6 48 48 0 24 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 808 0 353 29 0 29 29 0 8 0 art_table 32 809 0 353 4 0 4 4 0 8 0 art_node 16 199 0 99 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 7 2 1 1 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 577 0 567 1 0 1 1 0 8 0 shmpl 112 105 0 6 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 4275 0 2837 91 0 91 91 0 8 0 ffsino 272 4275 0 2837 97 0 97 97 0 8 0 nchpl 144 7395 0 5758 63 0 63 63 0 8 0 uvmvnodes 80 4492 0 0 92 0 92 92 0 8 0 vnodes 216 4492 0 0 250 0 250 250 0 8 0 namei 1024 25517 0 25517 2 1 1 2 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 21983 0 21983 15 14 1 8 0 8 1 plimitpl 152 412 0 387 3 2 1 2 0 8 0 sigapl 424 2576 0 2523 7 0 7 7 0 8 0 futexpl 64 18186 0 18182 1 0 1 1 0 8 0 knotepl 120 746 0 0 23 0 23 23 0 8 0 kqueuepl 216 645 0 632 13 12 1 5 0 8 0 pipepl 320 925 0 897 17 14 3 9 0 8 0 fdescpl 496 2558 0 2523 7 2 5 6 0 8 0 filepl 152 18217 0 17963 44 29 15 19 0 8 5 lockfpl 104 336 0 334 1 0 1 1 0 8 0 lockfspl 48 81 0 79 1 0 1 1 0 8 0 sessionpl 144 31 0 15 1 0 1 1 0 8 0 pgrppl 48 47 0 31 1 0 1 1 0 8 0 ucredpl 104 2569 0 2551 1 0 1 1 0 8 0 zombiepl 144 2523 0 2523 1 0 1 1 0 8 1 processpl 1064 2576 0 2523 4 0 4 4 0 8 0 procpl 672 6728 0 6652 13 5 8 8 0 8 0 sosppl 168 35 0 33 4 3 1 1 0 8 0 sockpl 488 7112 0 7080 126 106 20 25 0 8 16 mcl64k 65536 17 0 0 3 0 3 3 0 8 0 mcl16k 16384 17 0 0 3 0 3 3 0 8 0 mcl12k 12288 22 0 0 2 0 2 2 0 8 0 mcl9k 9216 14 0 0 1 0 1 1 0 8 0 mcl8k 8192 21 0 0 3 0 3 3 0 8 0 mcl4k 4096 32 0 0 3 0 3 3 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 368 0 0 45 0 45 45 0 8 0 mtagpl 96 4 0 0 1 0 1 1 0 8 0 mbufpl 256 3572 0 0 221 0 221 221 0 8 0 bufpl 288 7189 0 862 453 0 453 453 0 8 0 anonpl 24 473182 0 460443 130 28 102 104 0 186 18 amapchunkpl 152 212733 0 212074 2229 2101 128 2222 0 158 101 amappl16 200 6173 0 5784 50 16 34 34 0 8 13 amappl15 192 676 0 667 1 0 1 1 0 8 0 amappl14 184 291 0 284 1 0 1 1 0 8 0 amappl13 176 231 0 228 1 0 1 1 0 8 0 amappl12 168 98 0 95 1 0 1 1 0 8 0 amappl11 160 433 0 417 1 0 1 1 0 8 0 amappl10 152 206 0 204 1 0 1 1 0 8 0 amappl9 144 1064 0 1057 1 0 1 1 0 8 0 amappl8 136 1105 0 1019 4 0 4 4 0 8 0 amappl7 128 485 0 460 1 0 1 1 0 8 0 amappl6 120 839 0 819 2 1 1 2 0 8 0 amappl5 112 1717 0 1698 1 0 1 1 0 8 0 amappl4 104 1919 0 1879 2 0 2 2 0 8 0 amappl3 96 7321 0 7259 2 0 2 2 0 8 0 amappl2 88 895 0 857 2 1 1 2 0 8 0 amappl1 80 64612 0 63864 21 4 17 19 0 8 0 amappl 88 14495 0 14314 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 107 0 6 2 0 2 2 0 8 0 uaddrrnd 24 2558 0 2523 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2558 0 2523 1 0 1 1 0 8 0 vmmpekpl 168 25396 0 25327 4 0 4 4 0 8 0 vmmpepl 168 254929 0 252137 161 23 138 138 0 357 10 vmsppl 368 2557 0 2523 4 0 4 4 0 8 0 rwobjpl 56 67165 0 61146 88 0 88 88 0 8 0 pdppl 4096 5123 0 5046 196 115 81 91 0 8 4 pvpl 32 1011715 0 993771 288 108 180 257 0 265 26 pmappl 248 2557 0 2523 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1190 0 147 30 0 30 30 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff829b9ff0) 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 __mp_lock(ffffffff82a8cef8) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82a8cef8) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x1f end of kernel end trace frame: 0x7f7ffffc7420, count: 9 ddb{0}> trace x86_ipi_db(ffffffff829b9ff0) 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 __mp_lock(ffffffff82a8cef8) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82a8cef8) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x1f end of kernel end trace frame: 0x7f7ffffc7420, count: -6 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x18: addq $0x8,%rsp 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(fffffd80684439e8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd80684439d0,fffffd8068443b18) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd80684439d0,fffffd8068443b18) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd806e991998,3,0,0) at sosplice+0x550 sosetopt(fffffd806e991998,ffff,1023,fffffd806c442200) at sosetopt+0x7f4 sys_setsockopt(ffff8000ffff4fd0,ffff80002e4ae6b8,ffff80002e4ae700) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e4ae780) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e4ae780) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd585dd61a70, count: 6 ddb{1}> 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(fffffd80684439e8,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd80684439d0,fffffd8068443b18) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd80684439d0,fffffd8068443b18) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd806e991998,3,0,0) at sosplice+0x550 sosetopt(fffffd806e991998,ffff,1023,fffffd806c442200) at sosetopt+0x7f4 sys_setsockopt(ffff8000ffff4fd0,ffff80002e4ae6b8,ffff80002e4ae700) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002e4ae780) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002e4ae780) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd585dd61a70, count: -9