panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *432010 1248 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834685d3) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff1807412cf00,41c0,fffff18007ffd8f0,ffff80002a87eea8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a87ef10) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff1807412a970,ffff80002a87f070,ffff80002a87f0a0,ffff80002a87efa0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a7b07e8,ffffff9c,7c5b080158b0,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a87f210) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a87f210) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c5b08015870, count: 7 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: ffs_valloc: dup alloc ddb> show kasan No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834685d3) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff1807412cf00,41c0,fffff18007ffd8f0,ffff80002a87eea8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a87ef10) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff1807412a970,ffff80002a87f070,ffff80002a87f0a0,ffff80002a87efa0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a7b07e8,ffffff9c,7c5b080158b0,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a87f210) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a87f210) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c5b08015870, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a87ec30 rbx 0x665e __ALIGN_SIZE+0x565e rdx 0 rcx 0 rax 0xffff80002a7b07e8 r8 0x101010101010101 r9 0x8080808080808080 r10 0xf6e1e57f56a04f0f r11 0x376c9f48e3e09695 r12 0 r13 0xfffff18071682500 r14 0 r15 0x1 rip 0xffffffff83053335 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a87ec20 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=432010 pid=1248 tcnt=1 stat=onproc flags process=2 proc=0 runpri=50, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a764a78,0xffff80002a7b1788 process=0xffff800045ff8d98 user=0xffff80002a87a000, vmspace=0xfffff1806c0292f8 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 26989 33579 67131 0 2 0 syz-executor * 1248 432010 25263 0 7 0x2 syz-executor 62507 250097 12651 0 3 0x80 nanoslp syz-executor 62507 457433 12651 0 3 0x4000080 fifor syz-executor 62507 394001 12651 0 3 0x4000080 fsleep syz-executor 82737 165723 25263 0 3 0x82 piperd syz-executor 91763 339299 25263 0 3 0x82 nanoslp syz-executor 85303 408817 25263 0 3 0x82 piperd syz-executor 29834 462715 25263 0 3 0x82 piperd syz-executor 67131 417636 25263 0 3 0x82 nanoslp syz-executor 12651 289741 25263 0 3 0x82 nanoslp syz-executor 25263 337809 17387 0 2 0x2 syz-executor 17387 401816 7363 0 3 0x10008a sigsusp ksh 7363 433115 71827 0 3 0x98 kqread sshd-session 71827 190308 96386 0 3 0x92 kqread sshd-session 76088 436271 1 0 3 0x100083 ttyin getty 96386 505544 1 0 3 0x88 kqread sshd 74113 101002 92665 73 3 0x1100090 kqread syslogd 92665 320172 1 0 3 0x100082 sbwait syslogd 33186 263826 1 0 3 0x100080 kqread resolvd 80168 152339 64371 77 3 0x100092 kqread dhcpleased 70045 294281 64371 77 3 0x100092 kqread dhcpleased 64371 477961 1 0 3 0x80 kqread dhcpleased 25648 76556 0 0 3 0x14200 bored smr 17727 481685 0 0 2 0x14200 zerothread 24813 375183 0 0 3 0x14200 aiodoned aiodoned 59792 472815 0 0 3 0x14200 syncer update 42492 449839 0 0 3 0x14200 cleaner cleaner 63867 314251 0 0 3 0x14200 reaper reaper 31878 225132 0 0 3 0x14200 pgdaemon pagedaemon 77077 102042 0 0 3 0x14200 bored viomb 55678 500972 0 0 3 0x40014200 acpi0 acpi0 26327 352541 0 0 3 0x14200 bored softnet0 72084 191328 0 0 3 0x14200 smrbar systqmp 38312 510199 0 0 3 0x14200 bored systq 60399 66621 0 0 3 0x40014200 tmoslp softclock 51534 63317 0 0 3 0x40014200 idle0 1 122549 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 11027 12096K 12273K 166960K 12163 0 pcb 17 12K 12K 166960K 34 0 rtable 193 5K 6K 166960K 353 0 pf 26 12K 12K 166960K 34 0 ifaddr 34 6K 7K 166960K 46 0 ifgroup 42 1K 2K 166960K 54 0 sysctl 1 1K 9K 166960K 5 0 counters 31 17K 17K 166960K 35 0 ioctlops 0 0K 4K 166960K 40 0 iov 0 0K 0K 166960K 1 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1297 82K 82K 166960K 1397 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 0 VM map 2 1K 1K 166960K 2 0 sem 5 0K 0K 166960K 5 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 12 38K 81K 166960K 183 0 proc 59 59K 75K 166960K 500 0 subproc 54 3K 4K 166960K 81 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 15 0 in_multi 77 5K 7K 166960K 101 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 4 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 370 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 169 141K 164K 166960K 3208 0 UVM aobj 6 2K 2K 166960K 6 0 pinsyscall 33 66K 89K 166960K 1285 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 2 0 NDP 9 0K 1K 166960K 29 0 temp 26 9101K 9166K 166960K 3873 0 kqueue 14 22K 28K 166960K 40 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 36 0 33 1 0 1 1 0 8 0 rtentry 136 111 0 23 4 0 4 4 0 8 0 unpcb 144 57 0 40 1 0 1 1 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 18 0 14 1 0 1 1 0 8 0 arp 96 18 0 4 1 0 1 1 0 8 0 inpcb 328 98 0 91 2 0 2 2 0 8 1 nd6 112 24 0 6 1 0 1 1 0 8 0 kcovpl 48 9 0 3 1 0 1 1 0 8 0 ppxss 1072 2 0 2 1 0 1 1 0 8 1 pfrule 1360 2 0 2 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 452 0 44 29 0 29 29 0 8 2 art_table 40 453 0 44 5 0 5 5 0 8 0 art_node 32 111 0 31 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 0 1 1 0 8 1 semapl 72 3 0 0 1 0 1 1 0 8 0 shmpl 112 3 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1635 0 171 92 0 92 92 0 8 0 ffsino 256 1635 0 171 92 0 92 92 0 8 0 nchpl 144 1914 0 223 64 0 64 64 0 8 0 vnodes 216 1748 0 0 98 0 98 98 0 8 0 namei 1024 5622 0 5621 2 0 2 2 0 8 1 kstatmem 264 27 0 8 2 0 2 2 0 8 0 scxspl 216 6413 0 6413 4 0 4 4 1 8 4 plimitpl 152 36 0 20 1 0 1 1 0 8 0 sigapl 424 476 0 438 6 0 6 6 0 8 1 knotepl 120 3892 0 3844 9 0 9 9 0 8 6 kqueuepl 184 39 0 29 1 0 1 1 0 8 0 pipepl 304 135 0 107 3 0 3 3 0 8 0 fdescpl 448 463 0 439 4 0 4 4 0 8 0 filepl 120 1713 0 1525 8 0 8 8 0 8 0 lockfpl 104 24 0 21 1 0 1 1 0 8 0 lockfspl 48 12 0 9 1 0 1 1 0 8 0 sessionpl 144 27 0 19 1 0 1 1 0 8 0 pgrppl 48 38 0 22 1 0 1 1 0 8 0 ucredpl 104 135 0 124 1 0 1 1 0 8 0 zombiepl 144 440 0 438 1 0 1 1 0 8 0 processpl 1152 476 0 438 4 0 4 4 0 8 0 procpl 664 540 0 500 5 0 5 5 0 8 0 sockpl 552 193 0 166 3 0 3 3 0 8 0 mcl64k 65536 5 0 5 1 0 1 1 0 8 1 mcl16k 16384 5 0 5 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 5 0 5 1 0 1 1 0 8 1 mcl4k 4096 2576 0 2524 15 0 15 15 0 8 8 mcl2k 2048 171 0 170 1 0 1 1 0 8 0 mextrefs 64 66 0 66 1 0 1 1 0 8 1 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 4639 0 4521 10 0 10 10 0 8 0 bufpl 272 2370 0 102 152 0 152 152 0 8 0 anonpl 24 99008 0 96300 34 0 34 34 0 187 13 amapchunkpl 152 9115 0 8805 26 0 26 26 0 158 8 amappl16 200 1816 0 1802 5 0 5 5 0 8 3 amappl15 192 35 0 35 1 0 1 1 0 8 1 amappl14 184 407 0 406 1 0 1 1 0 8 0 amappl13 176 117 0 107 1 0 1 1 0 8 0 amappl12 168 730 0 708 2 0 2 2 0 8 0 amappl11 160 5 0 5 1 0 1 1 0 8 1 amappl10 152 130 0 120 1 0 1 1 0 8 0 amappl9 144 282 0 281 1 0 1 1 0 8 0 amappl8 136 94 0 93 1 0 1 1 0 8 0 amappl7 128 138 0 127 1 0 1 1 0 8 0 amappl6 120 148 0 146 1 0 1 1 0 8 0 amappl5 112 120 0 112 1 0 1 1 0 8 0 amappl4 104 258 0 244 1 0 1 1 0 8 0 amappl3 96 1660 0 1589 3 0 3 3 0 8 0 amappl2 88 528 0 473 2 0 2 2 0 8 0 amappl1 80 10237 0 9709 13 0 13 13 0 8 1 amappl 88 2516 0 2407 5 0 5 5 0 92 1 uvmvnodes 80 97 0 0 2 0 2 2 0 8 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 463 0 439 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 463 0 439 1 0 1 1 0 8 0 vmmpekpl 168 5689 0 5649 3 0 3 3 0 8 1 vmmpepl 168 39024 0 37554 81 0 81 81 0 357 6 vmsppl 368 462 0 439 4 0 4 4 0 8 1 rwobjpl 40 14546 0 13689 10 0 10 10 0 8 0 pdppl 4096 932 0 878 88 22 66 74 0 8 12 pvpl 32 230050 0 222438 97 0 97 97 0 265 18 pmappl 216 462 0 439 2 0 2 2 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 502 0 22 14 0 14 14 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:438 panic(ffffffff834685d3) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff1807412cf00,41c0,fffff18007ffd8f0,ffff80002a87eea8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a87ef10) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff1807412a970,ffff80002a87f070,ffff80002a87f0a0,ffff80002a87efa0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a7b07e8,ffffff9c,7c5b080158b0,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a87f210) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a87f210) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c5b08015870, count: -8 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834685d3) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffff1807412cf00,41c0,fffff18007ffd8f0,ffff80002a87eea8) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80002a87ef10) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffff1807412a970,ffff80002a87f070,ffff80002a87f0a0,ffff80002a87efa0) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a7b07e8,ffffff9c,7c5b080158b0,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3063 syscall(ffff80002a87f210) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a87f210) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c5b08015870, count: -8