panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *177145 48847 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(ffff800014a279f8,ffff800014a279f8,78eab764171d1416) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda4b0,ffff800014a27aa0,ffff800014a27a60) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda4b0,ffff8000ffff39e0) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff800014953a58,fffffd803efda4b0,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff39e0,ffff800014a28068,ffff800014a28133) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff39e0,ffff800014a281a0,ffff800014a28210) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a28280) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffbfa08,c3e6df08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbf990, 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(ffff800014a279f8,ffff800014a279f8,78eab764171d1416) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda4b0,ffff800014a27aa0,ffff800014a27a60) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda4b0,ffff8000ffff39e0) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff800014953a58,fffffd803efda4b0,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff39e0,ffff800014a28068,ffff800014a28133) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff39e0,ffff800014a281a0,ffff800014a28210) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a28280) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffbfa08,c3e6df08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbf990, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a27810 rbx 0xffff800014a278c0 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a277d0 r9 0x1 r10 0 r11 0xe01b5877641b5f9 r12 0x3000000008 r13 0xffff800014a27820 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a27800 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=177145 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4e20,0xffffffff822b78f0 process=0xffff800014953a58 user=0xffff800014a23000, vmspace=0xfffffd803f014c60 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *48847 177145 60762 0 7 0x2 ifconfig 60762 19936 25867 0 3 0x10008a pause sh 25867 270319 91362 0 3 0x82 wait syz-executor.0 31729 497087 91362 0 3 0x82 nanosleep syz-executor.1 55679 120456 1 0 3 0x100083 ttyin getty 37156 305428 0 0 3 0x14200 bored sosplice 91362 47781 68341 0 3 0x82 thrsleep syz-fuzzer 91362 30962 68341 0 3 0x4000082 thrsleep syz-fuzzer 91362 103209 68341 0 3 0x4000082 thrsleep syz-fuzzer 91362 67867 68341 0 3 0x4000082 thrsleep syz-fuzzer 91362 100 68341 0 3 0x4000082 thrsleep syz-fuzzer 91362 119777 68341 0 3 0x4000082 thrsleep syz-fuzzer 91362 100569 68341 0 3 0x4000082 thrsleep syz-fuzzer 91362 98045 68341 0 3 0x4000082 kqread syz-fuzzer 68341 263258 14629 0 3 0x10008a pause ksh 14629 413097 89215 0 3 0x92 select sshd 89215 197949 1 0 3 0x80 select sshd 49891 198509 84744 73 2 0x100090 syslogd 84744 49502 1 0 3 0x100082 netio syslogd 32489 156365 1 77 3 0x100090 poll dhclient 77756 50731 1 0 3 0x80 poll dhclient 52245 451316 0 0 3 0x14200 pgzero zerothread 71447 503737 0 0 3 0x14200 aiodoned aiodoned 85704 3968 0 0 3 0x14200 syncer update 47418 228453 0 0 3 0x14200 cleaner cleaner 15934 263351 0 0 3 0x14200 reaper reaper 77790 2589 0 0 3 0x14200 pgdaemon pagedaemon 9877 404274 0 0 3 0x14200 bored crynlk 84057 296300 0 0 3 0x14200 bored crypto 17500 518359 0 0 3 0x40014200 acpi0 acpi0 30741 209294 0 0 3 0x14200 bored softnet 2505 78644 0 0 3 0x14200 bored systqmp 64531 73723 0 0 3 0x14200 bored systq 69295 15716 0 0 3 0x40014200 bored softclock 6014 506075 0 0 3 0x40014200 idle0 16922 479801 0 0 3 0x14200 bored smr 1 247464 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 9487 6337K 6854K 78643K 13443 0 0 pcb 23 9K 11K 78643K 547 0 0 rtable 86 3K 4K 78643K 681 0 0 ifaddr 46 11K 13K 78643K 193 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 55 0 0 iov 0 0K 24K 78643K 132 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 76K 78643K 2225 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 14 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 149 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 1175 0 0 sigio 0 0K 0K 78643K 17 0 0 proc 44 46K 62K 78643K 581 0 0 subproc 66 67586K 69634K 78643K 311 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 111 0 0 in_multi 22 1K 2K 78643K 143 0 0 ether_multi 1 0K 0K 78643K 8 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 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 340 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 76 20K 29K 78643K 3619 0 0 UVM aobj 55 3K 3K 78643K 60 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 78 0 0 NDP 9 0K 0K 78643K 59 0 0 temp 149 2710K 2839K 78643K 9654 0 0 kqueue 0 0K 0K 78643K 8 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 18 0 14 1 0 1 1 0 8 0 inpcbpl 280 556 0 549 1 0 1 1 0 8 0 plimitpl 152 66 0 59 1 0 1 1 0 8 0 rtentry 112 111 0 78 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 202 0 198 1 0 1 1 0 8 0 nd6 48 24 0 21 1 0 1 1 0 8 0 ppxss 1128 21 0 21 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 458 0 311 13 0 13 13 0 8 0 art_table 32 459 0 311 2 0 2 2 0 8 0 art_node 16 110 0 80 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 8 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 147 0 137 1 0 1 1 0 8 0 shmpl 112 58 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3040 0 1617 46 0 46 46 0 8 0 ffsino 240 3040 0 1617 84 0 84 84 0 8 0 nchpl 144 4747 0 3092 63 1 62 62 0 8 0 uvmvnodes 72 3875 0 0 71 0 71 71 0 8 0 vnodes 200 3875 0 0 204 0 204 204 0 8 0 namei 1024 14401 0 14400 2 1 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 27957 0 27957 12 11 1 6 0 8 1 sigapl 432 1325 0 1311 2 0 2 2 0 8 0 futexpl 56 18236 0 18236 1 0 1 1 0 8 1 knotepl 112 402 0 381 1 0 1 1 0 8 0 kqueuepl 104 272 0 270 1 0 1 1 0 8 0 pipepl 112 804 0 785 3 1 2 2 0 8 1 fdescpl 424 1326 0 1311 2 0 2 2 0 8 0 filepl 120 7534 0 7440 5 0 5 5 0 8 2 lockfpl 104 309 0 309 2 1 1 1 0 8 1 lockfspl 48 109 0 109 2 1 1 1 0 8 1 sessionpl 112 25 0 15 1 0 1 1 0 8 0 pgrppl 48 37 0 27 1 0 1 1 0 8 0 ucredpl 96 1019 0 1012 1 0 1 1 0 8 0 zombiepl 144 1311 0 1310 2 1 1 1 0 8 0 processpl 840 1341 0 1310 4 0 4 4 0 8 0 procpl 600 2693 0 2655 4 0 4 4 0 8 0 sosppl 128 16 0 16 3 3 0 1 0 8 0 sockpl 384 1022 0 1005 4 0 4 4 0 8 2 mcl64k 65536 30 0 30 3 2 1 1 0 8 1 mcl12k 12288 18 0 18 5 4 1 1 0 8 1 mcl9k 9216 14 0 14 4 4 0 1 0 8 0 mcl8k 8192 13 0 13 4 3 1 1 0 8 1 mcl4k 4096 65 0 65 2 1 1 1 0 8 1 mcl2k2 2112 5 0 5 4 4 0 1 0 8 0 mcl2k 2048 59660 0 59617 17 10 7 11 0 8 0 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 103343 0 103277 15 7 8 9 0 8 1 bufpl 256 27416 0 24309 198 0 198 198 0 8 0 anonpl 16 128682 0 119753 80 23 57 59 0 62 10 amapchunkpl 152 6249 0 6120 20 14 6 14 0 158 0 amappl16 192 6522 0 5912 58 19 39 43 0 8 8 amappl15 184 162 0 162 2 1 1 1 0 8 1 amappl14 176 72 0 69 2 1 1 1 0 8 0 amappl13 168 101 0 100 2 1 1 1 0 8 0 amappl12 160 346 0 345 1 0 1 1 0 8 0 amappl11 152 352 0 338 1 0 1 1 0 8 0 amappl10 144 82 0 80 2 1 1 1 0 8 0 amappl9 136 628 0 624 1 0 1 1 0 8 0 amappl8 128 198 0 181 1 0 1 1 0 8 0 amappl7 120 56 0 49 1 0 1 1 0 8 0 amappl6 112 349 0 339 1 0 1 1 0 8 0 amappl5 104 547 0 535 1 0 1 1 0 8 0 amappl4 96 1615 0 1585 2 1 1 2 0 8 0 amappl3 88 163 0 157 1 0 1 1 0 8 0 amappl2 80 10251 0 10205 2 0 2 2 0 8 0 amappl1 72 34049 0 33615 23 13 10 19 0 8 0 amappl 72 3040 0 3006 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 59 0 5 1 0 1 1 0 8 0 uaddrrnd 24 1326 0 1311 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1326 0 1311 1 0 1 1 0 8 0 vmmpekpl 168 12564 0 12543 2 0 2 2 0 8 0 vmmpepl 168 142766 0 141257 147 52 95 95 0 357 22 vmsppl 264 1325 0 1311 4 3 1 2 0 8 0 pdppl 4096 2658 0 2622 6 1 5 6 0 8 0 pvpl 32 374376 0 362413 185 43 142 142 0 265 25 pmappl 200 1325 0 1311 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 351 0 27 10 0 10 10 0 8 0