panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *523427 4516 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b3a1b) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd8075f752e0,41c0,fffffd807f7d7680,ffff80002a4e3508) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a4e3570) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806ef26460,ffff80002a4e36d0,ffff80002a4e3700,ffff80002a4e3600) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a4b0298,ffffff9c,7d3d55e0db00,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3101 syscall(ffff80002a4e3880) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7d3d55e0dac0, 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> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b3a1b) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd8075f752e0,41c0,fffffd807f7d7680,ffff80002a4e3508) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a4e3570) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806ef26460,ffff80002a4e36d0,ffff80002a4e3700,ffff80002a4e3600) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a4b0298,ffffff9c,7d3d55e0db00,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3101 syscall(ffff80002a4e3880) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7d3d55e0dac0, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a4e32a0 rbx 0xfffffd80763f5300 rdx 0 rcx 0 rax 0xffff80002a4b0298 r8 0x101010101010101 r9 0x8080808080808080 r10 0xfa581b463090db17 r11 0xc64f10fefe020160 r12 0 r13 0xfffffd807c4b2d30 r14 0 r15 0x1 rip 0xffffffff8201afa5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a4e3290 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=523427 pid=4516 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=0xffff80002a4a8528,0xffffffff83574290 process=0xffff80002a465128 user=0xffff80002a4de000, vmspace=0xfffffd807679ad78 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND * 4516 523427 31818 0 7 0x2 syz-executor 65598 43268 1 0 3 0x82 nanoslp getty 98064 19060 31818 0 2 0x2 syz-executor 93353 5503 31818 0 3 0x82 piperd syz-executor 2329 95450 31818 0 2 0x2 syz-executor 84474 177702 31818 0 2 0x2 syz-executor 2894 316277 31818 0 3 0x82 piperd syz-executor 61580 217283 31818 0 3 0x82 piperd syz-executor 5515 991 0 0 3 0x14200 bored sosplice 31818 161675 8498 0 2 0x2 syz-executor 8498 165207 59902 0 3 0x10008a sigsusp ksh 59902 32625 25669 0 3 0x98 kqread sshd-session 25669 368368 12236 0 3 0x92 kqread sshd-session 12236 281812 1 0 3 0x88 kqread sshd 9120 419667 67307 73 3 0x1100090 kqread syslogd 67307 437559 1 0 3 0x100082 sbwait syslogd 36328 497323 1 0 3 0x100080 kqread resolvd 15875 231462 83838 77 3 0x100092 kqread dhcpleased 25884 414551 83838 77 3 0x100092 kqread dhcpleased 83838 523484 1 0 3 0x80 kqread dhcpleased 84342 521425 0 0 3 0x14200 bored smr 55442 197076 0 0 2 0x14200 zerothread 42262 363664 0 0 3 0x14200 aiodoned aiodoned 77781 306437 0 0 3 0x14200 syncer update 27656 56522 0 0 3 0x14200 cleaner cleaner 18749 22276 0 0 3 0x14200 reaper reaper 15181 288578 0 0 3 0x14200 pgdaemon pagedaemon 40537 487843 0 0 3 0x14200 bored viomb 79319 112805 0 0 3 0x40014200 acpi0 acpi0 67857 351887 0 0 3 0x14200 bored softnet3 81638 404114 0 0 3 0x14200 bored softnet2 30235 19738 0 0 3 0x14200 bored softnet1 48775 247958 0 0 3 0x14200 bored softnet0 80202 328167 0 0 3 0x14200 bored systqmp 32575 474562 0 0 3 0x14200 bored systq 40441 129507 0 0 3 0x40014200 tmoslp softclock 92083 131065 0 0 3 0x40014200 idle0 1 172127 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 10175 10023K 10381K 166960K 13096 0 pcb 17 16K 18K 166960K 285 0 rtable 201 9K 10K 166960K 2380 0 pf 31 13K 17K 166960K 263 0 ifaddr 39 7K 8K 166960K 296 0 ifgroup 46 2K 2K 166960K 339 0 sysctl 3 1K 1K 166960K 7 0 counters 29 17K 17K 166960K 101 0 ioctlops 0 0K 4K 166960K 257 0 iov 0 0K 24K 166960K 203 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1518 95K 96K 166960K 3134 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 29 0 VM map 2 1K 1K 166960K 2 0 sem 23 10K 10K 166960K 47 0 dirhash 12 2K 2K 166960K 33 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 10 30K 93K 166960K 1959 0 sigio 0 0K 0K 166960K 37 0 proc 58 59K 100K 166960K 2143 0 subproc 91 5K 6K 166960K 832 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 277 0 in_multi 92 6K 7K 166960K 749 0 ether_multi 1 0K 0K 166960K 10 0 mrt 1 0K 0K 166960K 8 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 91 413K 413K 166960K 91 0 exec 0 0K 1K 166960K 1261 0 pfkey data 0 0K 0K 166960K 5 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 154 62K 94K 166960K 15932 0 UVM aobj 103 3K 4K 166960K 113 0 pinsyscall 31 62K 95K 166960K 4439 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 53 0 NDP 12 0K 2K 166960K 213 0 temp 70 6815K 6892K 166960K 67316 0 kqueue 13 20K 32K 166960K 166 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 357 0 354 3 0 3 3 0 8 2 rtentry 112 836 0 748 4 0 4 4 0 8 1 unpcb 144 1598 0 1583 8 0 8 8 0 8 7 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 808 445 0 441 8 0 8 8 0 8 7 arp 88 144 0 128 1 0 1 1 0 8 0 ipq 40 7 0 6 1 0 1 1 0 8 0 ipqe 40 93 0 92 1 0 1 1 0 8 0 inpcb 336 1901 0 1894 10 1 9 10 0 8 8 nd6 104 201 0 180 1 0 1 1 0 8 0 pkpcb 40 9 0 9 1 0 1 1 0 8 1 kcovpl 48 64 0 57 1 0 1 1 0 8 0 ppxss 1072 5 0 5 1 0 1 1 0 8 1 pfstscr 40 1 0 1 1 0 1 1 0 8 1 pfrktable 1344 3 0 1 1 0 1 1 0 8 0 pfanchor 1288 1 0 0 1 0 1 1 0 8 0 pfstkey 128 2 0 2 1 0 1 1 0 8 1 pfstate 344 1 0 1 1 0 1 1 0 8 1 pfrule 1344 16 0 15 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 3124 0 2707 30 1 29 30 0 8 0 art_table 32 3126 0 2707 4 0 4 4 0 8 0 art_node 16 769 0 690 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 5 1 0 1 1 0 8 1 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 41 0 20 1 0 1 1 0 8 0 shmpl 112 110 0 10 3 0 3 3 0 8 0 dirhash 1024 31 0 14 3 0 3 3 0 8 0 dino2pl 256 3518 0 1922 100 0 100 100 0 8 0 ffsino 240 3518 0 1922 94 0 94 94 0 8 0 nchpl 144 5168 0 3429 65 0 65 65 0 8 0 uvmvnodes 80 5043 0 0 103 0 103 103 0 8 0 vnodes 216 5043 0 0 281 0 281 281 0 8 0 namei 1024 23215 0 23214 2 0 2 2 0 8 1 pfiaddrpl 120 1 0 0 1 0 1 1 0 8 0 kstatmem 264 164 0 144 2 0 2 2 0 8 0 scsiplug 72 2 0 2 1 0 1 1 0 8 1 scxspl 216 32536 0 32536 8 0 8 8 1 8 8 plimitpl 152 508 0 492 1 0 1 1 0 8 0 sigapl 424 2127 0 2087 6 0 6 6 0 8 0 futexpl 64 16186 0 16186 1 0 1 1 0 8 1 knotepl 120 40407 0 40360 18 8 10 18 0 8 7 kqueuepl 184 337 0 328 2 0 2 2 0 8 1 pipepl 288 470 0 443 7 0 7 7 0 8 4 fdescpl 432 2110 0 2088 5 0 5 5 0 8 1 filepl 120 12291 0 12074 18 3 15 17 0 8 7 lockfpl 104 506 0 504 1 0 1 1 0 8 0 lockfspl 48 176 0 174 1 0 1 1 0 8 0 sessionpl 144 78 0 71 1 0 1 1 0 8 0 pgrppl 48 160 0 145 1 0 1 1 0 8 0 ucredpl 104 1780 0 1768 1 0 1 1 0 8 0 zombiepl 144 2089 0 2087 1 0 1 1 0 8 0 processpl 1096 2127 0 2087 4 0 4 4 0 8 0 procpl 648 3601 0 3561 6 0 6 6 0 8 1 sosppl 168 9 0 9 1 0 1 1 0 8 1 sockpl 504 3945 0 3920 58 46 12 33 0 8 8 mcl64k 65536 20 0 20 1 0 1 1 0 8 1 mcl16k 16384 4 0 4 1 0 1 1 0 8 1 mcl12k 12288 3 0 3 1 0 1 1 0 8 1 mcl9k 9216 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 26 0 26 1 0 1 1 0 8 1 mcl4k 4096 11 0 11 1 0 1 1 0 8 1 mcl2k2 2112 3 0 3 1 0 1 1 0 8 1 mcl2k 2048 8734 0 8632 30 9 21 30 0 8 7 mtagpl 96 24 0 23 1 0 1 1 0 8 0 mbufpl 256 23445 0 23269 28 7 21 26 0 8 8 bufpl 280 9028 0 2310 480 0 480 480 0 8 0 anonpl 24 353906 0 351160 80 0 80 80 0 187 44 amapchunkpl 152 53735 0 53469 41 0 41 41 0 158 23 amappl16 200 6917 0 6911 38 24 14 15 0 8 12 amappl15 192 6 0 6 1 0 1 1 0 8 1 amappl14 184 224 0 214 1 0 1 1 0 8 0 amappl13 176 12 0 12 1 0 1 1 0 8 1 amappl12 168 3613 0 3592 2 0 2 2 0 8 0 amappl11 160 53 0 42 1 0 1 1 0 8 0 amappl10 152 11 0 11 1 0 1 1 0 8 1 amappl9 144 135 0 135 1 0 1 1 0 8 1 amappl8 136 40 0 39 1 0 1 1 0 8 0 amappl7 128 220 0 209 1 0 1 1 0 8 0 amappl6 120 719 0 717 1 0 1 1 0 8 0 amappl5 112 366 0 357 1 0 1 1 0 8 0 amappl4 104 463 0 444 1 0 1 1 0 8 0 amappl3 96 8983 0 8928 3 0 3 3 0 8 0 amappl2 88 2441 0 2374 2 0 2 2 0 8 0 amappl1 80 16432 0 15917 13 0 13 13 0 8 0 amappl 88 15100 0 14999 5 0 5 5 0 92 1 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma512 512 1 0 1 1 0 1 1 0 8 1 dma256 256 7 0 7 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 112 0 10 2 0 2 2 0 8 0 uaddrrnd 24 2110 0 2088 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2110 0 2088 1 0 1 1 0 8 0 vmmpekpl 168 17850 0 17801 3 0 3 3 0 8 0 vmmpepl 168 134057 0 132700 91 0 91 91 0 357 15 vmsppl 344 2109 0 2088 4 0 4 4 0 8 1 rwobjpl 24 44017 0 38100 38 0 38 38 0 8 0 pdppl 4096 4226 0 4176 188 120 68 80 0 8 18 pvpl 32 1143994 0 1136599 347 0 347 347 0 265 247 pmappl 216 2109 0 2088 3 0 3 3 0 8 1 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 569 0 184 12 0 12 12 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:437 panic(ffffffff830b3a1b) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd8075f752e0,41c0,fffffd807f7d7680,ffff80002a4e3508) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a4e3570) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806ef26460,ffff80002a4e36d0,ffff80002a4e3700,ffff80002a4e3600) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a4b0298,ffffff9c,7d3d55e0db00,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3101 syscall(ffff80002a4e3880) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7d3d55e0dac0, count: -8 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830b3a1b) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd8075f752e0,41c0,fffffd807f7d7680,ffff80002a4e3508) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_mkdir(ffff80002a4e3570) at ufs_mkdir+0x113 sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd806ef26460,ffff80002a4e36d0,ffff80002a4e3700,ffff80002a4e3600) at VOP_MKDIR+0x102 sys/kern/vfs_vops.c:394 domkdirat(ffff80002a4b0298,ffffff9c,7d3d55e0db00,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3101 syscall(ffff80002a4e3880) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7d3d55e0dac0, count: -8