panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *500301 25786 0 0 0 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff825a2ff5) at panic+0x161 sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x1749 ufs_dirbad sys/ufs/ufs/ufs_lookup.c:609 [inline] ufs_lookup() at ufs_lookup+0x1749 sys/ufs/ufs/ufs_lookup.c:444 VOP_LOOKUP(fffffd806825b970,ffff800021875470,ffff8000218754a0) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021875440) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:560 namei(ffff800021875440) at namei+0x36a sys/kern/vfs_lookup.c:244 domknodat(ffff800021789a48,ffffff9c,20000000,80002005,2d94) at domknodat+0x92 sys/kern/vfs_syscalls.c:1580 syscall(ffff800021875640) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff3600, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: bad dir ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff825a2ff5) at panic+0x161 sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x1749 ufs_dirbad sys/ufs/ufs/ufs_lookup.c:609 [inline] ufs_lookup() at ufs_lookup+0x1749 sys/ufs/ufs/ufs_lookup.c:444 VOP_LOOKUP(fffffd806825b970,ffff800021875470,ffff8000218754a0) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021875440) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:560 namei(ffff800021875440) at namei+0x36a sys/kern/vfs_lookup.c:244 domknodat(ffff800021789a48,ffffff9c,20000000,80002005,2d94) at domknodat+0x92 sys/kern/vfs_syscalls.c:1580 syscall(ffff800021875640) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff3600, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800021875030 rbx 0 rdx 0x3fd rcx 0 rax 0xf r8 0x101010101010101 r9 0x8080808080808080 r10 0x5216294108b2b486 r11 0x83383589633c5ea3 r12 0 r13 0xfffffd8069c3ca50 r14 0 r15 0x1 rip 0xffffffff81eab2d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021875020 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=500301 stat=onproc flags process=0 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800021789268,0xffff8000217057c0 process=0xffff80002179cfc8 user=0xffff800021870000, vmspace=0xfffffd806c643cd0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 48295 437789 54761 0 2 0 syz-executor.1 94988 103109 34232 0 2 0x100000 sh *25786 500301 13997 0 7 0 syz-executor.0 72044 424317 90148 0 2 0 syz-executor.2 34232 347500 44759 0 3 0x10008a sigsusp sh 76595 120178 91644 0 2 0 syz-executor.5 87252 331945 5370 0 3 0x80 dklk syz-executor.7 27298 341504 94200 0 3 0x80 dklk syz-executor.4 44759 143501 31098 0 3 0x82 wait syz-executor.6 5370 325122 31098 0 2 0x482 syz-executor.7 91644 465941 31098 0 2 0x482 syz-executor.5 94200 232367 31098 0 2 0x482 syz-executor.4 40805 306563 31098 0 2 0x2 syz-executor.3 90148 394457 31098 0 3 0x82 nanoslp syz-executor.2 54761 282866 31098 0 2 0x2 syz-executor.1 13997 337897 31098 0 3 0x82 nanoslp syz-executor.0 31098 160100 26373 0 3 0x82 thrsleep syz-execprog 31098 49191 26373 0 3 0x4000082 nanoslp syz-execprog 31098 198235 26373 0 3 0x4000082 wait syz-execprog 31098 438963 26373 0 3 0x4000082 wait syz-execprog 31098 263768 26373 0 3 0x4000082 thrsleep syz-execprog 31098 506339 26373 0 3 0x4000082 wait syz-execprog 31098 324095 26373 0 3 0x4000082 wait syz-execprog 31098 182237 26373 0 3 0x4000082 wait syz-execprog 31098 329991 26373 0 3 0x4000082 thrsleep syz-execprog 31098 226734 26373 0 3 0x4000082 wait syz-execprog 31098 368521 26373 0 3 0x4000082 wait syz-execprog 31098 16732 26373 0 3 0x4000082 wait syz-execprog 31098 142887 26373 0 3 0x4000082 kqread syz-execprog 26373 472903 41773 0 3 0x10008a sigsusp ksh 41773 409251 75932 0 3 0x9a kqread sshd 15139 87819 1 0 3 0x100083 ttyin getty 75932 396478 1 0 3 0x88 kqread sshd 44179 112278 62412 73 3 0x1100090 kqread syslogd 62412 361728 1 0 3 0x100082 netio syslogd 56840 196698 1 0 3 0x100080 kqread resolvd 48 264114 69875 77 3 0x100092 kqread dhcpleased 36384 215297 69875 77 3 0x100092 kqread dhcpleased 69875 56476 1 0 3 0x80 kqread dhcpleased 32431 147128 0 0 3 0x14200 bored smr 71558 278872 0 0 2 0x14200 zerothread 89119 447312 0 0 3 0x14200 aiodoned aiodoned 95167 309454 0 0 3 0x14200 syncer update 45637 411505 0 0 3 0x14200 cleaner cleaner 66004 423111 0 0 3 0x14200 reaper reaper 99025 478654 0 0 3 0x14200 pgdaemon pagedaemon 41739 106994 0 0 3 0x14200 bored viomb 10293 14983 0 0 3 0x40014200 acpi0 acpi0 21113 95844 0 0 3 0x14200 bored softnet 35047 297849 0 0 3 0x14200 bored softnet 2512 267373 0 0 3 0x14200 bored softnet 26939 191328 0 0 3 0x14200 bored softnet 2327 98830 0 0 3 0x14200 bored systqmp 18800 90536 0 0 3 0x14200 bored systq 32169 305055 0 0 3 0x40014200 bored softclock 35004 196671 0 0 3 0x40014200 idle0 1 511152 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 10168 6401K 6413K 78643K 11258 0 pcb 13 8K 8K 78643K 13 0 rtable 212 6K 6K 78643K 321 0 ifaddr 79 16K 16K 78643K 81 0 counters 27 17K 17K 78643K 27 0 ioctlops 0 0K 2K 78643K 41 0 iov 0 0K 12K 78643K 7 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1167 73K 73K 78643K 1184 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 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 18 65K 77K 78643K 131 0 proc 55 58K 83K 78643K 429 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 88 5K 5K 78643K 88 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 2K 78643K 612 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 148 72K 72K 78643K 1951 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 25 2K 2K 78643K 25 0 temp 53 4718K 4782K 78643K 3311 0 kqueue 12 18K 18K 78643K 25 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 35 0 32 1 0 1 1 0 8 0 rtentry 112 100 0 1 3 0 3 3 0 8 0 unpcb 144 33 0 20 1 0 1 1 0 8 0 syncache 296 5 0 5 2 1 1 1 0 8 1 tcpcb 768 8 0 5 1 0 1 1 0 8 0 arp 88 16 0 0 1 0 1 1 0 8 0 inpcb 336 54 0 48 1 0 1 1 0 8 0 nd6 48 21 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 408 0 0 26 0 26 26 0 8 0 art_table 32 409 0 0 4 0 4 4 0 8 0 art_node 16 99 0 9 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1492 0 61 90 0 90 90 0 8 0 ffsino 240 1492 0 61 85 0 85 85 0 8 0 nchpl 144 1749 0 76 63 0 63 63 0 8 0 uvmvnodes 80 1502 0 0 31 0 31 31 0 8 0 vnodes 216 1502 0 0 84 0 84 84 0 8 0 namei 1024 5737 0 5734 3 1 2 2 0 8 1 kstatmem 264 22 0 0 2 0 2 2 0 8 0 scxspl 216 5425 0 5425 10 9 1 8 0 8 1 plimitpl 152 24 0 9 1 0 1 1 0 8 0 sigapl 424 425 0 380 6 0 6 6 0 8 1 knotepl 120 5610 0 5530 4 1 3 3 0 8 0 kqueuepl 184 21 0 13 1 0 1 1 0 8 0 pipepl 288 131 0 103 4 1 3 3 0 8 1 fdescpl 432 409 0 380 4 0 4 4 0 8 0 filepl 120 1498 0 1362 5 0 5 5 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 25 0 9 1 0 1 1 0 8 0 pgrppl 48 25 0 9 1 0 1 1 0 8 0 ucredpl 104 65 0 54 1 0 1 1 0 8 0 zombiepl 144 380 0 380 2 1 1 1 0 8 1 processpl 1000 425 0 380 8 1 7 7 0 8 1 procpl 672 437 0 380 5 0 5 5 0 8 0 sockpl 456 122 0 100 4 0 4 4 0 8 1 mcl8k 8192 9 0 9 2 1 1 1 0 8 1 mcl4k 4096 5 0 5 2 1 1 1 0 8 1 mcl2k 2048 5386 0 5334 8 1 7 7 0 8 0 mtagpl 96 4 0 4 1 1 0 1 0 8 0 mbufpl 256 10290 0 10092 14 1 13 13 0 8 0 bufpl 288 3529 0 126 244 0 244 244 0 8 0 anonpl 24 50828 0 46758 43 3 40 40 0 188 14 amapchunkpl 152 4165 0 3846 16 1 15 15 0 158 1 amappl16 200 302 0 213 5 0 5 5 0 8 0 amappl15 192 9 0 7 1 0 1 1 0 8 0 amappl14 184 25 0 21 1 0 1 1 0 8 0 amappl13 176 78 0 74 1 0 1 1 0 8 0 amappl12 168 29 0 19 2 1 1 1 0 8 0 amappl11 160 92 0 74 1 0 1 1 0 8 0 amappl10 152 21 0 18 2 1 1 1 0 8 0 amappl9 144 500 0 487 2 1 1 1 0 8 0 amappl8 136 500 0 477 2 1 1 1 0 8 0 amappl7 128 111 0 100 1 0 1 1 0 8 0 amappl6 120 177 0 166 2 0 2 2 0 8 1 amappl5 112 87 0 76 1 0 1 1 0 8 0 amappl4 104 837 0 803 2 0 2 2 0 8 1 amappl3 96 562 0 519 2 0 2 2 0 8 0 amappl2 88 450 0 390 3 1 2 2 0 8 0 amappl1 80 12131 0 11474 24 3 21 21 0 8 7 amappl 88 1536 0 1440 3 0 3 3 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 409 0 380 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 409 0 380 1 0 1 1 0 8 0 vmmpekpl 168 9031 0 9008 2 0 2 2 0 8 0 vmmpepl 168 39489 0 37662 98 2 96 96 0 357 16 vmsppl 272 408 0 380 4 1 3 3 0 8 1 rwobjpl 24 12715 0 10234 18 0 18 18 0 8 1 pdppl 4096 824 0 760 96 26 70 70 0 8 6 pvpl 32 224887 0 216647 265 7 258 258 0 265 191 pmappl 216 408 0 380 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 586 0 35 16 0 16 16 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:437 panic(ffffffff825a2ff5) at panic+0x161 sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x1749 ufs_dirbad sys/ufs/ufs/ufs_lookup.c:609 [inline] ufs_lookup() at ufs_lookup+0x1749 sys/ufs/ufs/ufs_lookup.c:444 VOP_LOOKUP(fffffd806825b970,ffff800021875470,ffff8000218754a0) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021875440) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:560 namei(ffff800021875440) at namei+0x36a sys/kern/vfs_lookup.c:244 domknodat(ffff800021789a48,ffffff9c,20000000,80002005,2d94) at domknodat+0x92 sys/kern/vfs_syscalls.c:1580 syscall(ffff800021875640) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff3600, count: -9 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff825a2ff5) at panic+0x161 sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x1749 ufs_dirbad sys/ufs/ufs/ufs_lookup.c:609 [inline] ufs_lookup() at ufs_lookup+0x1749 sys/ufs/ufs/ufs_lookup.c:444 VOP_LOOKUP(fffffd806825b970,ffff800021875470,ffff8000218754a0) at VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85 vfs_lookup(ffff800021875440) at vfs_lookup+0x6cc sys/kern/vfs_lookup.c:560 namei(ffff800021875440) at namei+0x36a sys/kern/vfs_lookup.c:244 domknodat(ffff800021789a48,ffffff9c,20000000,80002005,2d94) at domknodat+0x92 sys/kern/vfs_syscalls.c:1580 syscall(ffff800021875640) at syscall+0x447 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff3600, count: -9 ddb>