panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 95625 1 0 0x2 0 0 init db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 ufs_dirbadentry(ffff8000148a8728,ffff8000148a8728,e3317f68a441581f) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda3e8,ffff8000148a8ae8,ffff8000148a8b38) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 vfs_lookup(ffff8000148a8ab8) at vfs_lookup+0x55d sys/kern/vfs_lookup.c:523 namei(ffff8000148a8ab8) at namei+0x45f sys/kern/vfs_lookup.c:224 vn_open(ffff8000148a8ab8,1,0) at vn_open+0xb8 sys/kern/vfs_vnops.c:137 doopenat(ffff8000fffffc20,ffffff9c,1dbb8f902fbb,0,0,ffff8000148a8cd0) at doopenat+0x28e sys/kern/vfs_syscalls.c:1045 syscall(ffff8000148a8d40) at syscall+0x511 Xsyscall(6,5,1dbe3520f385,5,4,1dbe0f905000) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdc9e0, count: 5 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 bad dir ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 ufs_dirbadentry(ffff8000148a8728,ffff8000148a8728,e3317f68a441581f) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda3e8,ffff8000148a8ae8,ffff8000148a8b38) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 vfs_lookup(ffff8000148a8ab8) at vfs_lookup+0x55d sys/kern/vfs_lookup.c:523 namei(ffff8000148a8ab8) at namei+0x45f sys/kern/vfs_lookup.c:224 vn_open(ffff8000148a8ab8,1,0) at vn_open+0xb8 sys/kern/vfs_vnops.c:137 doopenat(ffff8000fffffc20,ffffff9c,1dbb8f902fbb,0,0,ffff8000148a8cd0) at doopenat+0x28e sys/kern/vfs_syscalls.c:1045 syscall(ffff8000148a8d40) at syscall+0x511 Xsyscall(6,5,1dbe3520f385,5,4,1dbe0f905000) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdc9e0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000148a8540 rbx 0xffff8000148a85f0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000148a8500 r9 0x1 r10 0 r11 0xeeaf65ff93ab6cd6 r12 0x3000000008 r13 0xffff8000148a8550 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000148a8530 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (init) pid=95625 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffffffff8228c0a8,0xffff8000fffff9d8 process=0xffff8000ffffd068 user=0xffff8000148a3000, vmspace=0xfffffd803f014e70 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 6317 343110 24195 0 2 0x482 syz-executor.0 91509 220241 24195 0 2 0x2 syz-executor.1 24195 112083 25515 0 3 0x82 thrsleep syz-fuzzer 24195 508517 25515 0 3 0x4000082 thrsleep syz-fuzzer 24195 347951 25515 0 3 0x4000082 thrsleep syz-fuzzer 24195 416318 25515 0 3 0x4000082 kqread syz-fuzzer 24195 439382 25515 0 3 0x4000082 thrsleep syz-fuzzer 24195 176841 25515 0 3 0x4000082 thrsleep syz-fuzzer 24195 238710 25515 0 3 0x4000082 thrsleep syz-fuzzer 24195 144347 25515 0 3 0x4000082 thrsleep syz-fuzzer 25515 210689 88037 0 3 0x10008a pause ksh 88037 165708 42283 0 3 0x92 select sshd 42283 379564 1 0 3 0x80 select sshd 29289 387914 75562 73 2 0x100090 syslogd 75562 126164 1 0 3 0x100082 netio syslogd 43444 259794 1 77 3 0x100090 poll dhclient 58799 253467 1 0 3 0x80 poll dhclient 73184 129724 0 0 3 0x14200 pgzero zerothread 67617 252214 0 0 3 0x14200 aiodoned aiodoned 76155 310314 0 0 3 0x14200 syncer update 5591 19607 0 0 3 0x14200 cleaner cleaner 32191 375591 0 0 3 0x14200 reaper reaper 5108 40227 0 0 3 0x14200 pgdaemon pagedaemon 61227 265920 0 0 3 0x14200 bored crynlk 55111 388505 0 0 3 0x14200 bored crypto 68902 155557 0 0 3 0x40014200 acpi0 acpi0 65968 282006 0 0 3 0x14200 bored softnet 73104 122679 0 0 3 0x14200 bored systqmp 61921 243972 0 0 3 0x14200 bored systq 18544 295273 0 0 3 0x40014200 bored softclock 22335 1347 0 0 3 0x40014200 idle0 31322 410364 0 0 3 0x14200 bored smr * 1 95625 0 0 7 0x2 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 Kern Lim devbuf 9472 6385K 6698K 78643K 10905 0 0 pcb 23 9K 10K 78643K 127 0 0 rtable 108 3K 4K 78643K 309 0 0 ifaddr 45 11K 11K 78643K 69 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 21 0 0 iov 0 0K 12K 78643K 16 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 75K 78643K 1355 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 6 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 8 0K 0K 78643K 8 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 25K 78643K 187 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 35 22K 62K 78643K 382 0 0 subproc 64 65538K 69634K 78643K 136 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 10 0 0 in_multi 33 2K 2K 78643K 57 0 0 ether_multi 1 0K 0K 78643K 1 0 0 mrt 0 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 42 185K 185K 78643K 42 0 0 exec 0 0K 1K 78643K 215 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 74 20K 20K 78643K 1246 0 0 UVM aobj 4 2K 2K 78643K 4 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 5 0 0 NDP 8 0K 0K 78643K 21 0 0 temp 107 2698K 2825K 78643K 5887 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 10 0 4 1 0 1 1 0 8 0 inpcbpl 280 79 0 72 1 0 1 1 0 8 0 plimitpl 152 25 0 19 1 0 1 1 0 8 0 rtentry 112 67 0 23 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 23 0 19 1 0 1 1 0 8 0 nd6 48 12 0 6 1 0 1 1 0 8 0 ppxss 1128 2 0 2 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 277 0 88 12 0 12 12 0 8 0 art_table 32 278 0 88 2 0 2 2 0 8 0 art_node 16 66 0 26 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 4 1 0 1 1 0 8 0 semapl 112 6 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1640 0 222 46 0 46 46 0 8 0 ffsino 240 1640 0 222 84 0 84 84 0 8 0 nchpl 144 2047 0 413 61 0 61 61 0 8 0 uvmvnodes 72 1793 0 0 33 0 33 33 0 8 0 vnodes 200 1793 0 0 95 0 95 95 0 8 0 namei 1024 5318 0 5316 2 1 1 1 0 8 0 scxspl 192 12298 0 12298 7 6 1 6 0 8 1 sigapl 432 351 0 340 2 0 2 2 0 8 0 futexpl 56 2002 0 2002 1 0 1 1 0 8 1 knotepl 112 99 0 80 1 0 1 1 0 8 0 kqueuepl 104 12 0 10 1 0 1 1 0 8 0 pipepl 112 208 0 189 2 1 1 1 0 8 0 fdescpl 424 352 0 340 2 0 2 2 0 8 0 filepl 120 1703 0 1609 4 0 4 4 0 8 1 lockfpl 104 49 0 49 2 1 1 1 0 8 1 lockfspl 48 17 0 17 2 1 1 1 0 8 1 sessionpl 112 19 0 10 1 0 1 1 0 8 0 pgrppl 48 25 0 16 1 0 1 1 0 8 0 ucredpl 96 145 0 138 1 0 1 1 0 8 0 zombiepl 144 340 0 339 2 1 1 1 0 8 0 processpl 840 366 0 339 4 0 4 4 0 8 0 procpl 600 541 0 507 4 0 4 4 0 8 1 sockpl 384 177 0 160 3 0 3 3 0 8 1 mcl64k 65536 5 0 5 1 0 1 1 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 1 0 1 1 1 0 1 0 8 0 mcl4k 4096 15 0 15 2 1 1 1 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 58021 0 57981 14 8 6 10 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 94943 0 94831 13 5 8 11 0 8 0 bufpl 256 17884 0 14777 198 0 198 198 0 8 0 anonpl 16 44617 0 35572 56 2 54 54 0 62 12 amapchunkpl 152 1805 0 1715 7 2 5 6 0 158 0 amappl16 192 1419 0 879 40 0 40 40 0 8 12 amappl15 184 101 0 101 1 0 1 1 0 8 1 amappl14 176 48 0 47 2 1 1 1 0 8 0 amappl13 168 16 0 15 2 1 1 1 0 8 0 amappl12 160 11 0 10 1 0 1 1 0 8 0 amappl11 152 103 0 88 1 0 1 1 0 8 0 amappl10 144 70 0 67 2 1 1 1 0 8 0 amappl9 136 554 0 551 1 0 1 1 0 8 0 amappl8 128 149 0 137 1 0 1 1 0 8 0 amappl7 120 41 0 36 1 0 1 1 0 8 0 amappl6 112 110 0 102 1 0 1 1 0 8 0 amappl5 104 204 0 194 1 0 1 1 0 8 0 amappl4 96 553 0 526 2 1 1 2 0 8 0 amappl3 88 116 0 111 1 0 1 1 0 8 0 amappl2 80 1864 0 1823 2 0 2 2 0 8 0 amappl1 72 16305 0 15938 24 14 10 19 0 8 0 amappl 72 802 0 770 1 0 1 1 0 75 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 352 0 340 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 352 0 340 1 0 1 1 0 8 0 vmmpekpl 168 6537 0 6521 1 0 1 1 0 8 0 vmmpepl 168 46643 0 45329 101 17 84 84 0 357 19 vmsppl 264 351 0 340 2 1 1 2 0 8 0 pdppl 4096 710 0 680 6 1 5 6 0 8 0 pvpl 32 166314 0 154571 150 9 141 141 0 265 32 pmappl 200 351 0 340 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 341 0 19 10 0 10 10 0 8 0