panic: lock (rwlock) solock not locked Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 300046 52665 32767 0x10 0 1 syz-executor.2 *199760 52665 32767 0x10 0x4000000 0K syz-executor.2 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(fffffd8067badb88,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd8067badb70,fffffd8067badcb8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8067badb70,fffffd8067badcb8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8067bad7a0,0,0,0) at sosplice+0x550 sosetopt(fffffd8067bad7a0,ffff,1023,fffffd8067b1d600) at sosetopt+0x7f4 sys_setsockopt(ffff8000ffff0010,ffff800026bf6438,ffff800026bf6480) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff800026bf6500) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800026bf6500) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x62645616790, 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(fffffd8067badb88,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd8067badb70,fffffd8067badcb8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8067badb70,fffffd8067badcb8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8067bad7a0,0,0,0) at sosplice+0x550 sosetopt(fffffd8067bad7a0,ffff,1023,fffffd8067b1d600) at sosetopt+0x7f4 sys_setsockopt(ffff8000ffff0010,ffff800026bf6438,ffff800026bf6480) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff800026bf6500) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800026bf6500) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x62645616790, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800026bf6180 rbx 0xffffffff829bab8f cpu_info_full_primary+0x2b8f rdx 0xffff800000bd5e40 rcx 0 rax 0xffff8000ffff0010 r8 0x101010101010101 r9 0x8080808080808080 r10 0xe88305d50edb5527 r11 0xd3c0a31dbaeab3fa r12 0xffffffff829ba990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff81fd76c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800026bf6170 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.2) pid=199760 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=77, nice=20 forw=0xffffffffffffffff, list=0xffff8000fffeaa80,0xffffffff82b7cfd0 process=0xffff80002129a578 user=0xffff800026bf1000, vmspace=0xfffffd806aa5c460 estcpu=27, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 73115 8830 74164 32767 2 0x10 syz-executor.6 73115 375770 74164 32767 3 0x4000090 netio syz-executor.6 73115 169399 74164 32767 3 0x4000090 ttyout syz-executor.6 50339 62038 34111 32767 2 0x10 syz-executor.7 50339 203740 34111 32767 3 0x4000090 fsleep syz-executor.7 50339 291920 34111 32767 3 0x4000090 fsleep syz-executor.7 52665 300046 47646 32767 7 0x10 syz-executor.2 *52665 199760 47646 32767 7 0x4000010 syz-executor.2 64432 196511 10780 32767 3 0x90 nanoslp syz-executor.3 10780 457804 6431 0 3 0x82 wait syz-executor.3 47646 449957 62505 32767 2 0x10 syz-executor.2 62505 416468 6431 0 3 0x82 wait syz-executor.2 84200 167345 65374 32767 3 0x90 nanoslp syz-executor.4 65374 401219 6431 0 3 0x82 wait syz-executor.4 34111 291294 38984 32767 3 0x90 nanoslp syz-executor.7 38984 201389 6431 0 3 0x82 wait syz-executor.7 95212 313209 15099 32767 3 0x90 nanoslp syz-executor.0 15099 142511 6431 0 3 0x82 wait syz-executor.0 52774 143536 0 0 3 0x14200 bored sosplice 74164 317400 29155 32767 3 0x90 nanoslp syz-executor.6 29155 517705 6431 0 3 0x82 wait syz-executor.6 96054 76472 86666 32767 2 0x10 syz-executor.5 86666 42158 6431 0 3 0x82 wait syz-executor.5 67184 60706 74537 32767 2 0x10 syz-executor.1 74537 286623 6431 0 3 0x82 wait syz-executor.1 6431 514501 96293 0 3 0x82 kqread syz-fuzzer 6431 236952 96293 0 3 0x4000082 thrsleep syz-fuzzer 6431 412474 96293 0 3 0x4000082 thrsleep syz-fuzzer 6431 236056 96293 0 3 0x4000082 wait syz-fuzzer 6431 97004 96293 0 3 0x4000082 thrsleep syz-fuzzer 6431 284952 96293 0 3 0x4000082 thrsleep syz-fuzzer 6431 292798 96293 0 3 0x4000082 thrsleep syz-fuzzer 6431 136752 96293 0 3 0x4000082 thrsleep syz-fuzzer 6431 105250 96293 0 3 0x4000082 thrsleep syz-fuzzer 6431 19859 96293 0 3 0x4000082 wait syz-fuzzer 6431 178120 96293 0 3 0x4000082 wait syz-fuzzer 6431 1359 96293 0 3 0x4000082 wait syz-fuzzer 6431 222629 96293 0 3 0x4000082 wait syz-fuzzer 6431 144917 96293 0 3 0x4000082 wait syz-fuzzer 6431 278455 96293 0 3 0x4000082 wait syz-fuzzer 6431 55314 96293 0 3 0x4000082 wait syz-fuzzer 96293 369442 98314 0 3 0x10008a sigsusp ksh 98314 394893 6601 0 3 0x9a kqread sshd 58243 22940 1 0 3 0x100083 ttyin getty 6601 453805 1 0 3 0x88 kqread sshd 6661 429007 99129 73 3 0x1100090 kqread syslogd 99129 64805 1 0 3 0x100082 netio syslogd 88456 505215 1 0 3 0x100080 kqread resolvd 61788 65833 22931 77 3 0x100092 kqread dhcpleased 64436 410205 22931 77 3 0x100092 kqread dhcpleased 22931 90098 1 0 3 0x80 kqread dhcpleased 78659 358450 0 0 3 0x14200 bored smr 6104 273387 0 0 2 0x14200 zerothread 29872 192874 0 0 3 0x14200 aiodoned aiodoned 59081 252280 0 0 3 0x14200 syncer update 67931 357440 0 0 3 0x14200 cleaner cleaner 70635 48232 0 0 3 0x14200 reaper reaper 37397 182572 0 0 3 0x14200 pgdaemon pagedaemon 37504 211721 0 0 3 0x14200 bored viomb 80279 225192 0 0 3 0x40014200 acpi0 acpi0 14837 48654 0 0 3 0x40014200 idle1 21214 74574 0 0 3 0x14200 bored softnet 87464 67016 0 0 3 0x14200 bored softnet 35948 168415 0 0 3 0x14200 bored softnet 52708 270409 0 0 3 0x14200 bored softnet 64206 473427 0 0 3 0x14200 bored systqmp 94746 231688 0 0 3 0x14200 bored systq 43469 380207 0 0 3 0x40014200 bored softclock 25278 57191 0 0 3 0x40014200 idle0 1 12649 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 52665 (syz-executor.2) thread 0xffff8000ffff0010 (199760) 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 10216 6412K 6420K 78643K 11338 0 pcb 13 12K 14K 78643K 17 0 rtable 242 6K 7K 78643K 847 0 ifaddr 82 17K 17K 78643K 156 0 sysctl 2 0K 2K 78643K 11 0 counters 56 35K 35K 78643K 76 0 ioctlops 0 0K 2K 78643K 51 0 iov 0 0K 16K 78643K 934 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1271 79K 79K 78643K 3364 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 56 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 957 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 21 77K 117K 78643K 4881 0 sigio 0 0K 0K 78643K 250 0 proc 56 78K 115K 78643K 1025 0 subproc 104 6K 6K 78643K 234 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 325 0 in_multi 99 6K 6K 78643K 254 0 ether_multi 1 0K 0K 78643K 13 0 mrt 1 0K 0K 78643K 1 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 1436 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 302 89K 104K 78643K 30894 0 UVM aobj 131 7K 7K 78643K 131 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 114 0 NDP 11 0K 2K 78643K 57 0 temp 124 4726K 4854K 78643K 15218 0 kqueue 12 18K 30K 78643K 523 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 553 0 550 8 7 1 3 0 8 0 rtentry 112 231 0 117 4 0 4 4 0 8 0 unpcb 144 4054 0 4040 37 35 2 6 0 8 1 syncache 296 62 0 62 9 8 1 1 0 8 1 tcpqe 32 427 0 427 8 8 0 1 0 8 0 tcpcb 768 1832 0 1823 54 46 8 16 0 8 4 arp 120 40 0 20 1 0 1 1 0 8 0 ipq 40 13 0 12 5 4 1 1 0 8 0 ipqe 40 99 0 98 5 4 1 1 0 8 0 inpcb 368 7317 0 7303 82 71 11 17 0 8 8 nd6 48 62 0 36 1 0 1 1 0 8 0 kcovpl 48 18 0 10 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 920 0 460 30 1 29 30 0 8 0 art_table 32 921 0 460 4 0 4 4 0 8 0 art_node 16 230 0 126 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 6 1 1 0 1 0 8 0 semapl 112 955 0 945 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 8798 0 7358 91 0 91 91 0 8 0 ffsino 272 8798 0 7358 97 0 97 97 0 8 0 nchpl 144 15232 0 13597 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 53980 0 53980 2 1 1 2 0 8 1 percpumem 16 50 0 10 1 0 1 1 0 8 0 kstatmem 264 42 0 20 2 0 2 2 0 8 0 scxspl 216 39340 0 39340 22 19 3 8 0 8 3 plimitpl 152 1480 0 1458 5 3 2 2 0 8 1 sigapl 424 5146 0 5091 7 0 7 7 0 8 0 futexpl 64 41937 0 41935 1 0 1 1 0 8 0 knotepl 120 641 0 0 16 0 16 16 0 8 0 kqueuepl 216 1475 0 1466 26 23 3 5 0 8 2 pipepl 320 1666 0 1638 52 46 6 13 0 8 3 fdescpl 496 5128 0 5096 7 2 5 6 0 8 0 filepl 152 40673 0 40433 83 65 18 22 0 8 8 lockfpl 104 690 0 688 2 1 1 2 0 8 0 lockfspl 48 182 0 180 1 0 1 1 0 8 0 sessionpl 144 33 0 17 1 0 1 1 0 8 0 pgrppl 48 52 0 36 1 0 1 1 0 8 0 ucredpl 104 10684 0 10666 1 0 1 1 0 8 0 zombiepl 144 5096 0 5091 1 0 1 1 0 8 0 processpl 1064 5146 0 5091 4 0 4 4 0 8 0 procpl 672 14617 0 14542 17 9 8 9 0 8 1 sosppl 168 124 0 122 10 9 1 1 0 8 0 sockpl 488 12054 0 12025 220 207 13 29 0 8 8 mcl64k 65536 28 0 0 3 0 3 3 0 8 0 mcl16k 16384 27 0 0 4 1 3 3 0 8 0 mcl12k 12288 18 0 0 2 0 2 2 0 8 0 mcl9k 9216 19 0 0 2 0 2 2 0 8 0 mcl8k 8192 18 0 0 3 0 3 3 0 8 0 mcl4k 4096 60 0 0 6 2 4 5 0 8 0 mcl2k2 2112 8 0 0 1 0 1 1 0 8 0 mcl2k 2048 255 0 0 25 3 22 25 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 1191 0 0 67 0 67 67 0 8 0 bufpl 288 10604 0 4271 453 0 453 453 0 8 0 anonpl 24 1029772 0 1017123 199 85 114 115 0 186 15 amapchunkpl 152 107730 0 107086 93 59 34 42 0 158 5 amappl16 200 16346 0 15922 121 89 32 42 0 8 8 amappl15 192 334 0 326 1 0 1 1 0 8 0 amappl14 184 46 0 41 1 0 1 1 0 8 0 amappl13 176 1016 0 1013 1 0 1 1 0 8 0 amappl12 168 1698 0 1692 2 1 1 1 0 8 0 amappl11 160 381 0 364 1 0 1 1 0 8 0 amappl10 152 1086 0 1079 1 0 1 1 0 8 0 amappl9 144 1087 0 1081 1 0 1 1 0 8 0 amappl8 136 939 0 832 4 0 4 4 0 8 0 amappl7 128 202 0 180 1 0 1 1 0 8 0 amappl6 120 824 0 802 2 1 1 2 0 8 0 amappl5 112 4321 0 4301 1 0 1 1 0 8 0 amappl4 104 1450 0 1416 2 0 2 2 0 8 0 amappl3 96 16724 0 16666 3 1 2 3 0 8 0 amappl2 88 3121 0 3074 4 2 2 2 0 8 0 amappl1 80 127331 0 126652 24 7 17 19 0 8 0 amappl 88 30063 0 29883 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 5128 0 5096 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5128 0 5096 1 0 1 1 0 8 0 vmmpekpl 168 47366 0 47315 3 0 3 3 0 8 0 vmmpepl 168 509543 0 506942 211 64 147 148 0 357 15 vmsppl 368 5127 0 5096 4 0 4 4 0 8 0 rwobjpl 56 132667 0 125169 124 13 111 112 0 8 2 pdppl 4096 10263 0 10192 257 176 81 91 0 8 10 pvpl 32 1994497 0 1976990 352 155 197 257 0 265 31 pmappl 248 5127 0 5096 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1131 0 257 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(fffffd8067badb88,4) at witness_assert+0x3ef sys/kern/subr_witness.c:1950 sbunlock(fffffd8067badb70,fffffd8067badcb8) at sbunlock+0xc9 soassertlocked sys/kern/uipc_socket2.c:414 [inline] sbunlock(fffffd8067badb70,fffffd8067badcb8) at sbunlock+0xc9 sys/kern/uipc_socket2.c:479 sosplice(fffffd8067bad7a0,0,0,0) at sosplice+0x550 sosetopt(fffffd8067bad7a0,ffff,1023,fffffd8067b1d600) at sosetopt+0x7f4 sys_setsockopt(ffff8000ffff0010,ffff800026bf6438,ffff800026bf6480) at sys_setsockopt+0x1f6 sys/kern/uipc_syscalls.c:1233 syscall(ffff800026bf6500) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline] syscall(ffff800026bf6500) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x62645616790, 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: 0x7f7ffffc1210, 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: 0x7f7ffffc1210, count: -3