panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *439797 43732 0 0 0x4000000 0 syz-executor.0 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(ffff8000149f8478,ffff8000149f8478,9f0cf53235c461a1) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda4b0,ffff8000149f8678,ffff8000149f86c8) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 vfs_lookup(ffff8000149f8648) at vfs_lookup+0x55d sys/kern/vfs_lookup.c:523 namei(ffff8000149f8648) at namei+0x45f sys/kern/vfs_lookup.c:224 dounlinkat(ffff8000ffff8710,ffffff9c,20000380,8) at dounlinkat+0x99 sys/kern/vfs_syscalls.c:1673 syscall(ffff8000149f8850) at syscall+0x511 Xsyscall(6,0,ffffffffffffffc4,0,1,8f2ebc10010) at Xsyscall+0x128 end of kernel end trace frame: 0x2e2, 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 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(ffff8000149f8478,ffff8000149f8478,9f0cf53235c461a1) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda4b0,ffff8000149f8678,ffff8000149f86c8) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 vfs_lookup(ffff8000149f8648) at vfs_lookup+0x55d sys/kern/vfs_lookup.c:523 namei(ffff8000149f8648) at namei+0x45f sys/kern/vfs_lookup.c:224 dounlinkat(ffff8000ffff8710,ffffff9c,20000380,8) at dounlinkat+0x99 sys/kern/vfs_syscalls.c:1673 syscall(ffff8000149f8850) at syscall+0x511 Xsyscall(6,0,ffffffffffffffc4,0,1,8f2ebc10010) at Xsyscall+0x128 end of kernel end trace frame: 0x2e2, count: -9 ddb> show registers rdi 0xffffffff81a73677 db_enter+0x17 rsi 0x1f7a __ALIGN_SIZE+0xf7a rbp 0xffff8000149f8290 rbx 0xffff8000149f8340 rdx 0x1f7b __ALIGN_SIZE+0xf7b rcx 0xffff800000993000 rax 0xffff800000993000 r8 0xffff8000149f8250 r9 0x1 r10 0xffff800003f96540 r11 0xded002004f849713 r12 0x3000000008 r13 0xffff8000149f82a0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149f8280 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=439797 stat=onproc flags process=0 proc=4000000 pri=17, usrpri=79, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8260,0xffffffff822b78f0 process=0xffff8000ffff73c0 user=0xffff8000149f3000, vmspace=0xfffffd803f014b58 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 43732 242899 7020 0 2 0 syz-executor.0 *43732 439797 7020 0 7 0x4000000 syz-executor.0 2347 28834 0 0 3 0x14200 bored sosplice 7020 151102 19864 0 3 0x82 nanosleep syz-executor.0 32979 160771 19864 0 2 0x2 syz-executor.1 19864 63559 58180 0 3 0x82 thrsleep syz-fuzzer 19864 492333 58180 0 3 0x4000082 nanosleep syz-fuzzer 19864 35255 58180 0 3 0x4000082 thrsleep syz-fuzzer 19864 422335 58180 0 3 0x4000082 thrsleep syz-fuzzer 19864 244051 58180 0 3 0x4000082 thrsleep syz-fuzzer 19864 257910 58180 0 3 0x4000082 kqread syz-fuzzer 19864 371483 58180 0 3 0x4000082 thrsleep syz-fuzzer 58180 206169 10313 0 3 0x10008a pause ksh 10313 461452 76566 0 3 0x92 select sshd 99181 178290 1 0 3 0x100083 ttyin getty 76566 308205 1 0 3 0x80 select sshd 40971 70436 26989 73 2 0x100090 syslogd 26989 383483 1 0 3 0x100082 netio syslogd 83104 128413 1 77 3 0x100090 poll dhclient 13255 365222 1 0 3 0x80 poll dhclient 43006 460770 0 0 2 0x14200 zerothread 70600 374072 0 0 3 0x14200 aiodoned aiodoned 77731 92614 0 0 3 0x14200 syncer update 1254 223814 0 0 3 0x14200 cleaner cleaner 48882 143701 0 0 3 0x14200 reaper reaper 23895 499029 0 0 3 0x14200 pgdaemon pagedaemon 20875 26704 0 0 3 0x14200 bored crynlk 21809 269911 0 0 3 0x14200 bored crypto 16911 472301 0 0 3 0x40014200 acpi0 acpi0 88896 292597 0 0 3 0x14200 bored softnet 50145 125305 0 0 3 0x14200 bored systqmp 27540 269449 0 0 3 0x14200 bored systq 81951 293271 0 0 3 0x40014200 bored softclock 21081 296267 0 0 3 0x40014200 idle0 65380 55002 0 0 3 0x14200 bored smr 1 132372 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 9462 6318K 6832K 78643K 11440 0 0 pcb 23 9K 11K 78643K 214 0 0 rtable 108 3K 4K 78643K 273 0 0 ifaddr 42 11K 11K 78643K 68 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 24 0 0 iov 0 0K 16K 78643K 38 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 75K 78643K 1517 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 7 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 34 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 25K 78643K 345 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 41 30K 62K 78643K 346 0 0 subproc 64 65538K 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 34 0 0 in_multi 33 2K 2K 78643K 65 0 0 ether_multi 1 0K 0K 78643K 3 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 212 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 81 20K 21K 78643K 1599 0 0 UVM aobj 28 2K 2K 78643K 28 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 4 0 0 NDP 7 0K 0K 78643K 19 0 0 temp 113 2704K 2830K 78643K 6300 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 2 1 0 1 1 0 8 0 inpcbpl 280 166 0 159 1 0 1 1 0 8 0 plimitpl 152 27 0 20 1 0 1 1 0 8 0 rtentry 112 56 0 12 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 5 0 5 1 1 0 1 0 8 0 tcpcb 544 54 0 50 1 0 1 1 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 ppxss 1128 4 0 4 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 232 0 44 12 0 12 12 0 8 0 art_table 32 233 0 44 2 0 2 2 0 8 0 art_node 16 55 0 15 1 0 1 1 0 8 0 semapl 112 30 0 20 1 0 1 1 0 8 0 shmpl 112 26 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1915 0 501 46 0 46 46 0 8 0 ffsino 240 1915 0 501 84 0 84 84 0 8 0 nchpl 144 2566 0 934 61 0 61 61 0 8 0 uvmvnodes 72 2161 0 0 40 0 40 40 0 8 0 vnodes 200 2161 0 0 114 0 114 114 0 8 0 namei 1024 7061 0 7059 2 1 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 15276 0 15276 10 9 1 6 0 8 1 sigapl 432 512 0 499 2 0 2 2 0 8 0 futexpl 56 5211 0 5211 1 0 1 1 0 8 1 knotepl 112 111 0 92 1 0 1 1 0 8 0 kqueuepl 104 82 0 80 1 0 1 1 0 8 0 pipepl 112 362 0 343 4 2 2 2 0 8 1 fdescpl 424 513 0 499 2 0 2 2 0 8 0 filepl 120 3001 0 2904 6 1 5 5 0 8 2 lockfpl 104 129 0 129 2 1 1 1 0 8 1 lockfspl 48 44 0 44 2 1 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 34 0 24 1 0 1 1 0 8 0 ucredpl 96 569 0 562 1 0 1 1 0 8 0 zombiepl 144 499 0 499 2 1 1 1 0 8 1 processpl 840 528 0 499 4 0 4 4 0 8 0 procpl 600 937 0 901 4 0 4 4 0 8 1 sosppl 128 5 0 5 1 0 1 1 0 8 1 sockpl 384 343 0 326 4 1 3 4 0 8 1 mcl64k 65536 4 0 4 2 1 1 1 0 8 1 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 7 0 7 2 1 1 1 0 8 1 mcl9k 9216 4 0 4 2 1 1 1 0 8 1 mcl8k 8192 3 0 3 1 0 1 1 0 8 1 mcl4k 4096 20 0 20 2 1 1 1 0 8 1 mcl2k2 2112 2 0 2 2 1 1 1 0 8 1 mcl2k 2048 56876 0 56833 14 7 7 11 0 8 1 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 93803 0 93722 13 4 9 12 0 8 0 bufpl 256 20083 0 16976 198 0 198 198 0 8 0 anonpl 16 56998 0 46422 61 2 59 59 0 62 16 amapchunkpl 152 2167 0 2067 7 2 5 6 0 158 0 amappl16 192 2396 0 1812 42 4 38 42 0 8 8 amappl14 176 196 0 192 2 1 1 1 0 8 0 amappl13 168 15 0 15 2 2 0 1 0 8 0 amappl12 160 6 0 5 1 0 1 1 0 8 0 amappl11 152 45 0 31 1 0 1 1 0 8 0 amappl10 144 63 0 62 2 1 1 1 0 8 0 amappl9 136 587 0 584 1 0 1 1 0 8 0 amappl8 128 150 0 135 1 0 1 1 0 8 0 amappl7 120 35 0 30 1 0 1 1 0 8 0 amappl6 112 56 0 48 1 0 1 1 0 8 0 amappl5 104 139 0 128 1 0 1 1 0 8 0 amappl4 96 556 0 531 2 1 1 2 0 8 0 amappl3 88 450 0 442 1 0 1 1 0 8 0 amappl2 80 3354 0 3303 3 1 2 2 0 8 0 amappl1 72 18566 0 18156 24 15 9 19 0 8 0 amappl 72 1175 0 1141 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 27 0 0 1 0 1 1 0 8 0 uaddrrnd 24 513 0 499 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 513 0 499 1 0 1 1 0 8 0 vmmpekpl 168 7876 0 7858 2 0 2 2 0 8 0 vmmpepl 168 59924 0 58431 103 27 76 84 0 357 8 vmsppl 264 512 0 499 2 1 1 2 0 8 0 pdppl 4096 1032 0 998 6 1 5 6 0 8 0 pvpl 32 189194 0 175625 156 9 147 147 0 265 37 pmappl 200 512 0 499 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 342 0 18 10 0 10 10 0 8 0