panic: lock (rwlock) solock not locked Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 522877 44743 32767 0x10 0 1 syz-executor.0 *110987 44743 32767 0x10 0x4000000 0K syz-executor.0 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(fffffd805cc48ba0,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd805cc48b88,fffffd805cc48cd0) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd805cc48b88,fffffd805cc48cd0) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd805cc487b8,3,0,fffffd8008779810) at sosplice+0x550 sosetopt(fffffd805cc487b8,ffff,1023,fffffd80679ae500) at sosetopt+0x7f4 sys_setsockopt(ffff80002cab1a40,ffff80002b010418,ffff80002b010460) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002b0104e0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002b0104e0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x80da43df480, 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(fffffd805cc48ba0,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd805cc48b88,fffffd805cc48cd0) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd805cc48b88,fffffd805cc48cd0) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd805cc487b8,3,0,fffffd8008779810) at sosplice+0x550 sosetopt(fffffd805cc487b8,ffff,1023,fffffd80679ae500) at sosetopt+0x7f4 sys_setsockopt(ffff80002cab1a40,ffff80002b010418,ffff80002b010460) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002b0104e0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002b0104e0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x80da43df480, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002b010160 rbx 0xffffffff829bab8f cpu_info_full_primary+0x2b8f rdx 0xffff800000bd0840 rcx 0 rax 0xffff80002cab1a40 r8 0x101010101010101 r9 0x8080808080808080 r10 0xb0f504dd70ccf06f r11 0x9ccfbaf2edf8284a r12 0xffffffff829ba990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff81fd76c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002b010150 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=110987 stat=onproc flags process=10 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000fffefa50,0xffffffff82b7cfd0 process=0xffff8000ffff10b8 user=0xffff80002b00b000, vmspace=0xfffffd807effd5c0 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 44743 522877 51463 32767 7 0x10 syz-executor.0 44743 311864 51463 32767 3 0x4000090 netcon2 syz-executor.0 *44743 110987 51463 32767 7 0x4000010 syz-executor.0 78319 174666 56506 32767 3 0x90 nanoslp syz-executor.6 78319 495802 56506 32767 3 0x4000090 kqread syz-executor.6 78319 65390 56506 32767 3 0x4000090 fsleep syz-executor.6 37859 70099 56615 32767 3 0x90 piperd syz-executor.1 56615 33111 55421 0 3 0x82 wait syz-executor.1 41457 481891 76876 32767 3 0x90 piperd syz-executor.4 76876 68552 55421 0 3 0x82 wait syz-executor.4 3133 360378 34361 32767 3 0x90 piperd syz-executor.7 34361 504746 55421 0 3 0x82 wait syz-executor.7 90426 292796 4439 32767 3 0x90 piperd syz-executor.2 4439 336850 55421 0 3 0x82 wait syz-executor.2 88043 313548 99718 32767 3 0x90 piperd syz-executor.5 99718 386714 55421 0 3 0x82 wait syz-executor.5 51463 230598 97433 32767 3 0x90 nanoslp syz-executor.0 97433 394666 55421 0 3 0x82 wait syz-executor.0 63000 383269 28040 32767 3 0x90 piperd syz-executor.3 28040 345118 55421 0 3 0x82 wait syz-executor.3 56506 255615 41523 32767 3 0x90 nanoslp syz-executor.6 41523 133783 55421 0 3 0x82 wait syz-executor.6 23937 58491 0 0 3 0x14200 bored sosplice 55421 496725 43022 0 3 0x82 wait syz-fuzzer 55421 287805 43022 0 3 0x4000082 thrsleep syz-fuzzer 55421 74060 43022 0 3 0x4000082 wait syz-fuzzer 55421 370223 43022 0 3 0x4000082 kqread syz-fuzzer 55421 421377 43022 0 3 0x4000082 thrsleep syz-fuzzer 55421 305396 43022 0 3 0x4000082 thrsleep syz-fuzzer 55421 43360 43022 0 3 0x4000082 thrsleep syz-fuzzer 55421 203758 43022 0 3 0x4000082 wait syz-fuzzer 55421 393765 43022 0 3 0x4000082 thrsleep syz-fuzzer 55421 213870 43022 0 3 0x4000082 thrsleep syz-fuzzer 55421 153626 43022 0 3 0x4000082 wait syz-fuzzer 55421 181635 43022 0 3 0x4000082 thrsleep syz-fuzzer 55421 238286 43022 0 3 0x4000082 wait syz-fuzzer 55421 152384 43022 0 3 0x4000082 wait syz-fuzzer 55421 342652 43022 0 3 0x4000082 wait syz-fuzzer 55421 501561 43022 0 3 0x4000082 wait syz-fuzzer 43022 238733 75225 0 3 0x10008a sigsusp ksh 75225 254390 5244 0 3 0x9a kqread sshd 65854 372139 1 0 3 0x100083 ttyin getty 5244 115471 1 0 3 0x88 kqread sshd 56890 142533 15702 73 3 0x1100090 kqread syslogd 15702 397761 1 0 3 0x100082 netio syslogd 1600 165920 1 0 3 0x100080 kqread resolvd 59637 341755 27847 77 3 0x100092 kqread dhcpleased 59999 452843 27847 77 3 0x100092 kqread dhcpleased 27847 7398 1 0 3 0x80 kqread dhcpleased 94109 362150 0 0 3 0x14200 bored smr 52362 36615 0 0 3 0x14200 pgzero zerothread 94741 241751 0 0 3 0x14200 aiodoned aiodoned 24164 411014 0 0 3 0x14200 syncer update 77367 111965 0 0 3 0x14200 cleaner cleaner 50390 26912 0 0 3 0x14200 reaper reaper 22526 312779 0 0 3 0x14200 pgdaemon pagedaemon 79771 473737 0 0 3 0x14200 bored viomb 66586 358638 0 0 3 0x40014200 acpi0 acpi0 5940 205173 0 0 3 0x40014200 idle1 62133 140194 0 0 3 0x14200 bored softnet 28956 65934 0 0 3 0x14200 bored softnet 83887 6268 0 0 3 0x14200 bored softnet 66977 193383 0 0 3 0x14200 bored softnet 39623 333919 0 0 3 0x14200 bored systqmp 1606 49978 0 0 3 0x14200 bored systq 96845 370996 0 0 3 0x40014200 bored softclock 71796 401452 0 0 3 0x40014200 idle0 1 155951 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 44743 (syz-executor.0) thread 0xffff80002cab1a40 (110987) 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 10243 6416K 6420K 78643K 11500 0 pcb 13 20K 24K 78643K 21 0 rtable 240 6K 7K 78643K 4124 0 ifaddr 82 18K 18K 78643K 475 0 sysctl 3 1K 5K 78643K 14 0 counters 56 35K 35K 78643K 166 0 ioctlops 0 0K 2K 78643K 561 0 iov 0 0K 32K 78643K 5808 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1271 79K 79K 78643K 8430 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 400 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 7405 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 20 73K 105K 78643K 29798 0 sigio 0 0K 0K 78643K 788 0 proc 56 78K 115K 78643K 4087 0 subproc 104 6K 6K 78643K 819 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 16464 0 in_multi 99 6K 7K 78643K 1035 0 ether_multi 1 0K 0K 78643K 79 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 403 1791K 1791K 78643K 403 0 exec 0 0K 2K 78643K 6070 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 410 94K 989K 78643K 183015 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 926 0 NDP 13 0K 2K 78643K 192 0 temp 124 4726K 4854K 78643K 77394 0 kqueue 13 18K 32K 78643K 2894 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 2340 0 2337 27 25 2 3 0 8 1 rtentry 112 760 0 647 4 0 4 4 0 8 0 unpcb 144 24374 0 24360 217 216 1 10 0 8 0 syncache 296 290 0 290 44 44 0 1 0 8 0 tcpqe 32 111 0 111 38 38 0 1 0 8 0 tcpcb 768 37253 0 37243 706 701 5 28 0 8 1 arp 120 134 0 115 1 0 1 1 0 8 0 ipq 40 39 0 39 20 20 0 1 0 8 0 ipqe 40 165 0 165 20 20 0 1 0 8 0 inpcb 368 53960 0 53945 454 448 6 20 0 8 4 nd6 48 227 0 201 1 0 1 1 0 8 0 kcovpl 48 63 0 55 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 3019 0 2550 34 4 30 31 0 8 0 art_table 32 3020 0 2550 4 0 4 4 0 8 0 art_node 16 759 0 656 1 0 1 1 0 8 0 sysvmsgpl 40 26 0 22 3 2 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 7403 0 7393 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 42633 0 41123 95 0 95 95 0 8 0 ffsino 272 42633 0 41123 102 0 102 102 0 8 0 nchpl 144 82411 0 80778 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 283980 0 283980 5 4 1 2 0 8 1 percpumem 16 95 0 55 1 0 1 1 0 8 0 kstatmem 264 132 0 110 2 0 2 2 0 8 0 scxspl 216 233747 0 233747 81 80 1 8 0 8 1 plimitpl 152 6301 0 6279 23 22 1 2 0 8 0 sigapl 424 29965 0 29916 7 0 7 7 0 8 0 futexpl 64 292060 0 292059 2 1 1 1 0 8 0 knotepl 120 1521 0 0 17 0 17 17 0 8 0 kqueuepl 216 9434 0 9425 154 151 3 8 0 8 2 pipepl 320 8563 0 8535 236 232 4 13 0 8 1 fdescpl 496 29947 0 29916 6 1 5 5 0 8 0 filepl 152 230584 0 230348 348 334 14 24 0 8 4 lockfpl 104 5635 0 5633 9 7 2 3 0 8 1 lockfspl 48 1361 0 1359 1 0 1 1 0 8 0 sessionpl 144 78 0 62 1 0 1 1 0 8 0 pgrppl 48 266 0 250 1 0 1 1 0 8 0 ucredpl 104 40414 0 40396 1 0 1 1 0 8 0 zombiepl 144 29916 0 29916 1 0 1 1 0 8 1 processpl 1064 29965 0 29916 4 0 4 4 0 8 0 procpl 672 90129 0 90061 37 29 8 9 0 8 1 sosppl 168 483 0 481 43 42 1 1 0 8 0 sockpl 488 81723 0 81691 1216 1205 11 38 0 8 5 mcl64k 65536 65 0 0 5 2 3 3 0 8 0 mcl16k 16384 42 0 0 5 2 3 3 0 8 0 mcl12k 12288 57 0 0 3 1 2 3 0 8 0 mcl9k 9216 45 0 0 3 1 2 2 0 8 0 mcl8k 8192 93 0 0 7 0 7 7 0 8 0 mcl4k 4096 67 0 0 5 1 4 4 0 8 0 mcl2k2 2112 22 0 0 2 0 2 2 0 8 0 mcl2k 2048 716 0 0 39 15 24 32 0 8 0 mtagpl 96 17 0 0 1 0 1 1 0 8 0 mbufpl 256 4768 0 0 218 0 218 218 0 8 0 bufpl 288 51589 0 45262 453 0 453 453 0 8 0 anonpl 24 6008913 0 5997734 330 224 106 117 0 186 0 amapchunkpl 152 1883099 0 1882451 24174 19829 4345 4419 0 158 4313 amappl16 200 91816 0 91462 389 357 32 34 0 8 8 amappl15 192 4356 0 4350 1 0 1 1 0 8 0 amappl14 184 127 0 121 1 0 1 1 0 8 0 amappl13 176 2057 0 2055 1 0 1 1 0 8 0 amappl12 168 8104 0 8099 1 0 1 1 0 8 0 amappl11 160 1011 0 995 1 0 1 1 0 8 0 amappl10 152 4296 0 4289 1 0 1 1 0 8 0 amappl9 144 4291 0 4284 1 0 1 1 0 8 0 amappl8 136 9480 0 9214 11 1 10 10 0 8 0 amappl7 128 7169 0 7140 2 1 1 2 0 8 0 amappl6 120 4380 0 4364 2 1 1 2 0 8 0 amappl5 112 25851 0 25835 1 0 1 1 0 8 0 amappl4 104 3629 0 3593 5 3 2 2 0 8 0 amappl3 96 102136 0 102079 17 15 2 3 0 8 0 amappl2 88 10447 0 10405 2 0 2 2 0 8 0 amappl1 80 743289 0 742629 23 6 17 20 0 8 0 amappl 88 180251 0 180066 6 0 6 6 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 29947 0 29916 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 29947 0 29916 1 0 1 1 0 8 0 vmmpekpl 168 257395 0 257346 3 0 3 3 0 8 0 vmmpepl 168 2987085 0 2984475 409 261 148 149 0 357 9 vmsppl 368 29946 0 29916 4 0 4 4 0 8 0 rwobjpl 56 741379 0 733804 135 23 112 112 0 8 0 pdppl 4096 59901 0 59832 715 634 81 85 0 8 12 pvpl 32 11378101 0 11361939 676 492 184 255 0 265 4 pmappl 248 29946 0 29916 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 2148 0 1112 30 0 30 30 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(fffffd805cc48ba0,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd805cc48b88,fffffd805cc48cd0) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd805cc48b88,fffffd805cc48cd0) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd805cc487b8,3,0,fffffd8008779810) at sosplice+0x550 sosetopt(fffffd805cc487b8,ffff,1023,fffffd80679ae500) at sosetopt+0x7f4 sys_setsockopt(ffff80002cab1a40,ffff80002b010418,ffff80002b010460) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff80002b0104e0) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff80002b0104e0) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x80da43df480, 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: 0x7f7ffffe1be0, 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: 0x7f7ffffe1be0, count: -3