panic: rw_enter: dklk locking against myself Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *469986 68742 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8247f6c9) at panic+0x161 sys/kern/subr_prf.c:202 rw_enter(ffff8000006aa058,11) at rw_enter+0x36f sys/kern/kern_rwlock.c:174 vndopen(2902,3,2000,ffff800021658540) at vndopen+0x8d sys/dev/vnd.c:185 spec_open(ffff8000216d8b38) at spec_open+0x3c8 sys/kern/spec_vnops.c:157 VOP_OPEN(fffffd806e481688,3,fffffd807f7d8780,ffff800021658540) at VOP_OPEN+0x6c sys/kern/vfs_vops.c:138 vn_open(ffff8000216d8dd0,3,0) at vn_open+0x467 sys/kern/vfs_vnops.c:183 vndioctl(2902,c0384600,ffff8000216d90f0,81,ffff800021658540) at vndioctl+0xa07 sys/dev/vnd.c:452 VOP_IOCTL(fffffd806e481688,c0384600,ffff8000216d90f0,81,fffffd807f7d8780,ffff800021658540) at VOP_IOCTL+0x8d sys/kern/vfs_vops.c:264 vn_ioctl(fffffd8064016078,c0384600,ffff8000216d90f0,ffff800021658540) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021658540,ffff8000216d9208,ffff8000216d9260) at sys_ioctl+0x49e syscall(ffff8000216d92d0) at syscall+0x571 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1bf21111530, count: 2 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: rw_enter: dklk locking against myself ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8247f6c9) at panic+0x161 sys/kern/subr_prf.c:202 rw_enter(ffff8000006aa058,11) at rw_enter+0x36f sys/kern/kern_rwlock.c:174 vndopen(2902,3,2000,ffff800021658540) at vndopen+0x8d sys/dev/vnd.c:185 spec_open(ffff8000216d8b38) at spec_open+0x3c8 sys/kern/spec_vnops.c:157 VOP_OPEN(fffffd806e481688,3,fffffd807f7d8780,ffff800021658540) at VOP_OPEN+0x6c sys/kern/vfs_vops.c:138 vn_open(ffff8000216d8dd0,3,0) at vn_open+0x467 sys/kern/vfs_vnops.c:183 vndioctl(2902,c0384600,ffff8000216d90f0,81,ffff800021658540) at vndioctl+0xa07 sys/dev/vnd.c:452 VOP_IOCTL(fffffd806e481688,c0384600,ffff8000216d90f0,81,fffffd807f7d8780,ffff800021658540) at VOP_IOCTL+0x8d sys/kern/vfs_vops.c:264 vn_ioctl(fffffd8064016078,c0384600,ffff8000216d90f0,ffff800021658540) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021658540,ffff8000216d9208,ffff8000216d9260) at sys_ioctl+0x49e syscall(ffff8000216d92d0) at syscall+0x571 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1bf21111530, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000216d8900 rbx 0x4 rdx 0x8b rcx 0x2 rax 0x2d r8 0xffffffff816b3695 kprintf+0x145 r9 0x1 r10 0x6c1f22e20d0e29a0 r11 0x5b357eee12c173e0 r12 0 r13 0xffff800021658544 r14 0 r15 0x1 rip 0xffffffff81036b58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000216d88f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=469986 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800021658fc0,0xffffffff829337f0 process=0xffff8000ffff73c0 user=0xffff8000216d4000, vmspace=0xfffffd806482a880 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 68742 234080 73320 0 2 0 syz-executor.1 *68742 469986 73320 0 7 0x4000000 syz-executor.1 73320 200710 61605 0 3 0x82 nanoslp syz-executor.1 78259 150382 61605 0 2 0x2 syz-executor.0 61605 447871 71241 0 3 0x82 thrsleep syz-fuzzer 61605 113628 71241 0 3 0x4000082 nanoslp syz-fuzzer 61605 247437 71241 0 3 0x4000082 thrsleep syz-fuzzer 61605 487838 71241 0 3 0x4000082 kqread syz-fuzzer 61605 406682 71241 0 3 0x4000082 thrsleep syz-fuzzer 61605 95438 71241 0 3 0x4000082 thrsleep syz-fuzzer 61605 444264 71241 0 3 0x4000082 thrsleep syz-fuzzer 71241 137443 98312 0 3 0x10008a sigsusp ksh 98312 262035 54761 0 3 0x9a select sshd 39672 457111 1 0 3 0x100083 ttyin getty 54761 358872 1 0 3 0x88 select sshd 6392 418023 84191 73 3 0x100090 kqread syslogd 84191 423805 1 0 3 0x100082 netio syslogd 94829 238502 1 0 3 0x100080 kqread resolvd 55595 205869 50666 77 3 0x100092 kqread dhcpleased 52379 300364 50666 77 3 0x100092 kqread dhcpleased 50666 328023 1 0 3 0x80 kqread dhcpleased 26402 161727 0 0 3 0x14200 bored smr 60953 387918 0 0 2 0x14200 zerothread 47987 411034 0 0 3 0x14200 aiodoned aiodoned 46026 371223 0 0 2 0x14600 update 98002 140457 0 0 3 0x14200 cleaner cleaner 83992 316013 0 0 3 0x14200 reaper reaper 7436 360563 0 0 3 0x14200 pgdaemon pagedaemon 85319 140099 0 0 3 0x14200 bored crynlk 58755 406692 0 0 3 0x14200 bored crypto 43542 407607 0 0 3 0x14200 bored viomb 90111 18143 0 0 3 0x40014200 acpi0 acpi0 26729 163705 0 0 3 0x14200 bored softnet 76687 143797 0 0 3 0x14200 bored systqmp 62432 338443 0 0 3 0x14200 bored systq 22842 379781 0 0 3 0x40014200 bored softclock 37409 504311 0 0 3 0x40014200 idle0 1 328779 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10105 6347K 6373K 78643K 11196 0 pcb 13 8K 8K 78643K 13 0 rtable 106 3K 3K 78643K 176 0 ifaddr 39 10K 10K 78643K 39 0 counters 21 16K 16K 78643K 21 0 ioctlops 0 0K 2K 78643K 28 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1215 76K 76K 78643K 1223 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 0K 0K 78643K 2 0 sem 9 1K 1K 78643K 16 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 423 0 proc 55 54K 63K 78643K 281 0 subproc 32 2K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 33 2K 2K 78643K 33 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 55 254K 254K 78643K 55 0 exec 0 0K 2K 78643K 387 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 245 34K 34K 78643K 6652 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 5 0K 0K 78643K 9 0 temp 60 4191K 4255K 78643K 2990 0 kqueue 10 14K 14K 78643K 10 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 25 0 22 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 29 0 16 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 666 0 666 2 2 0 2 0 8 0 tcpcb 736 8 0 4 1 0 1 1 0 8 0 arp 88 6 0 0 1 0 1 1 0 8 0 inpcb 304 33 0 26 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 kcovpl 48 2 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 0 12 0 12 12 0 8 0 art_table 32 190 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 semupl 112 6 0 6 1 0 1 1 0 8 1 semapl 112 7 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1826 0 421 88 0 88 88 0 8 0 ffsino 240 1826 0 421 84 1 83 83 0 8 0 nchpl 144 2453 0 838 60 0 60 60 0 8 0 uvmvnodes 72 1869 0 0 34 0 34 34 0 8 0 vnodes 224 1869 0 0 110 0 110 110 0 8 0 namei 1024 6185 0 6184 2 1 1 1 0 8 0 scxspl 216 7332 0 7332 9 8 1 8 0 8 1 plimitpl 152 16 0 8 1 0 1 1 0 8 0 sigapl 424 657 0 626 4 0 4 4 0 8 0 futexpl 56 6144 0 6144 1 0 1 1 0 8 1 knotepl 112 178 0 140 2 0 2 2 0 8 0 kqueuepl 184 658 0 650 1 0 1 1 0 8 0 pipepl 304 81 0 71 1 0 1 1 0 8 0 fdescpl 432 642 0 626 3 1 2 3 0 8 0 filepl 120 2241 0 2127 5 1 4 4 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 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 91 0 81 1 0 1 1 0 8 0 zombiepl 144 626 0 626 2 1 1 1 0 8 1 processpl 1008 657 0 626 6 1 5 5 0 8 1 procpl 672 1062 0 1024 4 0 4 4 0 8 0 sockpl 448 87 0 64 3 0 3 3 0 8 0 mcl64k 65536 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 247 0 247 1 0 1 1 0 8 1 mcl9k 9216 5 0 5 1 0 1 1 0 8 1 mcl8k 8192 12 0 12 3 2 1 1 0 8 1 mcl4k 4096 13 0 13 3 2 1 1 0 8 1 mcl2k 2048 385817 0 385764 39 31 8 34 0 8 0 mtagpl 96 3 0 3 1 1 0 1 0 8 0 mbufpl 256 600990 0 600826 24 11 13 20 0 8 0 bufpl 280 3956 0 151 272 0 272 272 0 8 0 anonpl 24 163201 0 132526 188 1 187 187 0 188 2 amapchunkpl 152 15109 0 14073 42 0 42 42 0 158 2 amappl16 200 1781 0 773 55 1 54 54 0 8 0 amappl15 192 72 0 66 1 0 1 1 0 8 0 amappl14 184 1 0 0 1 0 1 1 0 8 0 amappl13 176 29 0 26 1 0 1 1 0 8 0 amappl12 168 7 0 6 2 1 1 1 0 8 0 amappl11 160 68 0 53 1 0 1 1 0 8 0 amappl9 144 592 0 587 1 0 1 1 0 8 0 amappl8 136 336 0 304 2 0 2 2 0 8 0 amappl7 128 47 0 42 1 0 1 1 0 8 0 amappl6 120 444 0 436 1 0 1 1 0 8 0 amappl5 112 895 0 877 1 0 1 1 0 8 0 amappl4 104 527 0 503 1 0 1 1 0 8 0 amappl3 96 495 0 480 1 0 1 1 0 8 0 amappl2 88 350 0 311 2 1 1 2 0 8 0 amappl1 80 13794 0 13380 14 5 9 12 0 8 0 amappl 88 6102 0 5910 5 0 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 64 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 642 0 626 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 642 0 626 1 0 1 1 0 8 0 vmmpekpl 168 8364 0 8346 1 0 1 1 0 8 0 vmmpepl 168 72483 0 70200 142 5 137 142 0 357 37 vmsppl 272 641 0 626 4 2 2 2 0 8 0 rwobjpl 24 16023 0 14276 11 0 11 11 0 8 0 pdppl 4096 1290 0 1252 70 30 40 44 0 8 2 pvpl 32 421419 0 387438 282 0 282 282 0 265 7 pmappl 192 641 0 626 1 0 1 1 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 341 0 83 8 0 8 8 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8247f6c9) at panic+0x161 sys/kern/subr_prf.c:202 rw_enter(ffff8000006aa058,11) at rw_enter+0x36f sys/kern/kern_rwlock.c:174 vndopen(2902,3,2000,ffff800021658540) at vndopen+0x8d sys/dev/vnd.c:185 spec_open(ffff8000216d8b38) at spec_open+0x3c8 sys/kern/spec_vnops.c:157 VOP_OPEN(fffffd806e481688,3,fffffd807f7d8780,ffff800021658540) at VOP_OPEN+0x6c sys/kern/vfs_vops.c:138 vn_open(ffff8000216d8dd0,3,0) at vn_open+0x467 sys/kern/vfs_vnops.c:183 vndioctl(2902,c0384600,ffff8000216d90f0,81,ffff800021658540) at vndioctl+0xa07 sys/dev/vnd.c:452 VOP_IOCTL(fffffd806e481688,c0384600,ffff8000216d90f0,81,fffffd807f7d8780,ffff800021658540) at VOP_IOCTL+0x8d sys/kern/vfs_vops.c:264 vn_ioctl(fffffd8064016078,c0384600,ffff8000216d90f0,ffff800021658540) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021658540,ffff8000216d9208,ffff8000216d9260) at sys_ioctl+0x49e syscall(ffff8000216d92d0) at syscall+0x571 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1bf21111530, count: -13 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8247f6c9) at panic+0x161 sys/kern/subr_prf.c:202 rw_enter(ffff8000006aa058,11) at rw_enter+0x36f sys/kern/kern_rwlock.c:174 vndopen(2902,3,2000,ffff800021658540) at vndopen+0x8d sys/dev/vnd.c:185 spec_open(ffff8000216d8b38) at spec_open+0x3c8 sys/kern/spec_vnops.c:157 VOP_OPEN(fffffd806e481688,3,fffffd807f7d8780,ffff800021658540) at VOP_OPEN+0x6c sys/kern/vfs_vops.c:138 vn_open(ffff8000216d8dd0,3,0) at vn_open+0x467 sys/kern/vfs_vnops.c:183 vndioctl(2902,c0384600,ffff8000216d90f0,81,ffff800021658540) at vndioctl+0xa07 sys/dev/vnd.c:452 VOP_IOCTL(fffffd806e481688,c0384600,ffff8000216d90f0,81,fffffd807f7d8780,ffff800021658540) at VOP_IOCTL+0x8d sys/kern/vfs_vops.c:264 vn_ioctl(fffffd8064016078,c0384600,ffff8000216d90f0,ffff800021658540) at vn_ioctl+0xb5 sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021658540,ffff8000216d9208,ffff8000216d9260) at sys_ioctl+0x49e syscall(ffff8000216d92d0) at syscall+0x571 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1bf21111530, count: -13