panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *142988 9363 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(ffff800014a20e78,ffff800014a20e78,433422d426121fa2) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda708,ffff800014a20f20,ffff800014a20ee0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda708,ffff8000ffff3c38) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff66a0,fffffd803efda708,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff3c38,ffff800014a214e8,ffff800014a215b3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff3c38,ffff800014a21620,ffff800014a21690) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a21700) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffdf5e8,af547608ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdf570, 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(ffff800014a20e78,ffff800014a20e78,433422d426121fa2) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda708,ffff800014a20f20,ffff800014a20ee0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda708,ffff8000ffff3c38) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff66a0,fffffd803efda708,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff3c38,ffff800014a214e8,ffff800014a215b3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff3c38,ffff800014a21620,ffff800014a21690) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a21700) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffdf5e8,af547608ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdf570, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a20c90 rbx 0xffff800014a20d40 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a20c50 r9 0x1 r10 0 r11 0x2ca4bf2f98701746 r12 0x3000000008 r13 0xffff800014a20ca0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a20c80 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=142988 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5c30,0xffffffff822b78f0 process=0xffff8000ffff66a0 user=0xffff800014a1c000, 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 * 9363 142988 42921 0 7 0x2 ifconfig 42921 76239 69374 0 3 0x10008a pause sh 69374 191796 87928 0 3 0x82 wait syz-executor.1 62629 243679 26339 0 2 0 syz-executor.0 62629 50851 26339 0 3 0x4000000 physio syz-executor.0 62629 457722 26339 0 3 0x4000080 fsleep syz-executor.0 62629 95098 26339 0 3 0x4000000 vmmaplk syz-executor.0 62629 265407 26339 0 3 0x4000000 vmmaplk syz-executor.0 26339 480342 87928 0 2 0x482 syz-executor.0 87928 222705 43370 0 3 0x82 kqread syz-fuzzer 87928 502442 43370 0 3 0x4000082 thrsleep syz-fuzzer 87928 49639 43370 0 3 0x4000082 thrsleep syz-fuzzer 87928 77111 43370 0 3 0x4000082 thrsleep syz-fuzzer 87928 422970 43370 0 3 0x4000082 thrsleep syz-fuzzer 87928 453553 43370 0 3 0x4000082 thrsleep syz-fuzzer 87928 10600 43370 0 3 0x4000082 thrsleep syz-fuzzer 43370 337385 93063 0 3 0x10008a pause ksh 93063 503476 75004 0 3 0x92 select sshd 13323 496323 1 0 3 0x100083 ttyin getty 75004 135599 1 0 3 0x80 select sshd 82135 214184 25603 73 2 0x100090 syslogd 25603 46769 1 0 3 0x100082 netio syslogd 42743 240872 1 77 3 0x100090 poll dhclient 62859 156540 1 0 3 0x80 poll dhclient 13182 424476 0 0 3 0x14200 pgzero zerothread 89408 509809 0 0 3 0x14200 aiodoned aiodoned 70128 77450 0 0 3 0x14200 syncer update 52777 43914 0 0 3 0x14200 cleaner cleaner 97659 74638 0 0 3 0x14200 reaper reaper 30705 3758 0 0 3 0x14200 pgdaemon pagedaemon 3891 178035 0 0 3 0x14200 bored crynlk 22416 494100 0 0 3 0x14200 bored crypto 23275 183990 0 0 3 0x40014200 acpi0 acpi0 87847 254846 0 0 3 0x14200 bored softnet 89509 498855 0 0 3 0x14200 bored systqmp 37020 104419 0 0 3 0x14200 bored systq 54719 116837 0 0 3 0x40014200 bored softclock 88663 134291 0 0 3 0x40014200 idle0 17402 245227 0 0 3 0x14200 bored smr 1 322920 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 9434 6309K 6445K 78643K 10595 0 0 pcb 24 9K 9K 78643K 79 0 0 rtable 86 3K 4K 78643K 221 0 0 ifaddr 29 9K 11K 78643K 47 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 19 0 0 iov 0 0K 8K 78643K 6 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1204 75K 75K 78643K 1242 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 1K 78643K 2 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 4 0K 0K 78643K 4 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 7 21K 25K 78643K 67 0 0 proc 43 46K 62K 78643K 290 0 0 subproc 66 67586K 69634K 78643K 102 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 2 0 0 in_multi 22 1K 2K 78643K 37 0 0 ether_multi 1 0K 0K 78643K 2 0 0 mrt 0 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 30 132K 132K 78643K 30 0 0 exec 0 0K 1K 78643K 187 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 82 20K 20K 78643K 928 0 0 UVM aobj 6 4K 4K 78643K 6 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 NDP 4 0K 0K 78643K 12 0 0 temp 76 2697K 2825K 78643K 5352 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 6 0 2 1 0 1 1 0 8 0 inpcbpl 280 44 0 37 1 0 1 1 0 8 0 plimitpl 152 15 0 8 1 0 1 1 0 8 0 rtentry 112 45 0 12 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 12 0 12 1 0 1 1 0 8 1 tcpcb 544 16 0 12 1 0 1 1 0 8 0 nd6 48 6 0 3 1 0 1 1 0 8 0 ppxss 1128 2 0 2 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 44 12 0 12 12 0 8 1 art_table 32 190 0 44 2 0 2 2 0 8 0 art_node 16 44 0 14 1 0 1 1 0 8 0 semapl 112 2 0 0 1 0 1 1 0 8 0 shmpl 112 4 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1480 0 65 46 0 46 46 0 8 0 ffsino 240 1480 0 65 84 0 84 84 0 8 0 nchpl 144 1753 0 120 61 0 61 61 0 8 0 uvmvnodes 72 1552 0 0 29 0 29 29 0 8 0 vnodes 200 1552 0 0 82 0 82 82 0 8 0 namei 1024 4257 0 4256 2 1 1 1 0 8 0 scxspl 192 10219 0 10218 8 7 1 6 0 8 0 sigapl 432 234 0 219 2 0 2 2 0 8 0 futexpl 56 582 0 581 1 0 1 1 0 8 0 knotepl 112 69 0 48 1 0 1 1 0 8 0 kqueuepl 104 6 0 4 1 0 1 1 0 8 0 pipepl 112 142 0 123 2 1 1 1 0 8 0 fdescpl 424 235 0 219 2 0 2 2 0 8 0 filepl 120 1107 0 1008 4 0 4 4 0 8 1 lockfpl 104 29 0 29 2 1 1 1 0 8 1 lockfspl 48 12 0 12 2 1 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 20 0 10 1 0 1 1 0 8 0 ucredpl 96 50 0 43 1 0 1 1 0 8 0 zombiepl 144 219 0 219 2 1 1 1 0 8 1 processpl 840 249 0 219 4 0 4 4 0 8 0 procpl 600 294 0 254 4 0 4 4 0 8 0 sockpl 384 104 0 86 3 0 3 3 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl4k 4096 9 0 9 2 1 1 1 0 8 1 mcl2k 2048 57270 0 57231 13 2 11 11 0 8 5 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 93338 0 93281 10 1 9 9 0 8 2 bufpl 256 17185 0 14074 198 0 198 198 0 8 0 anonpl 16 36957 0 24151 53 1 52 52 0 62 0 amapchunkpl 152 1083 0 962 7 0 7 7 0 158 2 amappl16 192 1025 0 223 41 0 41 41 0 8 0 amappl14 176 44 0 42 2 1 1 1 0 8 0 amappl13 168 14 0 13 1 0 1 1 0 8 0 amappl12 160 12 0 9 1 0 1 1 0 8 0 amappl11 152 42 0 28 1 0 1 1 0 8 0 amappl10 144 64 0 61 2 1 1 1 0 8 0 amappl9 136 577 0 572 1 0 1 1 0 8 0 amappl8 128 150 0 135 1 0 1 1 0 8 0 amappl7 120 31 0 26 1 0 1 1 0 8 0 amappl6 112 52 0 44 1 0 1 1 0 8 0 amappl5 104 120 0 110 1 0 1 1 0 8 0 amappl4 96 426 0 399 2 1 1 2 0 8 0 amappl3 88 128 0 121 1 0 1 1 0 8 0 amappl2 80 889 0 838 2 0 2 2 0 8 0 amappl1 72 13414 0 12960 24 11 13 19 0 8 4 amappl 72 533 0 494 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 235 0 219 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 235 0 219 1 0 1 1 0 8 0 vmmpekpl 168 5808 0 5790 1 0 1 1 0 8 0 vmmpepl 168 33299 0 31514 108 9 99 99 0 357 20 vmsppl 264 234 0 219 2 0 2 2 0 8 1 pdppl 4096 476 0 438 6 0 6 6 0 8 1 pvpl 32 128147 0 112092 135 5 130 130 0 265 0 pmappl 200 234 0 219 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 334 0 7 10 0 10 10 0 8 0