panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *495859 53476 0 0x2 0 0 ifconfig 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(ffff8000149e3f58,ffff8000149e3f58,9df68ef5a397d4a) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda000,ffff8000149e4000,ffff8000149e3fc0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda000,ffff8000ffff8968) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7a50,fffffd803efda000,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8968,ffff8000149e45c8,ffff8000149e4693) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8968,ffff8000149e4700,ffff8000149e4770) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149e47e0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffde738,10c5fe908ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffde6c0, 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(ffff8000149e3f58,ffff8000149e3f58,9df68ef5a397d4a) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda000,ffff8000149e4000,ffff8000149e3fc0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda000,ffff8000ffff8968) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7a50,fffffd803efda000,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8968,ffff8000149e45c8,ffff8000149e4693) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8968,ffff8000149e4700,ffff8000149e4770) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149e47e0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffde738,10c5fe908ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffde6c0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149e3d70 rbx 0xffff8000149e3e20 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149e3d30 r9 0x1 r10 0 r11 0x317de1cd8cfcb4ca r12 0x3000000008 r13 0xffff8000149e3d80 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149e3d60 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=495859 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8e18,0xffffffff822b78f0 process=0xffff8000ffff7a50 user=0xffff8000149df000, vmspace=0xfffffd803f014a50 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *53476 495859 36245 0 7 0x2 ifconfig 36245 468580 14362 0 3 0x10008a pause sh 14362 201678 36461 0 3 0x82 wait syz-executor.1 39034 408019 1 0 3 0x100083 ttyin getty 53383 374976 0 0 3 0x14200 bored sosplice 11049 12786 36461 0 3 0x82 piperd syz-executor.0 36461 153329 48325 0 3 0x82 thrsleep syz-fuzzer 36461 143495 48325 0 3 0x4000082 thrsleep syz-fuzzer 36461 458360 48325 0 3 0x4000082 thrsleep syz-fuzzer 36461 419392 48325 0 3 0x4000082 thrsleep syz-fuzzer 36461 179569 48325 0 3 0x4000082 thrsleep syz-fuzzer 36461 194496 48325 0 3 0x4000082 thrsleep syz-fuzzer 36461 161769 48325 0 3 0x4000082 thrsleep syz-fuzzer 36461 340412 48325 0 3 0x4000082 kqread syz-fuzzer 48325 309926 58161 0 3 0x10008a pause ksh 58161 380713 56848 0 3 0x92 select sshd 56848 124797 1 0 3 0x80 select sshd 52191 399518 7426 73 2 0x100090 syslogd 7426 58009 1 0 3 0x100082 netio syslogd 21558 326536 1 77 3 0x100090 poll dhclient 49334 443913 1 0 3 0x80 poll dhclient 38708 300361 0 0 3 0x14200 pgzero zerothread 74602 512498 0 0 3 0x14200 aiodoned aiodoned 46362 354055 0 0 3 0x14200 syncer update 28451 522354 0 0 3 0x14200 cleaner cleaner 83659 318218 0 0 3 0x14200 reaper reaper 97631 199438 0 0 3 0x14200 pgdaemon pagedaemon 32673 349966 0 0 3 0x14200 bored crynlk 61728 382128 0 0 3 0x14200 bored crypto 39109 237896 0 0 3 0x40014200 acpi0 acpi0 15091 282585 0 0 3 0x14200 bored softnet 11277 324590 0 0 3 0x14200 bored systqmp 30618 406990 0 0 3 0x14200 bored systq 40930 406259 0 0 3 0x40014200 bored softclock 27921 351901 0 0 3 0x40014200 idle0 20534 404441 0 0 3 0x14200 bored smr 1 287740 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 Kern Lim devbuf 9457 6332K 6850K 78643K 11401 0 0 pcb 23 9K 10K 78643K 237 0 0 rtable 86 3K 4K 78643K 344 0 0 ifaddr 37 10K 12K 78643K 105 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 24 0 0 iov 0 0K 16K 78643K 44 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1209 76K 76K 78643K 1564 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 10 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 49 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 357 0 0 sigio 0 0K 0K 78643K 18 0 0 proc 43 46K 62K 78643K 363 0 0 subproc 66 67586K 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 22 0 0 in_multi 22 1K 2K 78643K 64 0 0 ether_multi 1 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 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 88 21K 24K 78643K 1647 0 0 UVM aobj 19 4K 4K 78643K 21 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 18 0 0 NDP 6 0K 0K 78643K 29 0 0 temp 114 2706K 2826K 78643K 6509 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 8 0 4 1 0 1 1 0 8 0 inpcbpl 280 150 0 143 1 0 1 1 0 8 0 plimitpl 152 29 0 22 1 0 1 1 0 8 0 rtentry 112 56 0 23 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 60 0 56 1 0 1 1 0 8 0 nd6 48 9 0 6 1 0 1 1 0 8 0 ppxss 1128 10 0 10 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 235 0 91 12 0 12 12 0 8 1 art_table 32 236 0 91 2 0 2 2 0 8 0 art_node 16 55 0 25 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 1 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 45 0 35 1 0 1 1 0 8 0 shmpl 112 19 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1985 0 572 46 0 46 46 0 8 0 ffsino 240 1985 0 572 84 0 84 84 0 8 0 nchpl 144 2662 0 1043 61 0 61 61 0 8 0 uvmvnodes 72 2261 0 0 42 0 42 42 0 8 0 vnodes 200 2261 0 0 119 0 119 119 0 8 0 namei 1024 7374 0 7373 2 1 1 1 0 8 0 scxspl 192 14808 0 14808 9 6 3 6 0 8 3 sigapl 432 522 0 508 2 0 2 2 0 8 0 futexpl 56 5669 0 5669 1 0 1 1 0 8 1 knotepl 112 144 0 123 1 0 1 1 0 8 0 kqueuepl 104 74 0 72 1 0 1 1 0 8 0 pipepl 112 394 0 375 3 2 1 2 0 8 0 fdescpl 424 523 0 508 2 0 2 2 0 8 0 filepl 120 2992 0 2898 4 0 4 4 0 8 1 lockfpl 104 153 0 153 2 1 1 1 0 8 1 lockfspl 48 52 0 52 2 1 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 26 0 16 1 0 1 1 0 8 0 ucredpl 96 397 0 390 1 0 1 1 0 8 0 zombiepl 144 508 0 508 2 1 1 1 0 8 1 processpl 840 538 0 508 4 0 4 4 0 8 0 procpl 600 942 0 905 4 0 4 4 0 8 1 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 384 362 0 345 3 0 3 3 0 8 1 mcl64k 65536 241 0 241 30 17 13 29 0 8 13 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 12 0 12 1 0 1 1 0 8 1 mcl9k 9216 5 0 5 3 2 1 1 0 8 1 mcl8k 8192 5 0 5 2 1 1 1 0 8 1 mcl4k 4096 22 0 22 2 1 1 1 0 8 1 mcl2k 2048 58472 0 58430 14 7 7 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 96910 0 96844 22 13 9 20 0 8 1 bufpl 256 20683 0 17567 200 0 200 200 0 8 0 anonpl 16 69275 0 60639 61 8 53 59 0 62 8 amapchunkpl 152 2667 0 2523 17 2 15 15 0 158 9 amappl16 192 2673 0 2097 48 10 38 42 0 8 8 amappl14 176 51 0 49 2 1 1 1 0 8 0 amappl13 168 10 0 8 1 0 1 1 0 8 0 amappl12 160 157 0 155 1 0 1 1 0 8 0 amappl11 152 46 0 32 1 0 1 1 0 8 0 amappl10 144 64 0 62 2 1 1 1 0 8 0 amappl9 136 685 0 681 1 0 1 1 0 8 0 amappl8 128 299 0 284 1 0 1 1 0 8 0 amappl7 120 36 0 32 1 0 1 1 0 8 0 amappl6 112 54 0 48 1 0 1 1 0 8 0 amappl5 104 380 0 367 1 0 1 1 0 8 0 amappl4 96 593 0 564 2 1 1 2 0 8 0 amappl3 88 272 0 267 1 0 1 1 0 8 0 amappl2 80 3394 0 3350 2 0 2 2 0 8 0 amappl1 72 19164 0 18730 26 17 9 19 0 8 0 amappl 72 1210 0 1168 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 20 0 2 1 0 1 1 0 8 0 uaddrrnd 24 523 0 508 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 523 0 508 1 0 1 1 0 8 0 vmmpekpl 168 7721 0 7700 2 0 2 2 0 8 0 vmmpepl 168 62730 0 61252 108 20 88 88 0 357 17 vmsppl 264 522 0 508 2 1 1 2 0 8 0 pdppl 4096 1052 0 1016 6 1 5 6 0 8 0 pvpl 32 225847 0 214183 191 12 179 179 0 265 66 pmappl 200 522 0 508 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 382 0 43 11 0 11 11 0 8 0