NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/54988: possible memory leaks/swap problems



mlh wrote:
> MLH wrote:
> > The following reply was made to PR port-amd64/54988; it has been noted by GNATS.
> >  
> >  Any idea on what is preventing the memory from being released and
> >  why it just locks up?
...
> though there still appear
> to be memory alloc/dealloc and swap issues because I have to reboot
> at least once a day when phymem is exhausted and the system becomes
> unusable due to severe swapping. This is when basically nothing is
> still running and disc cache is only taking up a tiny bit of phymem
> and only a tiny bit of swap appears to be in use.

Example - reboot, run one console without X, cvs up -current and
build a -current distribution. Results in basically a nonworking
system since there is only a few tens of Mbytes of ram available
for the system to run in. Less than 25 basic processes running
after the build and none of them are really active.

NetBSD 9.99.48 Sat Mar  7 11:19:02 EST 2020 amd64

[     1.000000] total memory = 4079 MB
[     1.000000] avail memory = 3933 MB
[     1.000000] sysctl_createv: sysctl_locate(maxtypenum) returned 2
[     1.000000] pool redzone disabled for 'buf4k'
[     1.000000] pool redzone disabled for 'buf64k'
[     1.000000] timecounter: Timecounters tick every 10.000 msec
[     1.000000] Kernelized RAIDframe activated
[     1.000000] running cgd selftest aes-xts-256 aes-xts-512 done
[     1.000000] timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
[     1.000003] Gigabyte Technology Co., Ltd. H61M-S2-B3 ( )
[     1.000003] mainbus0 (root)
[     1.000003] ACPI: RSDP 0x00000000000F6EA0 000014 (v00 GBT   )
[     1.000003] ACPI: RSDT 0x00000000DF7D3040 00004C (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
[     1.000003] ACPI: FACP 0x00000000DF7D3100 000074 (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
[     1.000003] ACPI: DSDT 0x00000000DF7D31C0 0049F2 (v01 GBT    GBTUACPI 00001000 MSFT 04000000)
[     1.000003] ACPI: FACS 0x00000000DF7D0000 000040
[     1.000003] ACPI: MSDM 0x00000000DF7D7D00 000055 (v03 GBT    GBTUACPI 42302E31 GBTU 01010101)
[     1.000003] ACPI: HPET 0x00000000DF7D7DC0 000038 (v01 GBT    GBTUACPI 42302E31 GBTU 00000098)
[     1.000003] ACPI: MCFG 0x00000000DF7D7E40 00003C (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
[     1.000003] ACPI: ASPT 0x00000000DF7D7F00 000034 (v07 GBT    PerfTune 312E3042 UTBG 01010101)
[     1.000003] ACPI: SSPT 0x00000000DF7D7F40 002270 (v01 GBT    SsptHead 312E3042 UTBG 01010101)
[     1.000003] ACPI: EUDS 0x00000000DF7DA1B0 0000C0 (v01 GBT             00000000      00000000)
[     1.000003] ACPI: TAMG 0x00000000DF7DA270 000382 (v01 GBT    GBT   B0 5455312E BG?? 45240101)
[     1.000003] ACPI: APIC 0x00000000DF7D7C00 0000BC (v01 GBT    GBTUACPI 42302E31 GBTU 01010101)
[     1.000003] ACPI: SSDT 0x00000000DF7DA600 001EC8 (v01 INTEL  PPM RCM  80000001 INTL 20061109)
[     1.000003] ACPI: 2 ACPI AML tables successfully acquired and loaded
[     1.000003] ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 0x20, 24 pins
[     1.000003] cpu0 at mainbus0 apid 0
[     1.000003] cpu0: Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz, id 0x206a7
[     1.000003] cpu0: node 0, package 0, core 0, smt 0
[     1.000003] cpu1 at mainbus0 apid 2
[     1.000003] cpu1: Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz, id 0x206a7
[     1.000003] cpu1: node 0, package 0, core 1, smt 0
[     1.000003] cpu2 at mainbus0 apid 1
[     1.000003] cpu2: Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz, id 0x206a7
[     1.000003] cpu2: node 0, package 0, core 0, smt 1
[     1.000003] cpu3 at mainbus0 apid 3
[     1.000003] cpu3: Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz, id 0x206a7
[     1.000003] cpu3: node 0, package 0, core 1, smt 1

$ vmstat
 procs    memory      page                       disks   faults      cpu
 r b      avm    fre  flt  re  pi   po   fr   sr w0 w1   in   sy  cs us sy id
 0 0    89556 3809396 1605  0   0    0    0    0 68 37  146 3059 360  0  1 99
$ cd /usr/xsrc
$ cvs up
...
$ cd /usr/src
$ cvs up
...
$ /usr/src/build.sh -j2 -x -r -U -u -m amd64 -D /opt/obj/amd64/build -M /opt/obj/amd64 -T /opt/obj/amd64/tools -R /opt/build/9 tools release install-image
...

finish - taking almost 6 hours, about twice as long as typical
likely due to thrashing

$ vmstat 
 procs    memory      page                       disks   faults      cpu
 r b      avm    fre  flt  re  pi   po   fr   sr w0 w1   in   sy  cs us sy id
 1 0   535932  17812 16003  7   4   12  330  375  7 46  255 15441 1525 13 4 84

So the system is down to less than 20M of phymem and never recovers
much more than maybe 10M of it. Have to reboot to reclaim a workable
system, so I have to reboot 2-3 times a day to do much of any work.



Home | Main Index | Thread Index | Old Index