panic: bad dir Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *157686 73368 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ff8ef2) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800030ded778,ffff800030ded778,4819294f26b4105d) at ufs_dirbadentry VOP_LOOKUP(fffffd806ce5a388,ffff800030ded9f0,ffff800030deda20) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800030ded9c0) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff800030ded9c0) at namei+0x7aa sys/kern/vfs_lookup.c:250 domknodat(ffff80002a4c36e0,ffffff9c,20000000,2000,4cf6) at domknodat+0xb4 sys/kern/vfs_syscalls.c:1576 syscall(ffff800030dedbc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbc64ae81e10, 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+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ff8ef2) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800030ded778,ffff800030ded778,4819294f26b4105d) at ufs_dirbadentry VOP_LOOKUP(fffffd806ce5a388,ffff800030ded9f0,ffff800030deda20) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800030ded9c0) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff800030ded9c0) at namei+0x7aa sys/kern/vfs_lookup.c:250 domknodat(ffff80002a4c36e0,ffffff9c,20000000,2000,4cf6) at domknodat+0xb4 sys/kern/vfs_syscalls.c:1576 syscall(ffff800030dedbc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbc64ae81e10, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800030ded5b0 rbx 0xffff80001baa2000 rdx 0xffff800001288580 rcx 0 rax 0xffff80002a4c36e0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x5620bd08fe187c3d r11 0x22e3f98526cc85cd r12 0 r13 0xfffffd8074c47788 r14 0 r15 0x1 rip 0xffffffff82ba5725 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800030ded5a0 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=157686 pid=73368 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=17, usrpri=86, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003761cf50,0xffff80002a4c2a48 process=0xffff8000327f48a8 user=0xffff800030de8000, vmspace=0xfffffd806fb69dd0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 73368 58079 10198 0 2 0 syz-executor *73368 157686 10198 0 7 0x4000000 syz-executor 42059 342502 74169 0 2 0 syz-executor 42059 450810 74169 0 3 0x4000080 fsleep syz-executor 42059 289220 74169 0 3 0x4000080 fsleep syz-executor 51395 302615 32662 0 3 0x80 nanoslp syz-executor 51395 51360 32662 0 3 0x4000080 lockf syz-executor 51395 339773 32662 0 3 0x4000080 fsleep syz-executor 36617 432846 22534 0 3 0x80 nanoslp syz-executor 36617 237569 22534 0 3 0x4000080 kqread syz-executor 36617 3768 22534 0 3 0x4000080 fsleep syz-executor 29227 25831 0 0 3 0x14200 bored sosplice 10198 517149 12837 0 3 0x82 nanoslp syz-executor 74169 29265 12837 0 3 0x82 nanoslp syz-executor 22534 231944 12837 0 3 0x82 nanoslp syz-executor 32662 499529 12837 0 3 0x82 nanoslp syz-executor 12837 434380 32937 0 3 0x82 wait syz-executor 32937 311162 91930 0 3 0x10008a sigsusp ksh 91930 100677 71140 0 3 0x98 kqread sshd-session 71140 236397 1 0 3 0x92 kqread sshd-session 90783 355675 1 0 3 0x100083 ttyin getty 55760 146900 82164 73 3 0x1100090 kqread syslogd 82164 245578 1 0 3 0x100082 sbwait syslogd 58626 111571 1 0 3 0x100080 kqread resolvd 86897 236439 52695 77 3 0x100092 kqread dhcpleased 63954 136175 52695 77 3 0x100092 kqread dhcpleased 52695 48839 1 0 3 0x80 kqread dhcpleased 27234 277534 0 0 3 0x14200 bored smr 17964 151240 0 0 2 0x14200 zerothread 1653 347684 0 0 3 0x14200 aiodoned aiodoned 70682 247713 0 0 3 0x14200 syncer update 93281 94344 0 0 3 0x14200 cleaner cleaner 3923 162757 0 0 3 0x14200 reaper reaper 52313 91790 0 0 3 0x14200 pgdaemon pagedaemon 36820 153624 0 0 3 0x14200 bored viomb 46518 393914 0 0 3 0x40014200 acpi0 acpi0 99884 408723 0 0 3 0x14200 bored softnet3 78147 505129 0 0 3 0x14200 bored softnet2 35657 315002 0 0 3 0x14200 bored softnet1 37008 461968 0 0 3 0x14200 bored softnet0 1732 309629 0 0 3 0x14200 bored systqmp 58826 125127 0 0 3 0x14200 bored systq 3812 175685 0 0 2 0x40014200 softclock 92193 1597 0 0 3 0x40014200 idle0 1 507060 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 10169 11045K 11382K 166960K 11516 0 pcb 17 12K 12K 166960K 57 0 rtable 175 6K 8K 166960K 374 0 pf 25 12K 20K 166960K 40 0 ifaddr 30 5K 7K 166960K 46 0 ifgroup 38 1K 2K 166960K 57 0 counters 27 17K 17K 166960K 32 0 ioctlops 0 0K 4K 166960K 44 0 iov 0 0K 14K 166960K 18 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1365 86K 86K 166960K 1593 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 8 0 VM map 2 1K 1K 166960K 2 0 sem 10 0K 0K 166960K 12 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 12 41K 97K 166960K 358 0 sigio 0 0K 0K 166960K 6 0 proc 60 59K 124K 166960K 512 0 subproc 78 4K 6K 166960K 105 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 1 0K 0K 166960K 106 0 in_multi 66 4K 7K 166960K 103 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 2 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 79 360K 360K 166960K 79 0 exec 0 0K 1K 166960K 431 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 178 54K 86K 166960K 4671 0 UVM aobj 8 2K 2K 166960K 10 0 pinsyscall 31 62K 96K 166960K 1378 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 16 0 NDP 8 0K 2K 166960K 29 0 temp 39 6808K 6873K 166960K 9217 0 kqueue 13 20K 30K 166960K 61 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 48 0 45 1 0 1 1 0 8 0 rtentry 112 114 0 35 4 0 4 4 0 8 0 unpcb 144 196 0 174 2 0 2 2 0 8 1 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 808 61 0 58 1 0 1 1 0 8 0 arp 88 18 0 6 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 2 0 0 1 0 1 1 0 8 0 inpcb 336 380 0 373 10 1 9 10 0 8 8 nd6 104 26 0 10 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 0 1 1 0 8 1 kcovpl 48 8 0 2 1 0 1 1 0 8 0 ppxss 1072 1 0 1 1 0 1 1 0 8 1 pfstkey 128 2 0 2 1 0 1 1 0 8 1 pfstate 344 1 0 1 1 0 1 1 0 8 1 pfrule 1344 2 0 2 1 0 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 463 0 134 29 0 29 29 0 8 5 art_table 32 465 0 134 4 0 4 4 0 8 0 art_node 16 113 0 41 1 0 1 1 0 8 0 sysvmsgpl 40 37 0 35 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 10 0 2 1 0 1 1 0 8 0 shmpl 112 7 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2019 0 522 95 0 95 95 0 8 0 ffsino 240 2019 0 522 89 0 89 89 0 8 0 nchpl 144 2533 0 854 63 0 63 63 0 8 0 uvmvnodes 80 2219 0 0 46 0 46 46 0 8 0 vnodes 216 2219 0 0 124 0 124 124 0 8 0 namei 1024 8694 0 8693 2 0 2 2 0 8 1 kstatmem 264 26 0 10 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 7089 0 7089 3 0 3 3 1 8 3 plimitpl 152 54 0 37 1 0 1 1 0 8 0 sigapl 424 637 0 595 7 0 7 7 0 8 1 futexpl 64 3762 0 3758 1 0 1 1 0 8 0 knotepl 120 11226 0 11179 10 0 10 10 0 8 7 kqueuepl 184 82 0 73 1 0 1 1 0 8 0 pipepl 288 118 0 91 3 0 3 3 0 8 0 fdescpl 432 620 0 597 5 0 5 5 0 8 1 filepl 120 3162 0 2949 13 0 13 13 0 8 4 lockfpl 104 60 0 54 1 0 1 1 0 8 0 lockfspl 48 27 0 22 1 0 1 1 0 8 0 sessionpl 144 22 0 15 1 0 1 1 0 8 0 pgrppl 48 32 0 17 1 0 1 1 0 8 0 ucredpl 104 653 0 642 1 0 1 1 0 8 0 zombiepl 144 599 0 595 1 0 1 1 0 8 0 processpl 1096 637 0 595 4 0 4 4 0 8 0 procpl 648 977 0 928 6 0 6 6 0 8 1 sosppl 168 3 0 3 1 0 1 1 0 8 1 sockpl 504 627 0 595 17 5 12 17 0 8 7 mcl64k 65536 15 0 15 1 0 1 1 0 8 1 mcl16k 16384 14 0 14 1 0 1 1 0 8 1 mcl12k 12288 5 0 5 1 0 1 1 0 8 1 mcl9k 9216 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 14 0 14 1 0 1 1 0 8 1 mcl4k 4096 3011 0 2961 16 1 15 16 0 8 8 mcl2k 2048 333 0 329 1 0 1 1 0 8 0 mtagpl 96 80 0 78 2 0 2 2 0 8 1 mbufpl 256 8313 0 8226 13 0 13 13 0 8 1 bufpl 280 2673 0 94 185 0 185 185 0 8 0 anonpl 24 153517 0 150811 45 0 45 45 0 187 23 amapchunkpl 152 15301 0 14923 27 0 27 27 0 158 6 amappl16 200 3985 0 3964 14 4 10 14 0 8 8 amappl15 192 8 0 8 1 0 1 1 0 8 1 amappl14 184 107 0 98 1 0 1 1 0 8 0 amappl13 176 5 0 5 1 0 1 1 0 8 1 amappl12 168 1230 0 1207 2 0 2 2 0 8 0 amappl11 160 52 0 42 1 0 1 1 0 8 0 amappl10 152 14 0 14 1 0 1 1 0 8 1 amappl9 144 123 0 123 1 0 1 1 0 8 1 amappl8 136 19 0 17 1 0 1 1 0 8 0 amappl7 128 95 0 86 1 0 1 1 0 8 0 amappl6 120 157 0 156 1 0 1 1 0 8 0 amappl5 112 125 0 116 1 0 1 1 0 8 0 amappl4 104 287 0 275 1 0 1 1 0 8 0 amappl3 96 2930 0 2858 3 0 3 3 0 8 0 amappl2 88 885 0 821 2 0 2 2 0 8 0 amappl1 80 7910 0 7492 12 0 12 12 0 8 1 amappl 88 4306 0 4174 5 0 5 5 0 92 0 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 0 1 1 0 8 1 dma128 128 253 0 253 1 0 1 1 0 8 1 dma64 64 6 0 6 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 9 0 2 1 0 1 1 0 8 0 uaddrrnd 24 620 0 597 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 620 0 597 1 0 1 1 0 8 0 vmmpekpl 168 6166 0 6128 2 0 2 2 0 8 0 vmmpepl 168 45487 0 44119 87 0 87 87 0 357 13 vmsppl 352 619 0 597 4 0 4 4 0 8 1 rwobjpl 24 18624 0 15713 18 0 18 18 0 8 0 pdppl 4096 1246 0 1194 102 38 64 82 0 8 12 pvpl 32 322341 0 314179 109 0 109 109 0 265 31 pmappl 216 619 0 597 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 390 0 45 10 0 10 10 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ff8ef2) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800030ded778,ffff800030ded778,4819294f26b4105d) at ufs_dirbadentry VOP_LOOKUP(fffffd806ce5a388,ffff800030ded9f0,ffff800030deda20) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800030ded9c0) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff800030ded9c0) at namei+0x7aa sys/kern/vfs_lookup.c:250 domknodat(ffff80002a4c36e0,ffffff9c,20000000,2000,4cf6) at domknodat+0xb4 sys/kern/vfs_syscalls.c:1576 syscall(ffff800030dedbc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbc64ae81e10, count: -9 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ff8ef2) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800030ded778,ffff800030ded778,4819294f26b4105d) at ufs_dirbadentry VOP_LOOKUP(fffffd806ce5a388,ffff800030ded9f0,ffff800030deda20) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff800030ded9c0) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff800030ded9c0) at namei+0x7aa sys/kern/vfs_lookup.c:250 domknodat(ffff80002a4c36e0,ffffff9c,20000000,2000,4cf6) at domknodat+0xb4 sys/kern/vfs_syscalls.c:1576 syscall(ffff800030dedbc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbc64ae81e10, count: -9