panic: bad dir Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *475730 22210 0 0 0x4000000 0K syz-executor.6 284340 66989 0 0x14000 0x200 1 reaper db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828938e3) at panic+0x17b sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x169a sys/ufs/ufs/ufs_lookup.c:600 VOP_LOOKUP(fffffd806914bdc0,ffff80003594e8f8,ffff80003594e928) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80003594e8c8) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:566 namei(ffff80003594e8c8) at namei+0x56a sys/kern/vfs_lookup.c:250 vn_open(ffff80003594e8c8,70f,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a241010,ffffff9c,20000040,70e,0,ffff80003594ea80) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80003594eb20) at syscall+0x53b mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80003594eb20) at syscall+0x53b sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd9e26428950, 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{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(ffffffff828938e3) at panic+0x17b sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x169a sys/ufs/ufs/ufs_lookup.c:600 VOP_LOOKUP(fffffd806914bdc0,ffff80003594e8f8,ffff80003594e928) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80003594e8c8) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:566 namei(ffff80003594e8c8) at namei+0x56a sys/kern/vfs_lookup.c:250 vn_open(ffff80003594e8c8,70f,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a241010,ffffff9c,20000040,70e,0,ffff80003594ea80) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80003594eb20) at syscall+0x53b mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80003594eb20) at syscall+0x53b sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd9e26428950, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003594e380 rbx 0xffffffff82cc2cb7 cpu_info_full_primary+0x2cb7 rdx 0 rcx 0xffff80002a241010 rax 0xffffffff82cc1ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x8b06c6794324a835 r11 0xbfec572635490281 r12 0xffffffff82cc2ab8 cpu_info_full_primary+0x2ab8 r13 0 r14 0 r15 0x1 rip 0xffffffff826c18ec db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80003594e370 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.6) tid=475730 pid=22210 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a28aab0,0xffff80002a241818 process=0xffff800030ad0d78 user=0xffff800035949000, vmspace=0xfffffd80696671e0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 57782 143605 32930 0 2 0 syz-executor.0 57782 470248 32930 0 2 0x4000080 syz-executor.0 88555 205927 2570 0 2 0 syz-executor.2 1358 460588 33178 0 2 0x4081080 syz-executor.7 1358 278581 33178 0 3 0x4003000 suspend syz-executor.7 62643 206419 70919 0 3 0x80 nanoslp syz-executor.4 62643 175420 70919 0 3 0x4000080 fsleep syz-executor.4 62643 107936 70919 0 3 0x4000080 fsleep syz-executor.4 22210 12879 26210 0 2 0 syz-executor.6 *22210 475730 26210 0 7 0x4000000 syz-executor.6 74853 220328 2589 0 3 0x80 nanoslp syz-executor.1 74853 247074 2589 0 3 0x4000080 netio syz-executor.1 74853 174758 2589 0 3 0x4000080 fsleep syz-executor.1 74853 501976 2589 0 3 0x4000080 fsleep syz-executor.1 26210 427419 61788 0 3 0x82 nanoslp syz-executor.6 68532 372619 0 0 3 0x14200 acct acct 2570 27153 61788 0 3 0x82 nanoslp syz-executor.2 2589 236691 61788 0 3 0x82 nanoslp syz-executor.1 32930 435142 61788 0 3 0x82 nanoslp syz-executor.0 55117 408590 1 0 3 0x18100083 ttyin getty 49259 64555 61788 0 2 0x2 syz-executor.3 88137 242569 61788 0 3 0x82 nanoslp syz-executor.5 70919 433626 61788 0 3 0x82 nanoslp syz-executor.4 33178 321517 61788 0 3 0x82 nanoslp syz-executor.7 34058 300237 0 0 3 0x14200 bored sosplice 75806 462889 0 0 3 0x14280 nfsidl nfsio 39512 89805 0 0 3 0x14280 nfsidl nfsio 16367 494494 0 0 3 0x14280 nfsidl nfsio 72276 410919 0 0 3 0x14280 nfsidl nfsio 54237 483641 0 0 3 0x14280 nfsidl nfsio 52663 118745 0 0 3 0x14280 nfsidl nfsio 17152 235627 0 0 3 0x14280 nfsidl nfsio 85878 428786 0 0 3 0x14280 nfsidl nfsio 28553 354493 0 0 3 0x14280 nfsidl nfsio 13581 161647 0 0 3 0x14280 nfsidl nfsio 43041 15908 0 0 3 0x14280 nfsidl nfsio 20539 118872 0 0 3 0x14280 nfsidl nfsio 56020 49766 0 0 3 0x14280 nfsidl nfsio 62390 389838 0 0 3 0x14280 nfsidl nfsio 9148 520331 0 0 3 0x14280 nfsidl nfsio 46999 112529 0 0 3 0x14280 nfsidl nfsio 99169 279258 0 0 3 0x14280 nfsidl nfsio 62231 184094 0 0 3 0x14280 nfsidl nfsio 29588 276022 0 0 3 0x14280 nfsidl nfsio 43455 139841 0 0 3 0x14280 nfsidl nfsio 61788 201272 56317 0 3 0x1a000082 wait syz-fuzzer 61788 269940 56317 0 3 0x1e000082 thrsleep syz-fuzzer 61788 291630 56317 0 3 0x1e000082 wait syz-fuzzer 61788 53615 56317 0 3 0x1e000082 wait syz-fuzzer 61788 447993 56317 0 3 0x1e000082 wait syz-fuzzer 61788 100379 56317 0 3 0x1e000082 thrsleep syz-fuzzer 61788 61251 56317 0 3 0x1e000082 thrsleep syz-fuzzer 61788 481742 56317 0 3 0x1e000082 thrsleep syz-fuzzer 61788 184596 56317 0 3 0x1e000082 thrsleep syz-fuzzer 61788 478543 56317 0 3 0x1e000082 thrsleep syz-fuzzer 61788 194981 56317 0 3 0x1e000082 thrsleep syz-fuzzer 61788 386597 56317 0 3 0x1e000082 wait syz-fuzzer 61788 322339 56317 0 3 0x1e000082 wait syz-fuzzer 61788 262700 56317 0 3 0x1e000082 wait syz-fuzzer 61788 353855 56317 0 3 0x1e000082 kqread syz-fuzzer 61788 428256 56317 0 3 0x1e000082 wait syz-fuzzer 56317 279969 42610 0 3 0x810008a sigsusp ksh 42610 387855 70383 0 3 0x1800009a kqread sshd 70383 329963 1 0 3 0x18000088 kqread sshd 18820 460155 99914 74 3 0x19100092 bpf pflogd 99914 52095 1 0 3 0x18000080 netio pflogd 20679 199438 50471 73 3 0x19100090 kqread syslogd 50471 143786 1 0 3 0x18100082 netio syslogd 85162 421087 1 0 3 0x18100080 kqread resolvd 66036 95402 79521 77 3 0x18100092 kqread dhcpleased 21774 503117 79521 77 3 0x18100092 kqread dhcpleased 79521 384701 1 0 3 0x18000080 kqread dhcpleased 29162 129962 0 0 3 0x14200 bored smr 95577 80073 0 0 2 0x14200 zerothread 17772 66856 0 0 3 0x14200 aiodoned aiodoned 29225 8166 0 0 3 0x14200 syncer update 77935 378794 0 0 3 0x14200 cleaner cleaner 66989 284340 0 0 7 0x14200 reaper 83871 116377 0 0 3 0x14200 pgdaemon pagedaemon 49843 17788 0 0 3 0x14200 bored viomb 58567 288289 0 0 3 0x40014200 acpi0 acpi0 75476 431426 0 0 3 0x40014200 idle1 59790 136959 0 0 3 0x14200 bored softnet3 39206 214597 0 0 3 0x14200 bored softnet2 15665 295070 0 0 3 0x14200 bored softnet1 98016 188946 0 0 3 0x14200 bored softnet0 12804 238939 0 0 3 0x14200 bored systqmp 54682 394304 0 0 3 0x14200 bored systq 86099 209458 0 0 3 0x14200 tmoslp softclockmp 70687 262139 0 0 3 0x40014200 tmoslp softclock 31508 306675 0 0 3 0x40014200 idle0 1 436078 0 0 3 0x8080082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 22210 (syz-executor.6) thread 0xffff80002a241010 (475730) ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10202 6563K 10921K 166960K 40222 0 pcb 15 24K 26K 166960K 1839 0 rtable 191 6K 7K 166960K 3079 0 pf 33 9K 10K 166960K 336 0 ifaddr 39 15K 17K 166960K 321 0 ifgroup 56 2K 2K 166960K 538 0 sysctl 3 0K 0K 166960K 5 0 counters 64 36K 37K 166960K 346 0 ioctlops 0 0K 4K 166960K 2508 0 iov 0 0K 28K 166960K 1985 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1509 95K 95K 166960K 10222 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 191 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 548 0 dirhash 6 1K 2K 166960K 27 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 16 57K 81K 166960K 16691 0 sigio 0 0K 0K 166960K 743 0 proc 73 91K 116K 166960K 2210 0 subproc 104 6K 7K 166960K 682 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 1182 0 in_multi 77 5K 7K 166960K 723 0 ether_multi 1 0K 0K 166960K 25 0 mrt 1 0K 0K 166960K 10 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 115 519K 519K 166960K 115 0 exec 0 0K 1K 166960K 2409 0 pfkey data 0 0K 0K 166960K 6 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 583 675K 675K 166960K 165395 0 UVM aobj 131 6K 7K 166960K 138 0 pinsyscall 26 52K 108K 166960K 2607 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 617 0 NDP 12 0K 1K 166960K 250 0 temp 74 6812K 6944K 166960K 122657 0 kqueue 12 18K 29K 166960K 1201 0 SYN cache 2 760K 768K 166960K 3 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 1124 0 1121 12 11 1 4 0 8 0 rtentry 112 1004 0 919 6 2 4 4 0 8 0 unpcb 144 13066 0 13048 135 129 6 8 0 8 5 syncache 336 149 0 149 31 30 1 1 0 8 1 tcpqe 32 716 0 716 24 23 1 1 0 8 1 tcpcb 808 4648 0 4622 128 118 10 15 0 8 5 arp 120 238 0 225 1 0 1 1 0 8 0 inpcb 392 12529 0 12499 227 217 10 22 0 8 6 nd6 136 152 0 134 1 0 1 1 0 8 0 pkpcb 40 27 0 27 9 9 0 1 0 8 0 kcovpl 48 47 0 39 1 0 1 1 0 8 0 ppxss 1168 46 0 46 14 14 0 1 0 8 0 pffrag 232 155 0 152 1 0 1 1 0 482 0 pffrnode 88 145 0 142 1 0 1 1 0 8 0 pffrent 40 452 0 449 1 0 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 452 0 429 1 0 1 1 0 8 0 pfstkey 128 455 0 432 2 0 2 2 0 8 0 pfstate 376 455 0 432 9 5 4 6 0 8 0 pfrule 1344 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 5 0 4 3 2 1 3 0 8 0 art_heap4 256 3057 0 2694 47 19 28 31 0 8 0 art_table 32 3062 0 2698 4 0 4 4 0 8 0 art_node 16 962 0 886 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 2 1 0 1 1 0 8 0 semupl 112 9 0 9 3 3 0 1 0 8 0 semapl 112 542 0 532 1 0 1 1 0 8 0 shmpl 112 135 0 7 4 0 4 4 0 8 0 dirhash 1024 27 0 23 3 1 2 3 0 8 0 dino2pl 256 22955 0 21353 101 0 101 101 0 8 0 ffsino 272 22955 0 21353 108 0 108 108 0 8 0 nchpl 144 45234 0 43505 67 0 67 67 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 216 5926 0 0 330 0 330 330 0 8 0 namei 1024 148492 0 148491 4 3 1 2 0 8 0 percpumem 16 187 0 141 1 0 1 1 0 8 0 vcpupl 2048 275 0 2 35 0 35 35 0 8 0 vmpool 696 324 0 51 25 0 25 25 0 8 0 kstatmem 264 306 0 282 6 4 2 3 0 8 0 scxspl 216 131814 0 131814 54 50 4 8 1 8 4 plimitpl 152 2175 0 2159 1 0 1 1 0 8 0 sigapl 424 16962 0 16892 23 15 8 9 0 8 0 futexpl 64 127541 0 127536 1 0 1 1 0 8 0 knotepl 120 824 0 0 11 0 11 11 0 8 0 kqueuepl 216 3522 0 3514 72 69 3 5 0 8 2 pipepl 320 2425 0 2397 65 62 3 8 0 8 0 fdescpl 496 16918 0 16889 10 6 4 5 0 8 0 filepl 152 98283 0 98038 168 153 15 22 0 8 4 lockfpl 104 4626 0 4624 7 6 1 3 0 8 0 lockfspl 48 1717 0 1715 1 0 1 1 0 8 0 sessionpl 144 67 0 50 1 0 1 1 0 8 0 pgrppl 48 189 0 172 1 0 1 1 0 8 0 ucredpl 104 12555 0 12539 1 0 1 1 0 8 0 zombiepl 144 16894 0 16892 3 2 1 1 0 8 0 processpl 1136 16962 0 16892 6 0 6 6 0 8 0 procpl 680 46328 0 46234 10 1 9 9 0 8 0 srpgc 96 73 0 73 20 19 1 1 0 8 1 sosppl 168 198 0 195 17 16 1 1 0 8 0 sockpl 584 26762 0 26711 257 244 13 21 0 8 7 mcl64k 65536 42 0 0 4 1 3 3 0 8 0 mcl16k 16384 30 0 0 4 1 3 3 0 8 0 mcl12k 12288 26 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 33 0 0 3 0 3 3 0 8 0 mcl4k 4096 25 0 0 3 0 3 3 0 8 0 mcl2k2 2112 15 0 0 1 0 1 1 0 8 0 mcl2k 2048 547 0 0 36 10 26 36 0 8 0 mtagpl 96 676 0 0 11 1 10 11 0 8 0 mbufpl 256 1675 0 0 81 0 81 81 0 8 0 bufpl 280 32161 0 25898 448 0 448 448 0 8 0 anonpl 24 1676767 0 1661029 213 98 115 121 0 186 0 amapchunkpl 152 523062 0 522123 94 51 43 50 0 158 4 amappl16 200 35100 0 34498 168 128 40 45 0 8 6 amappl15 192 69 0 67 1 0 1 1 0 8 0 amappl14 184 293 0 276 2 1 1 2 0 8 0 amappl13 176 23 0 23 3 3 0 1 0 8 0 amappl12 168 18173 0 18140 3 1 2 2 0 8 0 amappl11 160 57 0 42 1 0 1 1 0 8 0 amappl10 152 135 0 121 1 0 1 1 0 8 0 amappl9 144 291 0 291 29 28 1 1 0 8 1 amappl8 136 841 0 681 6 0 6 6 0 8 0 amappl7 128 111 0 96 1 0 1 1 0 8 0 amappl6 120 994 0 961 4 2 2 2 0 8 0 amappl5 112 655 0 639 1 0 1 1 0 8 0 amappl4 104 1171 0 1124 3 1 2 3 0 8 0 amappl3 96 102061 0 101969 3 0 3 3 0 8 0 amappl2 88 18112 0 18026 4 2 2 4 0 8 0 amappl1 80 70527 0 69983 24 11 13 23 0 8 0 amappl 88 164033 0 163720 11 3 8 8 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 137 0 7 3 0 3 3 0 8 0 uaddrrnd 24 17242 0 16939 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 17242 0 16939 2 0 2 2 0 8 0 vmmpekpl 168 118554 0 118447 6 1 5 5 0 8 0 vmmpepl 168 1017746 0 1014780 483 326 157 167 0 357 9 vmsppl 448 17241 0 16939 35 1 34 34 0 8 0 rwobjpl 56 249651 0 241722 124 9 115 115 0 8 0 pdppl 4096 34491 0 34151 1026 686 340 340 0 8 0 pvpl 32 46369 0 0 375 1 374 375 0 265 0 pmappl 248 17241 0 16939 20 1 19 19 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1936 0 1133 23 0 23 23 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(ffffffff828938e3) at panic+0x17b sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x169a sys/ufs/ufs/ufs_lookup.c:600 VOP_LOOKUP(fffffd806914bdc0,ffff80003594e8f8,ffff80003594e928) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80003594e8c8) at vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:566 namei(ffff80003594e8c8) at namei+0x56a sys/kern/vfs_lookup.c:250 vn_open(ffff80003594e8c8,70f,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a241010,ffffff9c,20000040,70e,0,ffff80003594ea80) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80003594eb20) at syscall+0x53b mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80003594eb20) at syscall+0x53b sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd9e26428950, count: -10 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 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x30 kd_curproc sys/dev/kcov.c:590 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x30 sys/dev/kcov.c:158 __mp_lock(ffffffff82d60af0) at __mp_lock+0x133 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82d60af0) at __mp_lock+0x133 sys/kern/kern_lock.c:147 reaper(ffff80002a145558) at reaper+0x160 sys/kern/kern_exit.c:451 end trace frame: 0x0, count: 9 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 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x30 kd_curproc sys/dev/kcov.c:590 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x30 sys/dev/kcov.c:158 __mp_lock(ffffffff82d60af0) at __mp_lock+0x133 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82d60af0) at __mp_lock+0x133 sys/kern/kern_lock.c:147 reaper(ffff80002a145558) at reaper+0x160 sys/kern/kern_exit.c:451 end trace frame: 0x0, count: -6