panic: ffs_valloc: dup alloc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *111747 1846 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830a879e) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd80796a2698,2000,fffffd807f7d75b0,ffff800037465460) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(2000,fffffd805f261398,ffff800037465680,ffff8000374656b0) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_mknod(ffff800037465520) at ufs_mknod+0x5b sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(fffffd805f261398,ffff800037465680,ffff8000374656b0,ffff8000374655b0) at VOP_MKNOD+0x102 sys/kern/vfs_vops.c:121 domknodat(ffff80002a4b0520,ffffff9c,20000040,2000,d02) at domknodat+0x47e sys/kern/vfs_syscalls.c:1624 syscall(ffff800037465850) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3399b5ccad0, 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> 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(ffffffff830a879e) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd80796a2698,2000,fffffd807f7d75b0,ffff800037465460) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(2000,fffffd805f261398,ffff800037465680,ffff8000374656b0) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_mknod(ffff800037465520) at ufs_mknod+0x5b sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(fffffd805f261398,ffff800037465680,ffff8000374656b0,ffff8000374655b0) at VOP_MKNOD+0x102 sys/kern/vfs_vops.c:121 domknodat(ffff80002a4b0520,ffffff9c,20000040,2000,d02) at domknodat+0x47e sys/kern/vfs_syscalls.c:1624 syscall(ffff800037465850) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3399b5ccad0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037465200 rbx 0xfffffd8069f9d300 rdx 0 rcx 0 rax 0xffff80002a4b0520 r8 0x101010101010101 r9 0x8080808080808080 r10 0x6f68972e011adb22 r11 0xaa76244bf2a27bee r12 0 r13 0xfffffd807078db40 r14 0 r15 0x1 rip 0xffffffff82a5fe55 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000374651f0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=111747 pid=1846 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=17, usrpri=86, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4b07a8,0xffff80002a4b0020 process=0xffff80002a464ce0 user=0xffff800037460000, vmspace=0xfffffd806c38e168 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 94617 235473 21720 0 2 0x480 syz-executor 94617 486950 21720 0 2 0x4000000 syz-executor 94617 511261 21720 0 3 0x4000080 fsleep syz-executor 1846 78907 69688 0 2 0 syz-executor * 1846 111747 69688 0 7 0x4000000 syz-executor 1846 123923 69688 0 3 0x4000080 fsleep syz-executor 98388 350145 33152 -1 2 0x490 syz-executor 98388 461962 33152 -1 3 0x4000090 ttyout syz-executor 98388 328167 33152 -1 3 0x4000090 ttyout syz-executor 98388 309415 33152 -1 3 0x4000090 fsleep syz-executor 22115 90980 20409 0 2 0x2 syz-executor 21720 127210 20409 0 2 0x482 syz-executor 69688 11652 20409 0 2 0x482 syz-executor 2288 162150 20409 0 2 0x482 syz-executor 14320 127008 20409 0 2 0x2 syz-executor 33152 462611 20409 0 2 0x482 syz-executor 73864 342299 0 0 3 0x14200 bored sosplice 33107 356852 1 0 3 0x100083 ttyopn getty 20409 35666 10821 0 3 0x82 wait syz-executor 10821 43299 65284 0 3 0x10008a sigsusp ksh 65284 250860 12439 0 3 0x98 kqread sshd-session 12439 129311 91177 0 3 0x92 kqread sshd-session 91177 117068 1 0 3 0x88 kqread sshd 21884 139500 88673 73 3 0x1100090 kqread syslogd 88673 450085 1 0 3 0x100082 sbwait syslogd 19608 104969 1 0 3 0x100080 kqread resolvd 27185 198881 14470 77 3 0x100092 kqread dhcpleased 46701 158438 14470 77 3 0x100092 kqread dhcpleased 14470 355484 1 0 3 0x80 kqread dhcpleased 36223 298137 0 0 3 0x14200 bored smr 14131 434247 0 0 2 0x14200 zerothread 59496 303898 0 0 3 0x14200 aiodoned aiodoned 11417 187000 0 0 3 0x14200 syncer update 61311 475011 0 0 3 0x14200 cleaner cleaner 2245 358181 0 0 3 0x14200 reaper reaper 55663 299732 0 0 3 0x14200 pgdaemon pagedaemon 41979 325677 0 0 3 0x14200 bored viomb 1475 126633 0 0 3 0x40014200 acpi0 acpi0 46076 242359 0 0 3 0x14200 bored softnet3 11968 223336 0 0 3 0x14200 bored softnet2 52211 53796 0 0 3 0x14200 bored softnet1 30802 202610 0 0 2 0x14200 softnet0 39650 424831 0 0 3 0x14200 bored systqmp 33072 295582 0 0 3 0x14200 bored systq 4664 329594 0 0 2 0x40014200 softclock 23049 420924 0 0 3 0x40014200 idle0 1 103993 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 10190 10218K 10415K 166960K 12266 0 pcb 17 12K 12K 166960K 136 0 rtable 230 10K 10K 166960K 2188 0 pf 39 14K 17K 166960K 205 0 ifaddr 41 7K 8K 166960K 288 0 ifgroup 56 2K 2K 166960K 307 0 sysctl 3 0K 0K 166960K 3 0 counters 32 17K 17K 166960K 97 0 ioctlops 0 0K 4K 166960K 270 0 iov 0 0K 16K 166960K 83 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1456 91K 92K 166960K 2713 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 14 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 33 0 dirhash 12 2K 2K 166960K 27 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 14 49K 97K 166960K 1640 0 sigio 0 0K 0K 166960K 55 0 proc 58 59K 124K 166960K 2164 0 subproc 104 6K 6K 166960K 846 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 100 0 in_multi 88 6K 7K 166960K 754 0 ether_multi 1 0K 0K 166960K 6 0 mrt 0 0K 0K 166960K 2 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 85 387K 387K 166960K 85 0 exec 0 0K 1K 166960K 1169 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 208 88K 119K 166960K 13028 0 UVM aobj 47 2K 2K 166960K 48 0 pinsyscall 35 70K 96K 166960K 4139 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 34 0 NDP 13 0K 2K 166960K 208 0 temp 74 6815K 6879K 166960K 73843 0 kqueue 14 22K 30K 166960K 121 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 272 0 236 3 1 2 2 0 8 0 rtentry 112 755 0 654 4 1 3 4 0 8 0 unpcb 144 1022 0 1005 12 11 1 6 0 8 0 syncache 336 7 0 7 2 2 0 1 0 8 0 tcpcb 808 269 0 264 9 8 1 8 0 8 0 arp 88 135 0 119 1 0 1 1 0 8 0 ipq 40 4 0 4 2 1 1 1 0 8 1 ipqe 40 90 0 90 2 1 1 1 0 8 1 inpcb 336 1309 0 1301 8 6 2 7 0 8 1 nd6 104 201 0 179 1 0 1 1 0 8 0 pkpcb 40 7 0 7 2 2 0 1 0 8 0 kcovpl 48 65 0 57 1 0 1 1 0 8 0 ppxss 1072 6 0 5 2 1 1 1 0 8 0 pfstscr 40 38 0 37 2 1 1 1 0 8 0 pfrktable 1344 16 0 14 2 1 1 1 0 8 0 pfanchor 1288 5 0 4 1 0 1 1 0 8 0 pftag 88 5 0 3 2 1 1 1 0 8 0 pfqueue 264 2 0 1 1 0 1 1 0 8 0 pfstitem 24 3 0 0 1 0 1 1 0 8 0 pfstkey 128 73 0 70 2 1 1 1 0 8 0 pfstate 344 38 0 36 2 1 1 1 0 8 0 pfrule 1344 13 0 10 2 1 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 3010 0 2583 32 5 27 29 0 8 0 art_table 32 3012 0 2583 4 0 4 4 0 8 0 art_node 16 753 0 661 1 0 1 1 0 8 0 sysvmsgpl 40 46 0 6 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 31 0 21 1 0 1 1 0 8 0 shmpl 112 45 0 1 2 0 2 2 0 8 0 dirhash 1024 27 0 10 3 0 3 3 0 8 0 dino2pl 256 2852 0 1249 101 0 101 101 0 8 0 ffsino 240 2853 0 1250 95 0 95 95 0 8 0 nchpl 144 4051 0 2291 66 0 66 66 0 8 0 uvmvnodes 80 4126 0 0 85 0 85 85 0 8 0 vnodes 216 4126 0 0 230 0 230 230 0 8 0 namei 1024 20091 0 20089 4 3 1 1 0 8 0 vcpupl 3904 2 0 1 1 0 1 1 0 8 0 vmpool 664 2 0 1 1 0 1 1 0 8 0 pfiaddrpl 120 5 0 3 1 0 1 1 0 8 0 kstatmem 264 156 0 130 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 33758 0 33758 10 9 1 8 1 8 1 plimitpl 152 404 0 388 1 0 1 1 0 8 0 sigapl 424 1805 0 1762 7 1 6 7 0 8 0 futexpl 64 11379 0 11376 1 0 1 1 0 8 0 knotepl 120 25204 0 25156 17 15 2 16 0 8 0 kqueuepl 184 200 0 190 1 0 1 1 0 8 0 pipepl 288 377 0 350 6 3 3 5 0 8 0 fdescpl 432 1788 0 1762 5 1 4 5 0 8 0 filepl 120 9596 0 9257 25 12 13 17 0 8 1 lockfpl 104 634 0 632 4 3 1 4 0 8 0 lockfspl 48 112 0 110 1 0 1 1 0 8 0 sessionpl 144 79 0 71 1 0 1 1 0 8 0 pgrppl 48 149 0 133 1 0 1 1 0 8 0 ucredpl 104 1133 0 1121 1 0 1 1 0 8 0 zombiepl 144 1783 0 1780 5 4 1 1 0 8 0 processpl 1096 1805 0 1762 4 0 4 4 0 8 0 procpl 648 2791 0 2741 6 1 5 6 0 8 0 sosppl 168 2 0 2 1 1 0 1 0 8 0 sockpl 504 2622 0 2561 62 54 8 23 0 8 0 mcl64k 65536 7 0 7 2 1 1 1 0 8 1 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 74 0 74 2 2 0 1 0 8 0 mcl4k 4096 3 0 3 1 1 0 1 0 8 0 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 7876 0 7778 34 20 14 29 0 8 0 mtagpl 96 9 0 9 2 1 1 1 0 8 1 mbufpl 256 19758 0 19550 34 8 26 26 0 8 9 bufpl 280 9518 0 2109 530 0 530 530 0 8 0 anonpl 24 281094 0 278002 99 69 30 78 0 187 0 amapchunkpl 152 42028 0 41604 50 24 26 40 0 158 5 amappl16 200 4622 0 4603 35 33 2 14 0 8 0 amappl15 192 4 0 4 1 1 0 1 0 8 0 amappl14 184 218 0 208 1 0 1 1 0 8 0 amappl13 176 8 0 8 1 1 0 1 0 8 0 amappl12 168 3295 0 3269 2 0 2 2 0 8 0 amappl11 160 47 0 37 1 0 1 1 0 8 0 amappl10 152 8 0 8 1 1 0 1 0 8 0 amappl9 144 130 0 130 1 1 0 1 0 8 0 amappl8 136 21 0 20 1 0 1 1 0 8 0 amappl7 128 211 0 201 1 0 1 1 0 8 0 amappl6 120 735 0 733 1 0 1 1 0 8 0 amappl5 112 350 0 341 1 0 1 1 0 8 0 amappl4 104 455 0 438 1 0 1 1 0 8 0 amappl3 96 7941 0 7844 7 4 3 4 0 8 0 amappl2 88 1404 0 1346 2 0 2 2 0 8 0 amappl1 80 15437 0 14915 13 1 12 13 0 8 0 amappl 88 12225 0 12073 5 0 5 5 0 92 0 dma16384 16384 1 0 1 1 1 0 1 0 8 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 47 0 1 1 0 1 1 0 8 0 uaddrrnd 24 1790 0 1763 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1790 0 1763 1 0 1 1 0 8 0 vmmpekpl 168 15249 0 15188 3 0 3 3 0 8 0 vmmpepl 168 114109 0 112502 100 21 79 90 0 357 1 vmsppl 344 1789 0 1763 4 1 3 4 0 8 0 rwobjpl 24 37806 0 32794 31 0 31 31 0 8 0 pdppl 4096 3587 0 3527 187 119 68 83 0 8 8 pvpl 32 868881 0 860361 384 292 92 347 0 265 0 pmappl 216 1789 0 1763 3 1 2 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 589 0 236 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(ffffffff830a879e) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd80796a2698,2000,fffffd807f7d75b0,ffff800037465460) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(2000,fffffd805f261398,ffff800037465680,ffff8000374656b0) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_mknod(ffff800037465520) at ufs_mknod+0x5b sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(fffffd805f261398,ffff800037465680,ffff8000374656b0,ffff8000374655b0) at VOP_MKNOD+0x102 sys/kern/vfs_vops.c:121 domknodat(ffff80002a4b0520,ffffff9c,20000040,2000,d02) at domknodat+0x47e sys/kern/vfs_syscalls.c:1624 syscall(ffff800037465850) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3399b5ccad0, count: -9 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830a879e) at panic+0x1cf sys/kern/subr_prf.c:198 ffs_inode_alloc(fffffd80796a2698,2000,fffffd807f7d75b0,ffff800037465460) at ffs_inode_alloc+0x96c sys/ufs/ffs/ffs_alloc.c:404 ufs_makeinode(2000,fffffd805f261398,ffff800037465680,ffff8000374656b0) at ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1728 ufs_mknod(ffff800037465520) at ufs_mknod+0x5b sys/ufs/ufs/ufs_vnops.c:167 VOP_MKNOD(fffffd805f261398,ffff800037465680,ffff8000374656b0,ffff8000374655b0) at VOP_MKNOD+0x102 sys/kern/vfs_vops.c:121 domknodat(ffff80002a4b0520,ffffff9c,20000040,2000,d02) at domknodat+0x47e sys/kern/vfs_syscalls.c:1624 syscall(ffff800037465850) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3399b5ccad0, count: -9