On Tue, Sep 22, 2026 at 11:51:51AM -0400, Brian Brombacher wrote:

> 
> 
> > On Sep 22, 2026, at 10:46 AM, Otto Moerbeek <[email protected]> wrote:
> > I suppose your machine is trashing. Allocating many gigs on a 2GB
> > machine will do that. The memory will be returned an become available
> > in the end on process exit, but it probably takes a long while and you
> > machine might appear stalled.  Your statement that killing ftpd
> > does not help is likely a misdiagnosis.
> 
> I used sendbug on a VM, not the production server, apologies.  The production 
> server has 256 GB RAM.  The ftpd children were long gone for a whole week 
> before I noticed the inactive memory was sitting at 57 GB.
> 
> > 
> > What do you mean by "Inactive memory"? How do you measure it? It is
> > not a term used by e.g. top or ps.
> 
> vmstat -s
> 
> Look for “pages inactive”
> 
> > 
> > Show us some data of the various stages of your test. I did not
> > manage to reproduce locally.
> 
> Sure thing.  Here are the steps I took:
> 
> methone:~$ vmstat -s | head -n 5
>        4096 bytes per page
>    60977357 pages managed
>     4158777 pages free
>      605119 pages active
>       34302 pages inactive
> methone:~/temp$ du -chsx data
> 8.1G    data
> 8.1G    total
> methone:~/temp$ ./mmapdos > /dev/null
> methone:~/temp$ vmstat -s | head -n 5
>        4096 bytes per page
>    60977357 pages managed
>     2054420 pages free
>      568188 pages active
>     2136312 pages inactive
> 
> Now those 8 GB inactive pages will go away when I delete the data folder.  
> The UVM subsystem will not attempt to free them on its own when it needs more 
> memory because they were mmap’d in a process.

You are drawing conclusions without providing hard evidence.

The pages will actively go away because the files they were mapping is
gone. But they also should go away at some point if the memory is
needed elsewhere, as the mappings should be gone since the process
that created them is gone. But the cleanup won't probably won't happen
soon with so much memory in your system. Unless there is a bug. But
so far you did not provide enough evidence for that conclusion. I do
wonder if it matters that MAP_SHARED is used here.

        -Otto

