panic: rw_enter: solock locking against myself Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 500298 90981 32767 0x10 0 0 syz-executor.0 *122236 51862 32767 0x10 0x4000000 1K syz-executor.7 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff827ed838) at panic+0x17b sys/kern/subr_prf.c:198 rw_enter(fffffd806b745210,1) at rw_enter+0x462 rw_enter_diag sys/kern/kern_rwlock.c:183 [inline] rw_enter(fffffd806b745210,1) at rw_enter+0x462 sys/kern/kern_rwlock.c:273 soisconnected(fffffd806b7455d8) at soisconnected+0x243 solock sys/kern/uipc_socket2.c:352 [inline] soisconnected(fffffd806b7455d8) at soisconnected+0x243 sys/kern/uipc_socket2.c:111 unp_connect2(fffffd806b745208,fffffd806b7455d8) at unp_connect2+0xca unp_connect(fffffd806b745208,fffffd806d3e5500,ffff8000211d90a8) at unp_connect+0x46d sys/kern/uipc_usrreq.c:908 sys_connect(ffff8000211d90a8,ffff8000213ed2b0,ffff8000213ed300) at sys_connect+0x207 sys/kern/uipc_syscalls.c:422 syscall(ffff8000213ed380) at syscall+0x606 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff8000213ed380) at syscall+0x606 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x15aca831100, 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: rw_enter: solock locking against myself ddb{1}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff827ed838) at panic+0x17b sys/kern/subr_prf.c:198 rw_enter(fffffd806b745210,1) at rw_enter+0x462 rw_enter_diag sys/kern/kern_rwlock.c:183 [inline] rw_enter(fffffd806b745210,1) at rw_enter+0x462 sys/kern/kern_rwlock.c:273 soisconnected(fffffd806b7455d8) at soisconnected+0x243 solock sys/kern/uipc_socket2.c:352 [inline] soisconnected(fffffd806b7455d8) at soisconnected+0x243 sys/kern/uipc_socket2.c:111 unp_connect2(fffffd806b745208,fffffd806b7455d8) at unp_connect2+0xca unp_connect(fffffd806b745208,fffffd806d3e5500,ffff8000211d90a8) at unp_connect+0x46d sys/kern/uipc_usrreq.c:908 sys_connect(ffff8000211d90a8,ffff8000213ed2b0,ffff8000213ed300) at sys_connect+0x207 sys/kern/uipc_syscalls.c:422 syscall(ffff8000213ed380) at syscall+0x606 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff8000213ed380) at syscall+0x606 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x15aca831100, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff8000213ecef0 rbx 0xffff800020d59b9f rdx 0 rcx 0xffff8000211d90a8 rax 0xffff800020d58ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xbf1eb3541c3f900b r11 0x1c8c858879898ff9 r12 0xffff800020d599a0 r13 0 r14 0 r15 0x1 rip 0xffffffff81c082fc db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff8000213ecee0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.7) pid=122236 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff8000211d98d0,0xffffffff82d8c4a8 process=0xffff80002134e5c8 user=0xffff8000213e8000, vmspace=0xfffffd806b87b208 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 90981 500298 90293 32767 7 0x10 syz-executor.0 51862 58761 29232 32767 2 0x10 syz-executor.7 51862 387302 29232 32767 3 0x4000090 fsleep syz-executor.7 51862 288542 29232 32767 3 0x4000090 fsleep syz-executor.7 *51862 122236 29232 32767 7 0x4000010 syz-executor.7 95084 243638 1498 32767 2 0x10 syz-executor.5 29232 11285 41764 32767 3 0x90 nanoslp syz-executor.7 1498 80178 72093 0 3 0x82 wait syz-executor.5 41764 287843 72093 0 3 0x82 wait syz-executor.7 62376 70354 9432 32767 2 0x10 syz-executor.3 87462 51966 6043 32767 3 0x90 nanoslp syz-executor.4 9432 215390 72093 0 3 0x82 wait syz-executor.3 55367 347820 57544 32767 3 0x90 nanoslp syz-executor.6 57544 210956 72093 0 3 0x82 wait syz-executor.6 90293 255517 16462 32767 3 0x90 nanoslp syz-executor.0 6043 265761 72093 0 3 0x82 wait syz-executor.4 16462 422345 72093 0 3 0x82 wait syz-executor.0 10544 128652 62507 32767 3 0x90 nanoslp syz-executor.2 77014 93076 74288 32767 2 0x10 syz-executor.1 62507 514325 72093 0 3 0x82 wait syz-executor.2 74288 356372 72093 0 3 0x82 wait syz-executor.1 72093 138822 8712 0 3 0x2000082 wait syz-execprog 72093 390430 8712 0 3 0x6000082 nanoslp syz-execprog 72093 431738 8712 0 3 0x6000082 thrsleep syz-execprog 72093 82709 8712 0 3 0x6000082 wait syz-execprog 72093 347496 8712 0 3 0x6000082 thrsleep syz-execprog 72093 181942 8712 0 3 0x6000082 wait syz-execprog 72093 187459 8712 0 3 0x6000082 wait syz-execprog 72093 430908 8712 0 3 0x6000082 wait syz-execprog 72093 521180 8712 0 3 0x6000082 wait syz-execprog 72093 450316 8712 0 3 0x6000082 thrsleep syz-execprog 72093 328510 8712 0 3 0x6000082 wait syz-execprog 72093 442880 8712 0 3 0x6000082 thrsleep syz-execprog 72093 360412 8712 0 3 0x6000082 wait syz-execprog 72093 73140 8712 0 3 0x6000082 thrsleep syz-execprog 72093 504835 8712 0 3 0x6000082 kqread syz-execprog 8712 94985 99738 0 3 0x10008a sigsusp ksh 99738 298250 85767 0 3 0x9a kqread sshd 13633 375053 1 0 3 0x100083 ttyin getty 85767 267579 1 0 3 0x88 kqread sshd 48330 344959 60701 73 3 0x1100090 kqread syslogd 60701 116689 1 0 3 0x100082 netio syslogd 78646 359614 1 0 3 0x100080 kqread resolvd 78404 195179 9658 77 3 0x100092 kqread dhcpleased 32662 503940 9658 77 3 0x100092 kqread dhcpleased 9658 424570 1 0 3 0x80 kqread dhcpleased 93204 301733 0 0 3 0x14200 bored smr 47811 350159 0 0 2 0x14200 zerothread 44699 335797 0 0 3 0x14200 aiodoned aiodoned 91550 187316 0 0 3 0x14200 syncer update 83563 480521 0 0 3 0x14200 cleaner cleaner 78317 320438 0 0 3 0x14200 reaper reaper 76670 239675 0 0 3 0x14200 pgdaemon pagedaemon 75324 310750 0 0 3 0x14200 bored viomb 89297 476293 0 0 3 0x40014200 acpi0 acpi0 12057 251356 0 0 3 0x40014200 idle1 86974 487006 0 0 3 0x14200 bored softnet3 78830 351762 0 0 3 0x14200 bored softnet2 17021 167804 0 0 3 0x14200 bored softnet1 96608 174170 0 0 3 0x14200 bored softnet0 57395 39227 0 0 3 0x14200 bored systqmp 76237 436370 0 0 3 0x14200 bored systq 4462 99749 0 0 3 0x40014200 bored softclock 95181 82373 0 0 3 0x40014200 idle0 1 51551 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 51862 (syz-executor.7) thread 0xffff8000211d90a8 (122236) exclusive rwlock solock r = 0 (0xfffffd806b745220) #0 witness_lock+0x447 #1 solock_pair+0x9f solock sys/kern/uipc_socket2.c:352 [inline] #1 solock_pair+0x9f sys/kern/uipc_socket2.c:402 #2 unp_connect+0x395 sys/kern/uipc_usrreq.c:880 #3 sys_connect+0x207 sys/kern/uipc_syscalls.c:422 #4 syscall+0x606 mi_syscall sys/sys/syscall_mi.h:110 [inline] #4 syscall+0x606 sys/arch/amd64/amd64/trap.c:623 #5 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd807022fa28) #0 witness_lock+0x447 #1 rw_enter+0x3c8 sys/kern/kern_rwlock.c:309 #2 rrw_enter+0x8c sys/kern/kern_rwlock.c:464 #3 VOP_LOCK+0x8b sys/kern/vfs_vops.c:518 #4 vn_lock+0x84 sys/kern/vfs_vnops.c:564 #5 vget+0x200 sys/kern/vfs_subr.c:676 #6 ufs_ihashget+0x121 sys/ufs/ufs/ufs_ihash.c:119 #7 ffs_vget+0x7c sys/ufs/ffs/ffs_vfsops.c:1314 #8 ufs_lookup+0x122c sys/ufs/ufs/ufs_lookup.c:582 #9 VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 #10 vfs_lookup+0x6e2 sys/kern/vfs_lookup.c:566 #11 namei+0x55a sys/kern/vfs_lookup.c:250 #12 unp_connect+0x1ce sys/kern/uipc_usrreq.c:841 #13 sys_connect+0x207 sys/kern/uipc_syscalls.c:422 #14 syscall+0x606 mi_syscall sys/sys/syscall_mi.h:110 [inline] #14 syscall+0x606 sys/arch/amd64/amd64/trap.c:623 #15 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82cdd898) #0 witness_lock+0x447 #1 unp_connect+0x1c6 sys/kern/uipc_usrreq.c:841 #2 sys_connect+0x207 sys/kern/uipc_syscalls.c:422 #3 syscall+0x606 mi_syscall sys/sys/syscall_mi.h:110 [inline] #3 syscall+0x606 sys/arch/amd64/amd64/trap.c:623 #4 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10180 6407K 6420K 78643K 11261 0 pcb 13 8K 8K 78643K 13 0 rtable 234 6K 6K 78643K 380 0 pf 29 8K 8K 78643K 32 0 ifaddr 44 15K 15K 78643K 50 0 ifgroup 50 2K 2K 78643K 55 0 counters 60 35K 35K 78643K 62 0 ioctlops 0 0K 2K 78643K 30 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1187 74K 74K 78643K 1200 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 1K 1K 78643K 2 0 sem 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 20 73K 109K 78643K 1822 0 proc 56 78K 103K 78643K 499 0 subproc 0 0K 0K 78643K 13 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 99 7K 7K 78643K 110 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 25 122K 122K 78643K 25 0 exec 0 0K 1K 78643K 405 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 256 77K 79K 78643K 24831 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 11 0K 2K 78643K 30 0 temp 1 5904K 5968K 78643K 8047 0 kqueue 12 18K 18K 78643K 34 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 38 0 35 1 0 1 1 0 8 0 rtentry 112 122 0 12 4 0 4 4 0 8 0 unpcb 144 8366 0 8350 2 0 2 2 0 8 0 syncache 296 8 0 8 2 2 0 1 0 8 0 tcpqe 32 357 0 357 2 2 0 1 0 8 0 tcpcb 808 12 0 9 1 0 1 1 0 8 0 arp 120 20 0 2 1 0 1 1 0 8 0 inpcb 368 66 0 60 1 0 1 1 0 8 0 nd6 136 27 0 3 2 1 1 1 0 8 0 kcovpl 48 1 0 1 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 501 0 48 32 3 29 29 0 8 0 art_table 32 502 0 48 5 1 4 4 0 8 0 art_node 16 121 0 21 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 4780 0 3335 92 1 91 91 0 8 0 ffsino 272 4780 0 3335 97 0 97 97 0 8 0 nchpl 144 8530 0 6837 63 0 63 63 0 8 0 uvmvnodes 80 4802 0 0 98 0 98 98 0 8 0 vnodes 216 4802 0 0 267 0 267 267 0 8 0 namei 1024 19533 0 19533 3 2 1 2 0 8 1 percpumem 16 44 0 1 1 0 1 1 0 8 0 kstatmem 264 24 0 2 2 0 2 2 0 8 0 scxspl 216 22444 0 22444 10 9 1 8 1 8 1 plimitpl 152 58 0 35 1 0 1 1 0 8 0 sigapl 424 2149 0 2098 8 1 7 7 0 8 0 futexpl 64 14785 0 14783 2 1 1 1 0 8 0 knotepl 120 110 0 0 4 0 4 4 0 8 0 kqueuepl 216 30 0 22 1 0 1 1 0 8 0 pipepl 320 182 0 154 5 2 3 3 0 8 0 fdescpl 496 2132 0 2101 9 4 5 6 0 8 0 filepl 152 11993 0 11861 7 1 6 6 0 8 0 lockfpl 104 6 0 4 1 0 1 1 0 8 0 lockfspl 48 4 0 2 1 0 1 1 0 8 0 sessionpl 144 32 0 16 1 0 1 1 0 8 0 pgrppl 48 32 0 16 1 0 1 1 0 8 0 ucredpl 104 120 0 102 1 0 1 1 0 8 0 zombiepl 144 2101 0 2098 2 1 1 1 0 8 0 processpl 1072 2149 0 2098 4 0 4 4 0 8 0 procpl 696 6958 0 6890 12 3 9 9 0 8 1 sockpl 488 8470 0 8445 5 0 5 5 0 8 1 mcl8k 8192 8 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 325 0 0 39 0 39 39 0 8 0 mtagpl 96 4 0 0 1 0 1 1 0 8 0 mbufpl 256 353 0 0 22 0 22 22 0 8 0 bufpl 288 6558 0 235 452 0 452 452 0 8 0 anonpl 24 498408 0 493287 62 23 39 56 0 186 5 amapchunkpl 152 81016 0 80378 50 15 35 35 0 158 5 amappl16 200 12693 0 12616 8 3 5 6 0 8 0 amappl15 192 33 0 32 1 0 1 1 0 8 0 amappl14 184 236 0 225 3 2 1 2 0 8 0 amappl13 176 25 0 24 3 2 1 1 0 8 0 amappl12 168 2839 0 2804 3 1 2 2 0 8 0 amappl11 160 98 0 88 1 0 1 1 0 8 0 amappl10 152 52 0 43 2 1 1 1 0 8 0 amappl9 144 406 0 406 2 2 0 1 0 8 0 amappl8 136 253 0 223 3 1 2 2 0 8 0 amappl7 128 135 0 125 2 1 1 2 0 8 0 amappl6 120 304 0 287 2 1 1 2 0 8 0 amappl5 112 235 0 225 1 0 1 1 0 8 0 amappl4 104 774 0 738 4 2 2 3 0 8 0 amappl3 96 16217 0 16143 5 1 4 4 0 8 1 amappl2 88 2551 0 2483 5 3 2 3 0 8 0 amappl1 80 19853 0 19337 31 18 13 22 0 8 0 amappl 88 24174 0 23994 8 2 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 2132 0 2101 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2132 0 2101 1 0 1 1 0 8 0 vmmpekpl 168 30191 0 30152 4 1 3 3 0 8 0 vmmpepl 168 149675 0 147967 120 23 97 112 0 357 13 vmsppl 464 2131 0 2101 8 3 5 5 0 8 0 rwobjpl 56 62679 0 56916 92 10 82 82 0 8 0 pdppl 4096 4272 0 4202 140 58 82 88 0 8 12 pvpl 32 1040228 0 1029928 361 79 282 356 0 265 191 pmappl 248 2131 0 2101 5 2 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 888 0 66 24 0 24 24 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1e: addq $0x8,%rsp x86_ipi_db(ffffffff82ba6ff0) at x86_ipi_db+0x1e 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+0x27 __mp_lock(ffffffff82cdd690) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82cdd690) at __mp_lock+0x122 sys/kern/kern_lock.c:147 syscall(ffff8000213bdd40) at syscall+0x5cd mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff8000213bdd40) at syscall+0x5cd sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7851cb818530, count: 9 ddb{0}> trace x86_ipi_db(ffffffff82ba6ff0) at x86_ipi_db+0x1e 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+0x27 __mp_lock(ffffffff82cdd690) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82cdd690) at __mp_lock+0x122 sys/kern/kern_lock.c:147 syscall(ffff8000213bdd40) at syscall+0x5cd mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff8000213bdd40) at syscall+0x5cd sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7851cb818530, count: -6 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x1c: addq $0x8,%rsp db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff827ed838) at panic+0x17b sys/kern/subr_prf.c:198 rw_enter(fffffd806b745210,1) at rw_enter+0x462 rw_enter_diag sys/kern/kern_rwlock.c:183 [inline] rw_enter(fffffd806b745210,1) at rw_enter+0x462 sys/kern/kern_rwlock.c:273 soisconnected(fffffd806b7455d8) at soisconnected+0x243 solock sys/kern/uipc_socket2.c:352 [inline] soisconnected(fffffd806b7455d8) at soisconnected+0x243 sys/kern/uipc_socket2.c:111 unp_connect2(fffffd806b745208,fffffd806b7455d8) at unp_connect2+0xca unp_connect(fffffd806b745208,fffffd806d3e5500,ffff8000211d90a8) at unp_connect+0x46d sys/kern/uipc_usrreq.c:908 sys_connect(ffff8000211d90a8,ffff8000213ed2b0,ffff8000213ed300) at sys_connect+0x207 sys/kern/uipc_syscalls.c:422 syscall(ffff8000213ed380) at syscall+0x606 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff8000213ed380) at syscall+0x606 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x15aca831100, count: 6 ddb{1}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff827ed838) at panic+0x17b sys/kern/subr_prf.c:198 rw_enter(fffffd806b745210,1) at rw_enter+0x462 rw_enter_diag sys/kern/kern_rwlock.c:183 [inline] rw_enter(fffffd806b745210,1) at rw_enter+0x462 sys/kern/kern_rwlock.c:273 soisconnected(fffffd806b7455d8) at soisconnected+0x243 solock sys/kern/uipc_socket2.c:352 [inline] soisconnected(fffffd806b7455d8) at soisconnected+0x243 sys/kern/uipc_socket2.c:111 unp_connect2(fffffd806b745208,fffffd806b7455d8) at unp_connect2+0xca unp_connect(fffffd806b745208,fffffd806d3e5500,ffff8000211d90a8) at unp_connect+0x46d sys/kern/uipc_usrreq.c:908 sys_connect(ffff8000211d90a8,ffff8000213ed2b0,ffff8000213ed300) at sys_connect+0x207 sys/kern/uipc_syscalls.c:422 syscall(ffff8000213ed380) at syscall+0x606 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff8000213ed380) at syscall+0x606 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x15aca831100, count: -9