panic: bad dir Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *136157 66818 0 0x8000002 0 0K syz-executor.4 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82892932) at panic+0x17b sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x169a sys/ufs/ufs/ufs_lookup.c:600 VOP_LOOKUP(fffffd8079ed07d0,ffff80002fae20f8,ffff80002fae2128) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002fae20c8) at vfs_lookup+0x6f8 sys/kern/vfs_lookup.c:566 namei(ffff80002fae20c8) at namei+0x56a sys/kern/vfs_lookup.c:250 dounlinkat(ffff80002a156d08,ffffff9c,738b3fa80970,8) at dounlinkat+0x9d sys/kern/vfs_syscalls.c:1855 syscall(ffff80002fae22a0) at syscall+0x854 mi_syscall sys/sys/syscall_mi.h:180 [inline] syscall(ffff80002fae22a0) at syscall+0x854 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x738b3fa80960, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: bad dir ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82892932) at panic+0x17b sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x169a sys/ufs/ufs/ufs_lookup.c:600 VOP_LOOKUP(fffffd8079ed07d0,ffff80002fae20f8,ffff80002fae2128) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002fae20c8) at vfs_lookup+0x6f8 sys/kern/vfs_lookup.c:566 namei(ffff80002fae20c8) at namei+0x56a sys/kern/vfs_lookup.c:250 dounlinkat(ffff80002a156d08,ffffff9c,738b3fa80970,8) at dounlinkat+0x9d sys/kern/vfs_syscalls.c:1855 syscall(ffff80002fae22a0) at syscall+0x854 mi_syscall sys/sys/syscall_mi.h:180 [inline] syscall(ffff80002fae22a0) at syscall+0x854 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x738b3fa80960, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002fae1d50 rbx 0xffffffff82cf5cdf cpu_info_full_primary+0x2cdf rdx 0 rcx 0xffff80002a156d08 rax 0xffffffff82cf4ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3b7b6c0fb65e7c27 r11 0x34d8c02ff550559a r12 0xffffffff82cf5ae0 cpu_info_full_primary+0x2ae0 r13 0 r14 0 r15 0x1 rip 0xffffffff81f0b7dc db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002fae1d40 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.4) tid=136157 pid=66818 tcnt=1 stat=onproc flags process=8000002 proc=0 runpri=17, usrpri=83, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a226f88,0xffff80002a1567f8 process=0xffff80003737c4a0 user=0xffff80002fadd000, vmspace=0xfffffd8068f6c000 estcpu=36, cpticks=1, pctcpu=0.2, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 95833 110573 88710 0 2 0x8000000 syz-executor.3 95833 375834 88710 0 3 0xc000080 fsleep syz-executor.3 43398 326366 82485 0 2 0x8000000 syz-executor.7 43398 408093 82485 0 3 0xc000080 fsleep syz-executor.7 73360 153969 31413 0 2 0x8000000 syz-executor.2 73360 327482 31413 0 3 0xc000080 fsleep syz-executor.2 12650 452828 36633 0 2 0x8000010 syz-executor.6 12650 235760 36633 0 3 0xc000090 piperd syz-executor.6 12650 288869 36633 0 3 0xc000090 fsleep syz-executor.6 38586 370509 74003 0 3 0x8000080 nanoslp syz-executor.1 38586 45618 74003 0 3 0xc000080 sbwait syz-executor.1 38586 194594 74003 0 3 0xc000080 sbwait syz-executor.1 38586 442643 74003 0 3 0xc000080 fsleep syz-executor.1 79179 49363 1 0 3 0x18100083 ttyin getty *66818 136157 25239 0 7 0x8000002 syz-executor.4 57846 94213 0 0 3 0x14280 nfsidl nfsio 9558 94197 0 0 3 0x14280 nfsidl nfsio 83534 306245 0 0 3 0x14280 nfsidl nfsio 96655 150181 0 0 3 0x14280 nfsidl nfsio 94483 202545 0 0 3 0x14280 nfsidl nfsio 3336 300682 0 0 3 0x14280 nfsidl nfsio 27200 163993 0 0 3 0x14280 nfsidl nfsio 47643 361689 0 0 3 0x14280 nfsidl nfsio 3431 56463 0 0 3 0x14280 nfsidl nfsio 11735 125580 0 0 3 0x14280 nfsidl nfsio 1698 123631 0 0 3 0x14280 nfsidl nfsio 56483 505750 0 0 3 0x14280 nfsidl nfsio 2746 22535 0 0 3 0x14280 nfsidl nfsio 34876 77036 0 0 3 0x14280 nfsidl nfsio 27594 504744 0 0 3 0x14280 nfsidl nfsio 7724 309258 0 0 3 0x14280 nfsidl nfsio 12911 76712 0 0 3 0x14280 nfsidl nfsio 49741 326639 0 0 3 0x14280 nfsidl nfsio 79272 337025 0 0 3 0x14280 nfsidl nfsio 26435 198319 0 0 3 0x14280 nfsidl nfsio 31413 453563 25239 0 3 0x8000082 nanoslp syz-executor.2 36633 321315 25239 0 3 0x8000082 nanoslp syz-executor.6 58607 217430 25239 0 3 0x8000082 piperd syz-executor.5 82485 106855 25239 0 3 0x8000082 nanoslp syz-executor.7 8223 387279 25239 0 3 0x8000082 piperd syz-executor.0 74003 334205 25239 0 3 0x8000082 nanoslp syz-executor.1 88710 160009 25239 0 3 0x8000082 nanoslp syz-executor.3 53059 199101 0 0 3 0x14200 bored sosplice 25239 129055 6635 0 3 0x1a000082 wait syz-fuzzer 25239 61907 6635 0 3 0x1e000082 nanoslp syz-fuzzer 25239 457015 6635 0 3 0x1e000082 wait syz-fuzzer 25239 423520 6635 0 3 0x1e000082 wait syz-fuzzer 25239 162027 6635 0 3 0x1e000082 kqread syz-fuzzer 25239 71547 6635 0 3 0x1e000082 thrsleep syz-fuzzer 25239 40740 6635 0 3 0x1e000082 thrsleep syz-fuzzer 25239 497064 6635 0 3 0x1e000082 wait syz-fuzzer 25239 365265 6635 0 3 0x1e000082 wait syz-fuzzer 25239 337811 6635 0 3 0x1e000082 thrsleep syz-fuzzer 25239 402006 6635 0 3 0x1e000082 thrsleep syz-fuzzer 25239 21540 6635 0 3 0x1e000082 wait syz-fuzzer 25239 58470 6635 0 3 0x1e000082 thrsleep syz-fuzzer 25239 137786 6635 0 3 0x1e000082 thrsleep syz-fuzzer 25239 141778 6635 0 3 0x1e000082 wait syz-fuzzer 25239 239823 6635 0 3 0x1e000082 wait syz-fuzzer 6635 220408 17039 0 3 0x810008a sigsusp ksh 17039 419232 63750 0 3 0x1800009a kqread sshd 63750 171726 1 0 3 0x18000088 kqread sshd 37294 233215 81025 74 3 0x19100092 bpf pflogd 81025 397124 1 0 3 0x18000080 sbwait pflogd 75012 243077 32752 73 3 0x19100090 kqread syslogd 32752 186532 1 0 3 0x18100082 sbwait syslogd 27397 396662 1 0 3 0x18100080 kqread resolvd 68933 4201 36864 77 3 0x18100092 kqread dhcpleased 90524 365105 36864 77 3 0x18100092 kqread dhcpleased 36864 68032 1 0 3 0x18000080 kqread dhcpleased 71715 58604 0 0 3 0x14200 bored smr 67841 375064 0 0 2 0x14200 zerothread 11170 518137 0 0 3 0x14200 aiodoned aiodoned 91815 50150 0 0 3 0x14200 syncer update 10916 203037 0 0 3 0x14200 cleaner cleaner 5944 226222 0 0 3 0x14200 reaper reaper 42861 104104 0 0 3 0x14200 pgdaemon pagedaemon 50443 264061 0 0 3 0x14200 bored viomb 24245 513008 0 0 3 0x40014200 acpi0 acpi0 65536 269743 0 0 7 0x40014200 idle1 10520 223209 0 0 3 0x14200 bored softnet3 80412 326966 0 0 3 0x14200 bored softnet2 50570 373604 0 0 3 0x14200 bored softnet1 77398 198409 0 0 3 0x14200 bored softnet0 62694 330052 0 0 3 0x14200 bored systqmp 20019 235334 0 0 3 0x14200 bored systq 9987 484018 0 0 3 0x14200 tmoslp softclockmp 17505 470223 0 0 3 0x40014200 tmoslp softclock 76988 509853 0 0 3 0x40014200 idle0 1 501293 0 0 3 0x8000082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 66818 (syz-executor.4) thread 0xffff80002a156d08 (136157) exclusive rrwlock inode r = 0 (0xfffffd807dd4ab48) #0 witness_lock+0x446 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x446 sys/kern/subr_witness.c:1187 #1 rw_enter+0x32d sys/kern/kern_rwlock.c:309 #2 rrw_enter+0x91 sys/kern/kern_rwlock.c:464 #3 VOP_LOCK+0x8b sys/kern/vfs_vops.c:518 #4 vn_lock+0x85 sys/kern/vfs_vnops.c:564 #5 vfs_lookup+0xd3 sys/kern/vfs_lookup.c:418 #6 namei+0x56a sys/kern/vfs_lookup.c:250 #7 dounlinkat+0x9d sys/kern/vfs_syscalls.c:1855 #8 syscall+0x854 mi_syscall sys/sys/syscall_mi.h:180 [inline] #8 syscall+0x854 sys/arch/amd64/amd64/trap.c:577 #9 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82d68468) #0 witness_lock+0x446 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x446 sys/kern/subr_witness.c:1187 #1 syscall+0x83b mi_syscall sys/sys/syscall_mi.h:180 [inline] #1 syscall+0x83b sys/arch/amd64/amd64/trap.c:577 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10225 6647K 7229K 166960K 16826 0 pcb 17 14K 15K 166960K 448 0 rtable 237 7K 8K 166960K 1629 0 pf 38 10K 10K 166960K 228 0 ifaddr 45 16K 16K 166960K 232 0 ifgroup 67 2K 3K 166960K 390 0 sysctl 4 1K 3K 166960K 14 0 counters 68 36K 37K 166960K 220 0 ioctlops 0 0K 4K 166960K 1674 0 iov 0 0K 20K 166960K 195 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1498 94K 95K 166960K 4297 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 145 0 VM map 2 1K 1K 166960K 2 0 sem 12 1K 1K 166960K 18 0 dirhash 12 2K 3K 166960K 69 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 15 53K 89K 166960K 3677 0 sigio 0 0K 0K 166960K 83 0 proc 70 91K 177K 166960K 1714 0 subproc 104 6K 8K 166960K 584 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 642 0 in_multi 94 6K 7K 166960K 597 0 ether_multi 1 0K 0K 166960K 22 0 mrt 2 0K 0K 166960K 7 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 163 731K 731K 166960K 163 0 exec 0 0K 1K 166960K 1256 0 pfkey data 0 0K 0K 166960K 7 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 295 92K 111K 166960K 33763 0 UVM aobj 131 4K 4K 166960K 140 0 pinsyscall 39 78K 108K 166960K 5765 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 205 0 NDP 14 0K 2K 166960K 172 0 temp 77 6820K 7316K 166960K 128720 0 kqueue 12 18K 28K 166960K 675 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 24 0 0 1 0 1 1 0 8 0 rtpcb 120 420 0 417 1 0 1 1 0 8 0 rtentry 112 536 0 430 5 1 4 4 0 8 0 unpcb 144 2760 0 2737 18 16 2 6 0 8 0 syncache 336 4 0 4 1 1 0 1 0 8 0 tcpqe 32 23 0 23 2 2 0 1 0 8 0 tcpcb 808 1074 0 1069 31 23 8 8 0 8 7 arp 120 98 0 80 1 0 1 1 0 8 0 inpcb 384 3821 0 3812 37 28 9 9 0 8 8 nd6 136 132 0 107 1 0 1 1 0 8 0 pkpcb 40 22 0 22 10 9 1 1 0 8 1 kcovpl 48 44 0 36 1 0 1 1 0 8 0 ppxss 1168 8 0 8 4 4 0 1 0 8 0 pffrag 232 35 0 32 2 1 1 1 0 482 0 pffrnode 88 35 0 32 2 1 1 1 0 8 0 pffrent 40 568 0 565 2 1 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 325 0 253 1 0 1 1 0 8 0 pfstkey 128 325 0 253 3 0 3 3 0 8 0 pfstate 376 325 0 253 9 1 8 8 0 8 0 pfrule 1344 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2009 0 1560 50 21 29 29 0 8 0 art_table 32 2010 0 1560 4 0 4 4 0 8 0 art_node 16 525 0 431 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 6 1 0 1 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 11 0 1 1 0 1 1 0 8 0 shmpl 112 137 0 9 4 0 4 4 0 8 0 dirhash 1024 55 0 38 3 0 3 3 0 8 0 dino2pl 256 7435 0 5903 97 0 97 97 0 8 0 ffsino 272 7435 0 5903 103 0 103 103 0 8 0 nchpl 144 12717 0 10984 67 0 67 67 0 8 0 uvmvnodes 80 8073 0 0 165 0 165 165 0 8 0 vnodes 216 8073 0 0 449 0 449 449 0 8 0 namei 1024 44337 0 44336 8 7 1 2 0 8 0 percpumem 16 124 0 76 1 0 1 1 0 8 0 vcpupl 3904 8 0 2 1 0 1 1 0 8 0 vmpool 696 13 0 7 1 0 1 1 0 8 0 kstatmem 264 180 0 152 4 1 3 3 0 8 0 scsiplug 72 17 0 17 9 8 1 1 0 8 1 scxspl 216 81424 0 81424 19 17 2 8 1 8 2 plimitpl 152 716 0 699 1 0 1 1 0 8 0 sigapl 424 3972 0 3905 11 3 8 9 0 8 0 futexpl 64 57568 0 57563 5 4 1 1 0 8 0 knotepl 120 808 0 0 18 0 18 18 0 8 0 kqueuepl 216 1373 0 1365 9 8 1 5 0 8 0 pipepl 320 684 0 655 4 1 3 4 0 8 0 fdescpl 496 3911 0 3883 7 2 5 5 0 8 0 filepl 152 25318 0 25062 35 21 14 18 0 8 2 lockfpl 104 1149 0 1146 2 1 1 2 0 8 0 lockfspl 48 498 0 495 1 0 1 1 0 8 0 sessionpl 144 62 0 45 1 0 1 1 0 8 0 pgrppl 48 132 0 115 1 0 1 1 0 8 0 ucredpl 104 4192 0 4176 1 0 1 1 0 8 0 zombiepl 144 3905 0 3905 1 0 1 1 0 8 1 processpl 1136 3972 0 3905 7 1 6 6 0 8 0 procpl 656 7920 0 7830 10 1 9 9 0 8 0 srpgc 96 18 0 18 8 8 0 1 0 8 0 sosppl 168 45 0 45 12 11 1 1 0 8 1 sockpl 664 7066 0 7031 42 33 9 15 0 8 5 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 6 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 430 0 0 46 3 43 46 0 8 0 mtagpl 96 48 0 0 1 0 1 1 0 8 0 mbufpl 256 1105 0 0 66 0 66 66 0 8 0 bufpl 280 14359 0 6285 577 0 577 577 0 8 0 anonpl 24 626741 0 620391 204 138 66 125 0 186 0 amapchunkpl 152 112829 0 112130 123 86 37 62 0 158 5 amappl16 200 13821 0 13689 103 83 20 32 0 8 9 amappl15 192 11 0 11 1 1 0 1 0 8 0 amappl14 184 269 0 256 2 1 1 2 0 8 0 amappl13 176 33 0 32 1 0 1 1 0 8 0 amappl12 168 5172 0 5136 7 4 3 3 0 8 0 amappl11 160 61 0 46 1 0 1 1 0 8 0 amappl10 152 92 0 81 1 0 1 1 0 8 0 amappl9 144 337 0 337 1 1 0 1 0 8 0 amappl8 136 284 0 248 2 0 2 2 0 8 0 amappl7 128 63 0 47 1 0 1 1 0 8 0 amappl6 120 837 0 820 2 1 1 2 0 8 0 amappl5 112 305 0 290 1 0 1 1 0 8 0 amappl4 104 845 0 806 3 1 2 3 0 8 0 amappl3 96 20188 0 20098 5 2 3 4 0 8 0 amappl2 88 4410 0 4333 4 2 2 4 0 8 0 amappl1 80 22778 0 22237 23 10 13 23 0 8 0 amappl 88 32723 0 32523 6 0 6 6 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 139 0 9 3 0 3 3 0 8 0 uaddrrnd 24 3924 0 3890 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3924 0 3890 1 0 1 1 0 8 0 vmmpekpl 168 30742 0 30677 4 0 4 4 0 8 0 vmmpepl 168 255320 0 253354 190 87 103 120 0 357 2 vmsppl 440 3923 0 3890 7 2 5 5 0 8 0 rwobjpl 56 71768 0 62380 141 5 136 136 0 8 3 pdppl 4096 7855 0 7786 237 163 74 83 0 8 5 pvpl 32 48653 0 0 395 2 393 393 0 265 0 pmappl 248 3923 0 3890 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 653 0 224 13 0 13 13 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82892932) at panic+0x17b sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x169a sys/ufs/ufs/ufs_lookup.c:600 VOP_LOOKUP(fffffd8079ed07d0,ffff80002fae20f8,ffff80002fae2128) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002fae20c8) at vfs_lookup+0x6f8 sys/kern/vfs_lookup.c:566 namei(ffff80002fae20c8) at namei+0x56a sys/kern/vfs_lookup.c:250 dounlinkat(ffff80002a156d08,ffffff9c,738b3fa80970,8) at dounlinkat+0x9d sys/kern/vfs_syscalls.c:1855 syscall(ffff80002fae22a0) at syscall+0x854 mi_syscall sys/sys/syscall_mi.h:180 [inline] syscall(ffff80002fae22a0) at syscall+0x854 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x738b3fa80960, count: -9 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1e: addq $0x8,%rsp x86_ipi_db(ffff800029cebff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 acpicpu_idle() at acpicpu_idle+0x2f1 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800029cebff0) at sched_idle+0x41d sys/kern/kern_sched.c:183 end trace frame: 0x0, count: 10 ddb{1}> trace x86_ipi_db(ffff800029cebff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 acpicpu_idle() at acpicpu_idle+0x2f1 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800029cebff0) at sched_idle+0x41d sys/kern/kern_sched.c:183 end trace frame: 0x0, count: -5