> 
> Here is dmesg from the server:
> 
> OpenBSD 8.0-beta (PU.MP) #188: Thu Sep 10 07:29:06 EDT 2026
>     [email protected]:/home/brian/sys/arch/amd64/compile/PU.MP
> real mem = 257562853376 (245631MB)
> avail mem = 249725575168 (238156MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xec9b0 (42 entries)
> bios0: vendor American Megatrends Inc. version "3.4" date 06/05/2021
> bios0: Supermicro X10SRD-F
> acpi0 at bios0: ACPI 5.0
> acpi0: sleep states S0 S4 S5
> acpi0: tables DSDT FACP APIC FPDT FIDT SPMI MCFG UEFI HPET NFIT WDDT SSDT 
> NITR SSDT SSDT PRAD DMAR HEST BERT ERST EINJ
> acpi0: wakeup devices IP2P(S4) EHC1(S4) EHC2(S4) RP01(S4) RP02(S4) RP03(S4) 
> RP04(S4) RP05(S4) RP06(S4) RP07(S4) RP08(S4) BR1A(S4) BR1B(S4) BR2A(S4) 
> BR2B(S4) BR2C(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.06 MHz, 06-4f-01, patch 
> 0b000040
> cpu0: cpuid 1 
> edx=bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
>  
> ecx=77fefbff<SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND>
> cpu0: cpuid 6 eax=77<SENSOR,ARAT,PTS> ecx=9<EFFFREQ>
> cpu0: cpuid 7.0 
> ebx=21cbfbb<FSGSBASE,TSC_ADJUST,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,PQM,RDSEED,ADX,SMAP,PT>
>  edx=9c000400<MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD>
> cpu0: cpuid a vers=3, gp=4, gpwidth=48, ff=3, ffwidth=48
> cpu0: cpuid d.1 eax=1<XSAVEOPT>
> cpu0: cpuid 80000001 edx=2c100800<NXE,PAGE1GB,RDTSCP,LONG> 
> ecx=121<LAHF,ABM,3DNOWP>
> cpu0: cpuid 80000007 edx=100<ITSC>
> cpu0: MELTDOWN
> cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 
> 64b/line 8-way L2 cache, 45MB 64b/line 20-way L3 cache
> cpu0: smt 0, core 0, package 0, type P
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 100MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.2, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.09 MHz, 06-4f-01, patch 
> 0b000040
> cpu1: smt 0, core 1, package 0, type P
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.12 MHz, 06-4f-01, patch 
> 0b000040
> cpu2: smt 0, core 2, package 0, type P
> cpu3 at mainbus0: apid 6 (application processor)
> cpu3: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.23 MHz, 06-4f-01, patch 
> 0b000040
> cpu3: smt 0, core 3, package 0, type P
> cpu4 at mainbus0: apid 8 (application processor)
> cpu4: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.29 MHz, 06-4f-01, patch 
> 0b000040
> cpu4: smt 0, core 4, package 0, type P
> cpu5 at mainbus0: apid 16 (application processor)
> cpu5: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.29 MHz, 06-4f-01, patch 
> 0b000040
> cpu5: smt 0, core 8, package 0, type P
> cpu6 at mainbus0: apid 18 (application processor)
> cpu6: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.36 MHz, 06-4f-01, patch 
> 0b000040
> cpu6: smt 0, core 9, package 0, type P
> cpu7 at mainbus0: apid 20 (application processor)
> cpu7: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.38 MHz, 06-4f-01, patch 
> 0b000040
> cpu7: smt 0, core 10, package 0, type P
> cpu8 at mainbus0: apid 22 (application processor)
> cpu8: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.34 MHz, 06-4f-01, patch 
> 0b000040
> cpu8: smt 0, core 11, package 0, type P
> cpu9 at mainbus0: apid 32 (application processor)
> cpu9: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.43 MHz, 06-4f-01, patch 
> 0b000040
> cpu9: smt 0, core 16, package 0, type P
> cpu10 at mainbus0: apid 34 (application processor)
> cpu10: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.50 MHz, 06-4f-01, 
> patch 0b000040
> cpu10: smt 0, core 17, package 0, type P
> cpu11 at mainbus0: apid 36 (application processor)
> cpu11: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.63 MHz, 06-4f-01, 
> patch 0b000040
> cpu11: smt 0, core 18, package 0, type P
> cpu12 at mainbus0: apid 38 (application processor)
> cpu12: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.69 MHz, 06-4f-01, 
> patch 0b000040
> cpu12: smt 0, core 19, package 0, type P
> cpu13 at mainbus0: apid 40 (application processor)
> cpu13: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.50 MHz, 06-4f-01, 
> patch 0b000040
> cpu13: smt 0, core 20, package 0, type P
> cpu14 at mainbus0: apid 48 (application processor)
> cpu14: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.87 MHz, 06-4f-01, 
> patch 0b000040
> cpu14: smt 0, core 24, package 0, type P
> cpu15 at mainbus0: apid 50 (application processor)
> cpu15: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.88 MHz, 06-4f-01, 
> patch 0b000040
> cpu15: smt 0, core 25, package 0, type P
> cpu16 at mainbus0: apid 52 (application processor)
> cpu16: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.56 MHz, 06-4f-01, 
> patch 0b000040
> cpu16: smt 0, core 26, package 0, type P
> cpu17 at mainbus0: apid 54 (application processor)
> cpu17: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2100.88 MHz, 06-4f-01, 
> patch 0b000040
> cpu17: smt 0, core 27, package 0, type P
> cpu18 at mainbus0: apid 1 (application processor)
> cpu18: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.50 MHz, 06-4f-01, 
> patch 0b000040
> cpu18: smt 1, core 0, package 0, type SP
> cpu19 at mainbus0: apid 3 (application processor)
> cpu19: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.83 MHz, 06-4f-01, 
> patch 0b000040
> cpu19: smt 1, core 1, package 0, type SP
> cpu20 at mainbus0: apid 5 (application processor)
> cpu20: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.82 MHz, 06-4f-01, 
> patch 0b000040
> cpu20: smt 1, core 2, package 0, type SP
> cpu21 at mainbus0: apid 7 (application processor)
> cpu21: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.26 MHz, 06-4f-01, 
> patch 0b000040
> cpu21: smt 1, core 3, package 0, type SP
> cpu22 at mainbus0: apid 9 (application processor)
> cpu22: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.80 MHz, 06-4f-01, 
> patch 0b000040
> cpu22: smt 1, core 4, package 0, type SP
> cpu23 at mainbus0: apid 17 (application processor)
> cpu23: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.25 MHz, 06-4f-01, 
> patch 0b000040
> cpu23: smt 1, core 8, package 0, type SP
> cpu24 at mainbus0: apid 19 (application processor)
> cpu24: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.52 MHz, 06-4f-01, 
> patch 0b000040
> cpu24: smt 1, core 9, package 0, type SP
> cpu25 at mainbus0: apid 21 (application processor)
> cpu25: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.77 MHz, 06-4f-01, 
> patch 0b000040
> cpu25: smt 1, core 10, package 0, type SP
> cpu26 at mainbus0: apid 23 (application processor)
> cpu26: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.33 MHz, 06-4f-01, 
> patch 0b000040
> cpu26: smt 1, core 11, package 0, type SP
> cpu27 at mainbus0: apid 33 (application processor)
> cpu27: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.10 MHz, 06-4f-01, 
> patch 0b000040
> cpu27: smt 1, core 16, package 0, type SP
> cpu28 at mainbus0: apid 35 (application processor)
> cpu28: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.53 MHz, 06-4f-01, 
> patch 0b000040
> cpu28: smt 1, core 17, package 0, type SP
> cpu29 at mainbus0: apid 37 (application processor)
> cpu29: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.10 MHz, 06-4f-01, 
> patch 0b000040
> cpu29: smt 1, core 18, package 0, type SP
> cpu30 at mainbus0: apid 39 (application processor)
> cpu30: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.53 MHz, 06-4f-01, 
> patch 0b000040
> cpu30: smt 1, core 19, package 0, type SP
> cpu31 at mainbus0: apid 41 (application processor)
> cpu31: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.48 MHz, 06-4f-01, 
> patch 0b000040
> cpu31: smt 1, core 20, package 0, type SP
> cpu32 at mainbus0: apid 49 (application processor)
> cpu32: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.65 MHz, 06-4f-01, 
> patch 0b000040
> cpu32: smt 1, core 24, package 0, type SP
> cpu33 at mainbus0: apid 51 (application processor)
> cpu33: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.51 MHz, 06-4f-01, 
> patch 0b000040
> cpu33: smt 1, core 25, package 0, type SP
> cpu34 at mainbus0: apid 53 (application processor)
> cpu34: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.44 MHz, 06-4f-01, 
> patch 0b000040
> cpu34: smt 1, core 26, package 0, type SP
> cpu35 at mainbus0: apid 55 (application processor)
> cpu35: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz, 2101.51 MHz, 06-4f-01, 
> patch 0b000040
> cpu35: smt 1, core 27, package 0, type SP
> ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
> ioapic1 at mainbus0: apid 2 pa 0xfec01000, version 20, 24 pins
> acpimcfg0 at acpi0
> acpimcfg0: addr 0x80000000, bus 0-255
> acpihpet0 at acpi0: 14318179 Hz
> acpiprt0 at acpi0: bus 255 (UNC0)
> acpiprt1 at acpi0: bus 0 (PCI0)
> acpiprt2 at acpi0: bus 6 (RP05)
> acpiprt3 at acpi0: bus 7 (BR80)
> acpiprt4 at acpi0: bus 1 (BR1A)
> acpiprt5 at acpi0: bus -1 (BR2C)
> acpipci0 at acpi0 UNC0: 0x00000010 0x00000011 0x00000000
> "ACPI0004" at acpi0 not configured
> acpipci1 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000
> "PNP0003" at acpi0 not configured
> acpicmos0 at acpi0
> "PNP0501" at acpi0 not configured
> "PNP0501" at acpi0 not configured
> "IPI0001" at acpi0 not configured
> acpibtn0 at acpi0: PWRB
> "PNP0C33" at acpi0 not configured
> "PNP0C14" at acpi0 not configured
> "ACPI000D" at acpi0 not configured
> acpicpu0 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu1 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu2 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu3 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu4 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu5 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu6 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu7 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu8 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu9 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu10 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu11 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu12 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu13 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu14 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu15 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu16 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu17 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu18 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu19 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu20 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu21 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu22 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu23 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu24 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu25 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu26 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu27 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu28 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu29 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu30 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu31 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu32 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu33 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu34 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> acpicpu35 at acpi0: C2(350@41 mwait.3@0x20), C1(1016@1 mwait.1), PSS
> ipmi at mainbus0 not configured
> cpu0: using VERW MDS workaround (except on vmm entry)
> cpu0: Enhanced SpeedStep 2100 MHz: speeds: 2101, 2100, 2000, 1900, 1800, 
> 1700, 1600, 1500, 1400, 1300, 1200 MHz
> pci0 at mainbus0 bus 255
> "Intel Xeon-D QPI Link" rev 0x01 at pci0 dev 11 function 0 not configured
> "Intel Xeon-D QPI Link" rev 0x01 at pci0 dev 11 function 1 not configured
> "Intel Xeon-D QPI Link" rev 0x01 at pci0 dev 11 function 2 not configured
> "Intel Xeon-D QPI Debug" rev 0x01 at pci0 dev 11 function 3 not configured
> "Intel Xeon-D Cache" rev 0x01 at pci0 dev 12 function 0 not configured
> "Intel Xeon-D Cache" rev 0x01 at pci0 dev 12 function 1 not configured
> "Intel Xeon-D Cache" rev 0x01 at pci0 dev 12 function 2 not configured
> "Intel Xeon-D Cache" rev 0x01 at pci0 dev 12 function 3 not configured
> "Intel E5 v4 Cache" rev 0x01 at pci0 dev 12 function 4 not configured
> "Intel E5 v4 Cache" rev 0x01 at pci0 dev 12 function 5 not configured
> vendor "Intel", unknown product 0x6fe6 (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 12 function 6 not configured
> vendor "Intel", unknown product 0x6fe7 (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 12 function 7 not configured
> vendor "Intel", unknown product 0x6fe8 (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 13 function 0 not configured
> vendor "Intel", unknown product 0x6fe9 (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 13 function 1 not configured
> vendor "Intel", unknown product 0x6fea (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 13 function 2 not configured
> vendor "Intel", unknown product 0x6feb (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 13 function 3 not configured
> vendor "Intel", unknown product 0x6fec (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 13 function 4 not configured
> vendor "Intel", unknown product 0x6fed (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 13 function 5 not configured
> vendor "Intel", unknown product 0x6fee (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 13 function 6 not configured
> vendor "Intel", unknown product 0x6fef (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 13 function 7 not configured
> vendor "Intel", unknown product 0x6ff0 (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 14 function 0 not configured
> vendor "Intel", unknown product 0x6ff1 (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 14 function 1 not configured
> "Intel Xeon-D Cache" rev 0x01 at pci0 dev 15 function 0 not configured
> "Intel E5 v4 Cache" rev 0x01 at pci0 dev 15 function 1 not configured
> vendor "Intel", unknown product 0x6ffa (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 15 function 2 not configured
> vendor "Intel", unknown product 0x6ffb (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 15 function 3 not configured
> "Intel Xeon-D Cache" rev 0x01 at pci0 dev 15 function 4 not configured
> "Intel Xeon-D Cache" rev 0x01 at pci0 dev 15 function 5 not configured
> "Intel Xeon-D Cache" rev 0x01 at pci0 dev 15 function 6 not configured
> "Intel Xeon-D PCIE" rev 0x01 at pci0 dev 16 function 0 not configured
> "Intel E5 v4 R2PCIe Agent" rev 0x01 at pci0 dev 16 function 1 not configured
> "Intel Xeon-D Ubox" rev 0x01 at pci0 dev 16 function 5 not configured
> "Intel Xeon-D Ubox" rev 0x01 at pci0 dev 16 function 6 not configured
> "Intel Xeon-D Ubox" rev 0x01 at pci0 dev 16 function 7 not configured
> "Intel Xeon-D Home Agent" rev 0x01 at pci0 dev 18 function 0 not configured
> "Intel Xeon-D Home Agent" rev 0x01 at pci0 dev 18 function 1 not configured
> vendor "Intel", unknown product 0x6f60 (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 18 function 4 not configured
> vendor "Intel", unknown product 0x6f38 (class DASP subclass Time and 
> Frequency, rev 0x01) at pci0 dev 18 function 5 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 19 function 0 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 19 function 1 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 19 function 2 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 19 function 3 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 19 function 6 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 19 function 7 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 20 function 0 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 20 function 1 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 20 function 2 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 20 function 3 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 20 function 4 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 20 function 5 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 20 function 6 not configured
> "Intel Xeon-D Memory" rev 0x01 at pci0 dev 20 function 7 not configured
> "Intel E5 v4 RAS" rev 0x01 at pci0 dev 22 function 0 not configured
> vendor "Intel", unknown product 0x6f79 (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 22 function 1 not configured
> vendor "Intel", unknown product 0x6f6a (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 22 function 2 not configured
> vendor "Intel", unknown product 0x6f6b (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 22 function 3 not configured
> "Intel E5 v4 DDRIO" rev 0x01 at pci0 dev 22 function 6 not configured
> "Intel E5 v4 DDRIO" rev 0x01 at pci0 dev 22 function 7 not configured
> "Intel E5 v4 Thermal" rev 0x01 at pci0 dev 23 function 0 not configured
> vendor "Intel", unknown product 0x6fd1 (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 23 function 1 not configured
> vendor "Intel", unknown product 0x6fd2 (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 23 function 2 not configured
> vendor "Intel", unknown product 0x6fd3 (class system subclass miscellaneous, 
> rev 0x01) at pci0 dev 23 function 3 not configured
> "Intel E5 v4 DDRIO" rev 0x01 at pci0 dev 23 function 4 not configured
> "Intel E5 v4 DDRIO" rev 0x01 at pci0 dev 23 function 5 not configured
> "Intel E5 v4 DDRIO" rev 0x01 at pci0 dev 23 function 6 not configured
> "Intel E5 v4 DDRIO" rev 0x01 at pci0 dev 23 function 7 not configured
> "Intel Xeon-D PCU" rev 0x01 at pci0 dev 30 function 0 not configured
> "Intel Xeon-D PCU" rev 0x01 at pci0 dev 30 function 1 not configured
> "Intel Xeon-D PCU" rev 0x01 at pci0 dev 30 function 2 not configured
> "Intel Xeon-D PCU" rev 0x01 at pci0 dev 30 function 3 not configured
> "Intel Xeon-D PCU" rev 0x01 at pci0 dev 30 function 4 not configured
> "Intel Xeon-D PCU" rev 0x01 at pci0 dev 31 function 0 not configured
> "Intel Xeon-D PCU" rev 0x01 at pci0 dev 31 function 2 not configured
> pci1 at mainbus0 bus 0
> pchb0 at pci1 dev 0 function 0 "Intel Xeon-D Host" rev 0x01
> ppb0 at pci1 dev 1 function 0 "Intel Xeon-D PCIE" rev 0x01
> pci2 at ppb0 bus 1
> ppb1 at pci1 dev 2 function 0 "Intel Xeon-D PCIE" rev 0x01
> pci3 at ppb1 bus 2
> em0 at pci3 dev 0 function 0 "Intel I350" rev 0x01: msi, address 
> 00:25:90:97:d4:de
> em1 at pci3 dev 0 function 1 "Intel I350" rev 0x01: msi, address 
> 00:25:90:97:d4:df
> ppb2 at pci1 dev 3 function 0 "Intel Xeon-D PCIE" rev 0x01
> pci4 at ppb2 bus 3
> ppb3 at pci1 dev 3 function 2 "Intel Xeon-D PCIE" rev 0x01
> pci5 at ppb3 bus 4
> "Intel E5 v4 DMA" rev 0x01 at pci1 dev 4 function 0 not configured
> "Intel E5 v4 DMA" rev 0x01 at pci1 dev 4 function 1 not configured
> "Intel E5 v4 DMA" rev 0x01 at pci1 dev 4 function 2 not configured
> "Intel E5 v4 DMA" rev 0x01 at pci1 dev 4 function 3 not configured
> "Intel E5 v4 DMA" rev 0x01 at pci1 dev 4 function 4 not configured
> "Intel E5 v4 DMA" rev 0x01 at pci1 dev 4 function 5 not configured
> "Intel E5 v4 DMA" rev 0x01 at pci1 dev 4 function 6 not configured
> "Intel E5 v4 DMA" rev 0x01 at pci1 dev 4 function 7 not configured
> "Intel Xeon-D Address Map" rev 0x01 at pci1 dev 5 function 0 not configured
> "Intel Xeon-D Hot Plug" rev 0x01 at pci1 dev 5 function 1 not configured
> "Intel Xeon-D RAS" rev 0x01 at pci1 dev 5 function 2 not configured
> "Intel Xeon-D I/O APIC" rev 0x01 at pci1 dev 5 function 4 not configured
> "Intel C610 MS SPSR" rev 0x05 at pci1 dev 17 function 0 not configured
> xhci0 at pci1 dev 20 function 0 "Intel C610 xHCI" rev 0x05: msi, xHCI 1.0
> usb0 at xhci0: USB revision 3.0
> uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 
> addr 1
> "Intel C610 MEI" rev 0x05 at pci1 dev 22 function 0 not configured
> "Intel C610 MEI" rev 0x05 at pci1 dev 22 function 1 not configured
> "Intel C610 USB" rev 0x05 at pci1 dev 26 function 0 not configured
> ppb4 at pci1 dev 28 function 0 "Intel C610 PCIE" rev 0xd5
> pci6 at ppb4 bus 5
> ppb5 at pci1 dev 28 function 4 "Intel C610 PCIE" rev 0xd5: msi
> pci7 at ppb5 bus 6
> ppb6 at pci7 dev 0 function 0 "ASPEED Technology AST1150 PCI" rev 0x03
> pci8 at ppb6 bus 7
> vga1 at pci8 dev 0 function 0 "ASPEED Technology AST2000" rev 0x30
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> "Intel C610 USB" rev 0x05 at pci1 dev 29 function 0 not configured
> pcib0 at pci1 dev 31 function 0 "Intel C610 LPC" rev 0x05
> ahci0 at pci1 dev 31 function 2 "Intel C610 AHCI" rev 0x05: msi, AHCI 1.3
> ahci0: port 0: 6.0Gb/s
> ahci0: port 1: 6.0Gb/s
> scsibus1 at ahci0: 32 targets
> sd0 at scsibus1 targ 0 lun 0: <ATA, INTEL SSDSC2KB03, XCV1> 
> naa.55cd2e4155354a37
> sd0: 3662830MB, 512 bytes/sector, 7501476528 sectors, thin
> sd1 at scsibus1 targ 1 lun 0: <ATA, INTEL SSDSC2KB03, XCV1> 
> naa.55cd2e4155354a2b
> sd1: 3662830MB, 512 bytes/sector, 7501476528 sectors, thin
> ichiic0 at pci1 dev 31 function 3 "Intel C610 SMBus" rev 0x05: apic 1 int 18
> iic0 at ichiic0
> pchtemp0 at pci1 dev 31 function 6 "Intel C610 Thermal" rev 0x05
> isa0 at pcib0
> isadma0 at isa0
> com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> vmm0 at mainbus0: VMX/EPT
> enable mbufs in high memory
> uhub1 at uhub0 port 14 configuration 1 interface 0 "ATEN International 
> product 0x7000" rev 2.00/0.00 addr 2
> uhidev0 at uhub1 port 1 configuration 1 interface 0 "ATEN International 
> product 0x2419" rev 1.10/1.00 addr 3
> uhidev0: iclass 3/1
> ukbd0 at uhidev0
> wskbd0 at ukbd0: console keyboard, using wsdisplay0
> uhidev1 at uhub1 port 1 configuration 1 interface 1 "ATEN International 
> product 0x2419" rev 1.10/1.00 addr 3
> uhidev1: iclass 3/1
> ums0 at uhidev1: 3 buttons, Z dir
> wsmouse0 at ums0 mux 0
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> sd2 at scsibus3 targ 1 lun 0: <OPENBSD, SR RAID 1, 006>
> sd2: 30725MB, 512 bytes/sector, 62926013 sectors
> sd3 at scsibus3 targ 2 lun 0: <OPENBSD, SR RAID 0, 006>
> sd3: 7264208MB, 512 bytes/sector, 14877098752 sectors
> root on sd2a (06f462fc41cffdbe.a) swap on sd2b dump on sd2b
> 
> > 
> >    -Otto
> > 
> > On Mon, Sep 21, 2026 at 02:36:39PM -0400, [email protected] wrote:
> > 
> >>> Synopsis:    ftpd fails to munmap on premature data socket disconnect 
> >>> inside send_data
> >>> Category:    system
> >>> Environment:
> >>    System      : OpenBSD 8.0
> >>    Details     : OpenBSD 8.0-beta (PU.MP) #188: Thu Sep 10 07:29:06 EDT 
> >> 2026
> >>             
> >> [email protected]:/home/brian/sys/arch/amd64/compile/PU.MP
> >> 
> >>    Architecture: OpenBSD.amd64
> >>    Machine     : amd64
> >>> Description:
> >>    I witnessed a scenario where a user was downloading the majority of my 
> >> mirror using FTP with ~15 simultaneous connections.  Normally this would 
> >> not be a problem except this user was disconnecting the data socket 
> >> prematurely for whatever reason.
> >>    Because SIGPIPE is wired up in ftpd, the send_data function never gets 
> >> to munmap.  This lead to a scenario where I had ~57 GB of inactive memory 
> >> used.  The inactive memory reduced the available memory for the UVM file 
> >> cache which caused unnecessary disk I/O.
> >>    Restarting ftpd did not release the inactive memory.  The only solution 
> >> was to reboot the server or write a small program to malloc ~70 GB of 
> >> memory which was large enough to eat through the free and inactive memory. 
> >>  A third solution, which is not viable
> >>    for obvious reasons, would be to delete the files.  It is worth noting 
> >> that login classes cannot prevent the ballooning.
> >>> How-To-Repeat:
> >>    Initiate an FTP download of a small file (under 16 MB) and disconnect 
> >> the data socket before the download finishes.  Do this repeatedly across 
> >> many unique files until you witness the inactive memory balloon.
> >>    Here is a simple program that calls mmap and does not munmap.  When 
> >> this program exits, the inactive memory will remain.  This is normally not 
> >> an issue except it does block UVM file cache from growing which causes 
> >> unnecessary disk I/O.  Delete the data
> >>    directory to return the inactive memory to the free bucket.
> >> 
> >> // mkdir data; for i in `seq 0 4095`; do dd if=/dev/urandom 
> >> of=data/test$i.txt bs=1m count=2; done
> >> 
> >> #include <sys/stat.h>
> >> #include <sys/mman.h>
> >> #include <stdio.h>
> 

Reply via email to