panic: bad dir Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 58801 41656 0 0x8000000 0x4000000 0 syz-executor.6 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8286c7fd) at panic+0x165 sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x169a sys/ufs/ufs/ufs_lookup.c:600 VOP_LOOKUP(fffffd805beaa968,ffff800035cc1578,ffff800035cc15a8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800035cc1548) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff800035cc1548) at namei+0x56a sys/kern/vfs_lookup.c:250 dofchownat(ffff80002a68aa78,ffffff9c,20000040,0,a2b8,0) at dofchownat+0xb3 sys/kern/vfs_syscalls.c:2440 syscall(ffff800035cc17f0) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6158e3e6200, 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+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8286c7fd) at panic+0x165 sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x169a sys/ufs/ufs/ufs_lookup.c:600 VOP_LOOKUP(fffffd805beaa968,ffff800035cc1578,ffff800035cc15a8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800035cc1548) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff800035cc1548) at namei+0x56a sys/kern/vfs_lookup.c:250 dofchownat(ffff80002a68aa78,ffffff9c,20000040,0,a2b8,0) at dofchownat+0xb3 sys/kern/vfs_syscalls.c:2440 syscall(ffff800035cc17f0) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6158e3e6200, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800035cc11e0 rbx 0 rdx 0xffff800000df8600 rcx 0 rax 0xffff80002a68aa78 r8 0x101010101010101 r9 0x8080808080808080 r10 0x20c9755851a40ad1 r11 0xab3df6d85f007860 r12 0 r13 0xfffffd806b06c968 r14 0 r15 0x1 rip 0xffffffff8151906c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff800035cc11d0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.6) tid=58801 pid=41656 tcnt=2 stat=onproc flags process=8000000 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a68af98,0xffff80002a62ccf0 process=0xffff800035c9aa00 user=0xffff800035cbc000, vmspace=0xfffffd8063298980 estcpu=36, cpticks=20, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 40011 39571 12359 0 2 0x8000000 syz-executor.2 40011 400419 12359 0 3 0xc000080 fsleep syz-executor.2 53675 226566 0 0 3 0x14200 acct acct 86189 376806 99229 0 2 0x8000000 syz-executor.3 86189 76165 99229 0 3 0xc000080 fsleep syz-executor.3 3949 308182 61923 0 2 0x8000000 syz-executor.0 3949 49775 61923 0 3 0xc000080 fsleep syz-executor.0 60058 61427 77764 0 2 0x8000000 syz-executor.4 60058 462082 77764 0 3 0xc000080 fsleep syz-executor.4 41656 394871 35959 0 2 0x8000000 syz-executor.6 *41656 58801 35959 0 7 0xc000000 syz-executor.6 74001 276267 11140 0 2 0x8000000 syz-executor.5 74001 418962 11140 0 3 0xc000080 rest syz-executor.5 74001 474365 11140 0 3 0xc000080 bell syz-executor.5 20035 97501 92664 0 2 0x8000000 syz-executor.7 20035 199505 92664 0 3 0xc000080 fsleep syz-executor.7 20035 24367 92664 0 3 0xc000080 fsleep syz-executor.7 11140 108351 39683 0 3 0x8000082 nanoslp syz-executor.5 12359 259082 39683 0 2 0x8000482 syz-executor.2 91292 356258 39683 0 2 0x8000002 syz-executor.1 77764 57504 39683 0 3 0x8000082 nanoslp syz-executor.4 99229 89591 39683 0 3 0x8000082 nanoslp syz-executor.3 8868 261210 0 0 3 0x14280 nfsidl nfsio 89599 234261 0 0 3 0x14280 nfsidl nfsio 76722 493948 0 0 3 0x14280 nfsidl nfsio 6420 397792 0 0 3 0x14280 nfsidl nfsio 47839 140491 0 0 3 0x14280 nfsidl nfsio 45702 414273 0 0 3 0x14280 nfsidl nfsio 89777 279181 0 0 3 0x14280 nfsidl nfsio 95725 449066 0 0 3 0x14280 nfsidl nfsio 78744 160437 0 0 3 0x14280 nfsidl nfsio 71707 375681 0 0 3 0x14280 nfsidl nfsio 19573 216072 0 0 3 0x14280 nfsidl nfsio 52386 259517 0 0 3 0x14280 nfsidl nfsio 4839 343306 0 0 3 0x14280 nfsidl nfsio 27868 452548 0 0 3 0x14280 nfsidl nfsio 48468 14141 0 0 3 0x14280 nfsidl nfsio 53654 111633 0 0 3 0x14280 nfsidl nfsio 60840 406672 0 0 3 0x14280 nfsidl nfsio 30049 523065 0 0 3 0x14280 nfsidl nfsio 34021 264974 0 0 3 0x14280 nfsidl nfsio 60744 362792 0 0 3 0x14280 nfsidl nfsio 69769 434266 1 0 3 0x18100083 ttyin getty 92664 386509 39683 0 3 0x8000082 nanoslp syz-executor.7 61923 84729 39683 0 3 0x8000082 nanoslp syz-executor.0 79182 503608 0 0 3 0x14200 bored sosplice 35959 238666 39683 0 3 0x8000082 nanoslp syz-executor.6 39683 464004 12907 0 3 0x1a000082 thrsleep syz-fuzzer 39683 238509 12907 0 3 0x1e000082 nanoslp syz-fuzzer 39683 516745 12907 0 3 0x1e000082 thrsleep syz-fuzzer 39683 58325 12907 0 3 0x1e000082 wait syz-fuzzer 39683 407794 12907 0 3 0x1e000082 wait syz-fuzzer 39683 32811 12907 0 3 0x1e000082 wait syz-fuzzer 39683 49430 12907 0 3 0x1e000082 wait syz-fuzzer 39683 434792 12907 0 3 0x1e000082 kqread syz-fuzzer 39683 51481 12907 0 3 0x1e000082 wait syz-fuzzer 39683 37077 12907 0 3 0x1e000082 thrsleep syz-fuzzer 39683 141019 12907 0 3 0x1e000082 wait syz-fuzzer 39683 140718 12907 0 3 0x1e000082 wait syz-fuzzer 39683 156366 12907 0 3 0x1e000082 wait syz-fuzzer 39683 313758 12907 0 3 0x1e000082 thrsleep syz-fuzzer 39683 365135 12907 0 3 0x1e000082 thrsleep syz-fuzzer 12907 434410 4176 0 3 0x810008a sigsusp ksh 4176 392355 19676 0 3 0x1800009a kqread sshd 19676 208627 1 0 3 0x18000088 kqread sshd 69359 501451 7700 73 3 0x19100090 kqread syslogd 7700 293119 1 0 3 0x18100082 sbwait syslogd 5677 255125 1 0 3 0x18100080 kqread resolvd 11995 86482 90663 77 3 0x18100092 kqread dhcpleased 23966 38633 90663 77 3 0x18100092 kqread dhcpleased 90663 426198 1 0 3 0x18000080 kqread dhcpleased 80467 443902 0 0 3 0x14200 bored smr 24377 346644 0 0 2 0x14200 zerothread 9430 185844 0 0 3 0x14200 aiodoned aiodoned 40665 414278 0 0 3 0x14200 syncer update 26878 166483 0 0 3 0x14200 cleaner cleaner 27519 496141 0 0 3 0x14200 reaper reaper 87529 99158 0 0 3 0x14200 pgdaemon pagedaemon 16886 19084 0 0 3 0x14200 bored viomb 25869 223691 0 0 3 0x40014200 acpi0 acpi0 242 291874 0 0 3 0x14200 bored softnet3 51156 87806 0 0 3 0x14200 bored softnet2 59211 192849 0 0 3 0x14200 bored softnet1 53300 290522 0 0 3 0x14200 bored softnet0 77383 216949 0 0 3 0x14200 bored systqmp 15545 108602 0 0 3 0x14200 bored systq 90633 242619 0 0 3 0x40014200 tmoslp softclock 72840 191281 0 0 3 0x40014200 idle0 1 117677 0 0 3 0x8080082 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 10205 6548K 10893K 166960K 18899 0 pcb 16 13K 15K 166960K 532 0 rtable 159 9K 12K 166960K 1633 0 pf 31 9K 9K 166960K 225 0 ifaddr 32 9K 12K 166960K 227 0 ifgroup 54 2K 2K 166960K 366 0 sysctl 4 1K 1K 166960K 7 0 counters 31 17K 17K 166960K 116 0 ioctlops 0 0K 2K 166960K 203 0 iov 0 0K 16K 166960K 240 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1552 98K 98K 166960K 4728 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 92 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 297 0 dirhash 12 2K 2K 166960K 48 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 17 61K 69K 166960K 4323 0 sigio 0 0K 0K 166960K 215 0 proc 60 59K 75K 166960K 1487 0 subproc 104 6K 6K 166960K 490 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 811 0 in_multi 55 4K 7K 166960K 510 0 ether_multi 1 0K 0K 166960K 12 0 mrt 0 0K 0K 166960K 9 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 223 996K 996K 166960K 223 0 exec 0 0K 1K 166960K 1110 0 pfkey data 0 0K 0K 166960K 2 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 393 313K 338K 166960K 39331 0 UVM aobj 126 4K 4K 166960K 145 0 pinsyscall 37 74K 100K 166960K 6239 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 0K 166960K 229 0 NDP 12 0K 1K 166960K 172 0 temp 74 6804K 7439K 166960K 89804 0 kqueue 12 18K 26K 166960K 473 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 364 0 361 1 0 1 1 0 8 0 rtentry 112 507 0 441 4 0 4 4 0 8 2 unpcb 144 3443 0 3427 6 0 6 6 0 8 5 syncache 336 49 0 49 1 0 1 1 0 8 1 tcpqe 32 160 0 160 1 0 1 1 0 8 1 tcpcb 808 1198 0 1187 6 0 6 6 0 8 3 arp 88 95 0 85 1 0 1 1 0 8 0 ipq 40 1 0 1 1 0 1 1 0 8 1 ipqe 40 1 0 1 1 0 1 1 0 8 1 inpcb 360 4478 0 4457 9 0 9 9 0 8 7 nd6 104 115 0 103 1 0 1 1 0 8 0 pkpcb 40 52 0 52 1 0 1 1 0 8 1 kcovpl 48 37 0 29 1 0 1 1 0 8 0 ppxss 1072 27 0 27 1 0 1 1 0 8 1 art_heap8 4096 2 0 1 2 0 2 2 0 8 1 art_heap4 256 1831 0 1550 30 11 19 30 0 8 1 art_table 32 1833 0 1551 4 0 4 4 0 8 1 art_node 16 490 0 430 1 0 1 1 0 8 0 sysvmsgpl 40 56 0 42 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 288 0 278 1 0 1 1 0 8 0 shmpl 112 142 0 19 4 0 4 4 0 8 0 dirhash 1024 41 0 24 3 0 3 3 0 8 0 dino2pl 256 7915 0 6375 97 0 97 97 0 8 0 ffsino 240 7915 0 6375 92 0 92 92 0 8 0 nchpl 144 13852 0 12120 66 0 66 66 0 8 0 uvmvnodes 80 6388 0 0 131 0 131 131 0 8 0 vnodes 216 6388 0 0 355 0 355 355 0 8 0 namei 1024 48031 0 48029 3 0 3 3 0 8 2 vcpupl 2048 24 0 1 3 0 3 3 0 8 0 vmpool 664 42 0 19 2 0 2 2 0 8 0 kstatmem 264 194 0 170 2 0 2 2 0 8 0 scxspl 216 50989 0 50989 8 0 8 8 1 8 8 plimitpl 152 757 0 742 1 0 1 1 0 8 0 sigapl 424 4630 0 4564 8 0 8 8 0 8 0 futexpl 64 59536 0 59530 1 0 1 1 0 8 0 knotepl 120 40593 0 40511 17 5 12 17 0 8 8 kqueuepl 184 1092 0 1084 4 0 4 4 0 8 3 pipepl 288 644 0 616 7 0 7 7 0 8 4 fdescpl 432 4550 0 4522 4 0 4 4 0 8 0 filepl 120 28036 0 27783 14 0 14 14 0 8 4 lockfpl 104 1428 0 1426 2 0 2 2 0 8 1 lockfspl 48 544 0 542 1 0 1 1 0 8 0 sessionpl 144 56 0 40 1 0 1 1 0 8 0 pgrppl 48 99 0 83 1 0 1 1 0 8 0 ucredpl 104 4784 0 4767 1 0 1 1 0 8 0 zombiepl 144 4564 0 4564 1 0 1 1 0 8 1 processpl 1072 4630 0 4564 5 0 5 5 0 8 0 procpl 656 9636 0 9547 9 0 9 9 0 8 1 sosppl 168 83 0 83 1 0 1 1 0 8 1 sockpl 488 8366 0 8326 48 35 13 22 0 8 7 mcl64k 65536 108 0 108 1 0 1 1 0 8 1 mcl16k 16384 79 0 79 1 0 1 1 0 8 1 mcl12k 12288 162 0 162 1 0 1 1 0 8 1 mcl9k 9216 27 0 27 1 0 1 1 0 8 1 mcl8k 8192 339 0 339 1 0 1 1 0 8 1 mcl4k 4096 698 0 698 2 0 2 2 0 8 2 mcl2k2 2112 36 0 36 1 0 1 1 0 8 1 mcl2k 2048 47959 0 47913 31 17 14 30 0 8 7 mtagpl 96 580 0 462 5 0 5 5 0 8 2 mbufpl 256 146342 0 146101 139 115 24 60 0 8 7 bufpl 280 14659 0 8270 457 0 457 457 0 8 0 anonpl 24 590922 0 584600 67 0 67 67 0 188 16 amapchunkpl 152 127630 0 126937 46 0 46 46 0 158 15 amappl16 200 12537 0 12417 43 26 17 19 0 8 8 amappl15 192 9 0 9 1 0 1 1 0 8 1 amappl14 184 240 0 228 2 0 2 2 0 8 1 amappl13 176 38 0 38 1 0 1 1 0 8 1 amappl12 168 5624 0 5593 2 0 2 2 0 8 0 amappl11 160 57 0 47 1 0 1 1 0 8 0 amappl10 152 104 0 93 1 0 1 1 0 8 0 amappl9 144 164 0 163 1 0 1 1 0 8 0 amappl8 136 387 0 295 4 0 4 4 0 8 0 amappl7 128 60 0 46 1 0 1 1 0 8 0 amappl6 120 806 0 787 2 0 2 2 0 8 0 amappl5 112 332 0 320 1 0 1 1 0 8 0 amappl4 104 825 0 792 2 0 2 2 0 8 1 amappl3 96 24788 0 24701 3 0 3 3 0 8 0 amappl2 88 5303 0 5226 4 0 4 4 0 8 2 amappl1 80 26591 0 26091 22 2 20 22 0 8 8 amappl 88 38276 0 38050 6 0 6 6 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 144 0 19 3 0 3 3 0 8 0 uaddrrnd 24 4592 0 4541 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4592 0 4541 1 0 1 1 0 8 0 vmmpekpl 168 33228 0 33165 4 0 4 4 0 8 0 vmmpepl 168 290089 0 288091 113 0 113 113 0 357 18 vmsppl 344 4591 0 4541 5 0 5 5 0 8 0 rwobjpl 24 78359 0 70691 47 0 47 47 0 8 0 pdppl 4096 9190 0 9105 305 218 87 89 0 8 2 pvpl 32 1643547 0 1630688 389 43 346 389 0 265 221 pmappl 216 4591 0 4541 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 727 0 361 12 0 12 12 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8286c7fd) at panic+0x165 sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x169a sys/ufs/ufs/ufs_lookup.c:600 VOP_LOOKUP(fffffd805beaa968,ffff800035cc1578,ffff800035cc15a8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800035cc1548) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff800035cc1548) at namei+0x56a sys/kern/vfs_lookup.c:250 dofchownat(ffff80002a68aa78,ffffff9c,20000040,0,a2b8,0) at dofchownat+0xb3 sys/kern/vfs_syscalls.c:2440 syscall(ffff800035cc17f0) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6158e3e6200, count: -9 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8286c7fd) at panic+0x165 sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x169a sys/ufs/ufs/ufs_lookup.c:600 VOP_LOOKUP(fffffd805beaa968,ffff800035cc1578,ffff800035cc15a8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800035cc1548) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff800035cc1548) at namei+0x56a sys/kern/vfs_lookup.c:250 dofchownat(ffff80002a68aa78,ffffff9c,20000040,0,a2b8,0) at dofchownat+0xb3 sys/kern/vfs_syscalls.c:2440 syscall(ffff800035cc17f0) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6158e3e6200, count: -9