panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *312621 89731 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833fca69) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd8077502e00,41c0,fffffd8007ffd750,ffff80003c94b788) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c94b7f0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd8077500970,ffff80003c94b950,ffff80003c94b980,ffff80003c94b880) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff800039cf5a10,ffffff9c,7dbba935d050,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3143 syscall(ffff80003c94baf0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c94baf0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7dbba935d010, 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:438 panic(ffffffff833fca69) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd8077502e00,41c0,fffffd8007ffd750,ffff80003c94b788) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c94b7f0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd8077500970,ffff80003c94b950,ffff80003c94b980,ffff80003c94b880) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff800039cf5a10,ffffff9c,7dbba935d050,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3143 syscall(ffff80003c94baf0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c94baf0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7dbba935d010, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c94b510 rbx 0x665b __ALIGN_SIZE+0x565b rdx 0 rcx 0 rax 0xffff800039cf5a10 r8 0x101010101010101 r9 0x8080808080808080 r10 0xe2ebace6bd8a70e r11 0xe687055dbf61b32e r12 0 r13 0xfffffd806cc23600 r14 0 r15 0x1 rip 0xffffffff82bf71d5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c94b500 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=312621 pid=89731 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=0xffff800039cf47e8,0xffffffff83a634d0 process=0xffff80002f0bed18 user=0xffff80003c946000, vmspace=0xfffffd806ccc75d8 estcpu=20, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *89731 312621 99566 0 7 0x2 syz-executor 3891 432927 60412 0 2 0xc80 syz-executor 3891 338959 60412 0 3 0x4000080 kqsel syz-executor 3891 14529 60412 0 3 0x4000080 fsleep syz-executor 74980 520859 83255 60929 3 0x90 nanoslp syz-executor 74980 494009 83255 60929 3 0x4000090 nanoslp syz-executor 74980 77542 83255 60929 3 0x4000090 fsleep syz-executor 46008 363806 29120 0 3 0x90 nanoslp syz-executor 46008 226394 29120 0 3 0x4000090 semwait syz-executor 46008 160554 29120 0 3 0x4000090 pipewr syz-executor 48875 235797 10088 0 3 0x80 nanoslp syz-executor 48875 467493 10088 0 3 0x4000080 sbwait syz-executor 48875 502217 10088 0 3 0x4000080 fsleep syz-executor 54849 1831 99566 0 2 0xc82 syz-executor 29120 130730 99566 0 2 0xc82 syz-executor 80115 349241 99566 0 3 0x82 piperd syz-executor 10088 208422 99566 0 2 0xc82 syz-executor 49016 504788 99566 0 3 0x82 piperd syz-executor 60412 366852 99566 0 3 0x82 nanoslp syz-executor 83255 179058 99566 0 2 0xc82 syz-executor 99566 38524 47529 0 2 0x2 syz-executor 47529 98586 76182 0 3 0x10008a sigsusp ksh 76182 321793 99190 0 3 0x98 kqread sshd-session 99190 252054 88968 0 3 0x92 kqread sshd-session 58537 148983 1 0 3 0x100083 ttyin getty 88968 62026 1 0 3 0x88 kqread sshd 94748 33606 77341 73 3 0x1100090 kqread syslogd 77341 153458 1 0 3 0x100082 sbwait syslogd 78915 358687 1 0 3 0x100080 kqread resolvd 4605 252850 83071 77 3 0x100092 kqread dhcpleased 7114 119806 83071 77 3 0x100092 kqread dhcpleased 83071 346790 1 0 3 0x80 kqread dhcpleased 94365 94808 0 0 3 0x14200 bored smr 71421 42947 0 0 2 0x14200 zerothread 27691 204856 0 0 3 0x14200 aiodoned aiodoned 5088 122954 0 0 3 0x14200 syncer update 15265 8985 0 0 3 0x14200 cleaner cleaner 44940 431961 0 0 3 0x14200 reaper reaper 57289 483253 0 0 3 0x14200 pgdaemon pagedaemon 6811 413952 0 0 3 0x14200 bored viomb 8648 23270 0 0 3 0x40014200 acpi0 acpi0 55151 248702 0 0 3 0x14200 bored softnet0 50714 365956 0 0 3 0x14200 smrbar systqmp 82022 197923 0 0 3 0x14200 bored systq 69780 174281 0 0 3 0x40014200 tmoslp softclock 68932 64791 0 0 3 0x40014200 idle0 1 448842 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 11039 12169K 12365K 166960K 12204 0 pcb 18 12K 12K 166960K 43 0 rtable 223 6K 7K 166960K 372 0 pf 29 12K 20K 166960K 56 0 ifaddr 38 6K 7K 166960K 46 0 ifgroup 46 2K 2K 166960K 57 0 sysctl 1 1K 9K 166960K 5 0 counters 32 17K 18K 166960K 36 0 ioctlops 0 0K 4K 166960K 43 0 iov 0 0K 16K 166960K 5 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1290 81K 82K 166960K 1419 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 5 0 VM map 2 1K 1K 166960K 2 0 sem 9 0K 0K 166960K 42 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 15 50K 81K 166960K 218 0 sigio 0 0K 0K 166960K 1 0 proc 59 59K 83K 166960K 503 0 subproc 63 3K 4K 166960K 73 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 5 0 in_multi 88 6K 7K 166960K 102 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 6 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 73 334K 334K 166960K 73 0 exec 0 0K 1K 166960K 402 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 201 150K 172K 166960K 3626 0 UVM aobj 5 2K 2K 166960K 5 0 pinsyscall 36 72K 89K 166960K 1301 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 2 0K 0K 166960K 7 0 NDP 10 0K 2K 166960K 29 0 temp 36 9063K 9127K 166960K 7426 0 kqueue 15 22K 24K 166960K 28 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 42 0 39 1 0 1 1 0 8 0 rtentry 136 111 0 12 4 0 4 4 0 8 0 unpcb 144 69 0 50 2 0 2 2 0 8 0 syncache 336 3 0 3 1 0 1 1 0 8 1 tcpcb 736 26 0 19 1 0 1 1 0 8 0 arp 96 18 0 2 1 0 1 1 0 8 0 inpcb 328 108 0 97 2 0 2 2 0 8 0 ip6q 72 1 0 0 1 0 1 1 0 8 0 ip6af 40 1 0 0 1 0 1 1 0 8 0 nd6 112 24 0 3 1 0 1 1 0 8 0 kcovpl 48 8 0 1 1 0 1 1 0 8 0 ppxss 1072 2 0 2 1 0 1 1 0 8 1 pfstscr 40 1 0 1 1 0 1 1 0 8 1 pfanchor 1288 3 0 0 1 0 1 1 0 8 0 pfstkey 128 2 0 2 1 0 1 1 0 8 1 pfstate 384 1 0 1 1 0 1 1 0 8 1 pfrule 1360 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 453 0 0 29 0 29 29 0 8 0 art_table 40 454 0 0 5 0 5 5 0 8 0 art_node 32 111 0 21 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 2 1 0 1 1 0 8 0 semapl 112 40 0 33 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1710 0 255 92 0 92 92 0 8 0 ffsino 256 1710 0 255 92 0 92 92 0 8 0 nchpl 144 2029 0 341 64 0 64 64 0 8 0 vnodes 216 1824 0 0 102 0 102 102 0 8 0 namei 1024 6169 0 6168 2 0 2 2 0 8 1 kstatmem 264 26 0 6 2 0 2 2 0 8 0 scxspl 216 6957 0 6957 8 0 8 8 1 8 8 plimitpl 152 42 0 25 1 0 1 1 0 8 0 sigapl 424 508 0 468 6 0 6 6 0 8 1 knotepl 120 5492 0 5443 2 0 2 2 0 8 0 kqueuepl 184 38 0 26 1 0 1 1 0 8 0 pipepl 304 130 0 100 3 0 3 3 0 8 0 fdescpl 448 495 0 468 4 0 4 4 0 8 0 filepl 120 2046 0 1829 9 0 9 9 0 8 0 lockfpl 104 43 0 40 1 0 1 1 0 8 0 lockfspl 48 20 0 17 1 0 1 1 0 8 0 sessionpl 144 25 0 17 1 0 1 1 0 8 0 pgrppl 48 34 0 18 1 0 1 1 0 8 0 ucredpl 104 185 0 171 1 0 1 1 0 8 0 zombiepl 144 469 0 468 1 0 1 1 0 8 0 processpl 1152 508 0 468 4 0 4 4 0 8 0 procpl 664 629 0 581 5 0 5 5 0 8 0 sockpl 552 352 0 319 4 0 4 4 0 8 1 mcl64k 65536 12 0 12 1 0 1 1 0 8 1 mcl16k 16384 14 0 14 1 0 1 1 0 8 1 mcl12k 12288 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 2629 0 2578 16 1 15 16 0 8 8 mcl2k 2048 192 0 190 1 0 1 1 0 8 0 mtagpl 96 6 0 4 1 0 1 1 0 8 0 mbufpl 256 4909 0 4758 12 0 12 12 0 8 0 bufpl 280 2420 0 102 166 0 166 166 0 8 0 anonpl 24 76604 0 73587 32 0 32 32 0 187 12 amapchunkpl 152 10141 0 9739 25 0 25 25 0 158 6 amappl16 200 683 0 659 3 0 3 3 0 8 1 amappl15 192 6 0 6 1 0 1 1 0 8 1 amappl14 184 409 0 407 1 0 1 1 0 8 0 amappl13 176 109 0 99 1 0 1 1 0 8 0 amappl12 168 728 0 703 2 0 2 2 0 8 0 amappl11 160 3 0 3 1 0 1 1 0 8 1 amappl10 152 64 0 54 1 0 1 1 0 8 0 amappl9 144 285 0 285 1 0 1 1 0 8 1 amappl8 136 111 0 110 1 0 1 1 0 8 0 amappl7 128 138 0 127 1 0 1 1 0 8 0 amappl6 120 156 0 154 1 0 1 1 0 8 0 amappl5 112 85 0 78 1 0 1 1 0 8 0 amappl4 104 250 0 233 1 0 1 1 0 8 0 amappl3 96 1887 0 1795 3 0 3 3 0 8 0 amappl2 88 493 0 438 2 0 2 2 0 8 0 amappl1 80 9316 0 8772 13 0 13 13 0 8 1 amappl 88 2932 0 2793 4 0 4 4 0 92 0 uvmvnodes 80 99 0 0 3 0 3 3 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 4 0 0 1 0 1 1 0 8 0 uaddrrnd 24 495 0 468 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 495 0 468 1 0 1 1 0 8 0 vmmpekpl 168 5524 0 5483 2 0 2 2 0 8 0 vmmpepl 168 38022 0 36367 81 0 81 81 0 357 0 vmsppl 368 494 0 468 4 0 4 4 0 8 1 rwobjpl 40 12747 0 11831 10 0 10 10 0 8 0 pdppl 4096 996 0 936 88 22 66 74 0 8 6 pvpl 32 219659 0 211451 103 0 103 103 0 265 23 pmappl 216 494 0 468 2 0 2 2 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 353 0 23 10 0 10 10 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(ffffffff833fca69) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd8077502e00,41c0,fffffd8007ffd750,ffff80003c94b788) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c94b7f0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd8077500970,ffff80003c94b950,ffff80003c94b980,ffff80003c94b880) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff800039cf5a10,ffffff9c,7dbba935d050,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3143 syscall(ffff80003c94baf0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c94baf0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7dbba935d010, 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(ffffffff833fca69) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd8077502e00,41c0,fffffd8007ffd750,ffff80003c94b788) at ffs_inode_alloc+0x94e ufs_mkdir(ffff80003c94b7f0) at ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 VOP_MKDIR(fffffd8077500970,ffff80003c94b950,ffff80003c94b980,ffff80003c94b880) at VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 domkdirat(ffff800039cf5a10,ffffff9c,7dbba935d050,1c0) at domkdirat+0x179 sys/kern/vfs_syscalls.c:3143 syscall(ffff80003c94baf0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c94baf0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7dbba935d010, count: -8