2

I have a machine that leaks memory (even after an application restart) - two machines run similar applications with similar workloads, slightly different kernel revisions of 4.x

The noticeable difference is that the total (from /proc/meminfo) of Active(file)+Inactive(file)+shmem compared to Cached+Buffer is different for the bad machine and the same for the good (and other) machines.

Should these values be the same? Does this look like a kernel bug/leak?

More detail... /proc/meminfo (converted to MB)

 Bad m   Good m        
 48042    48042    mB    MemTotal:
   376      495    mB    MemFree:
 25904    26086    mB    MemAvailable:
     0        0    mB    Buffers:
  3589    11034    mB    Cached:
    29       69    mB    SwapCached:
 31825    24374    mB    Active:
 14010     5505    mB    Inactive:
 19263    19191    mB    Active(anon):
  1889     2090    mB    Inactive(anon):
 12561     5183    mB    Active(file):
 12121     3414    mB    Inactive(file):
   655     2436    mB    Shmem:

Some Calculations...

  4877    28240    mB    Cache+Slab                    Mem:buffer/cache
 42788    19307    mB    MemTotal-MemFree-Cached-Slab  Mem:used         

 25338    11034    mB    Active(file)+Inactive(file)+shmem
  3589    11034    mB    Cached
-21750        0    mB    diff

Further investigation finds that if something like this script is run (on the bad kernel only), it will cause the discrepancy to increase until free is around zero, then remains at equilibrium:

#!/bin/ksh

while true
do
  X=`/bin/echo 1`
done
  • Bad machine linux kernel = 4.1.12-112.14.11.el7uek.x86_64 #2 SMP Thu Jan 11 21:00:18 PST 2018 x86_64 x86_64 x86_64 GNU/Linux – PaulS May 27 at 4:23
  • Good machine linux kernel = 4.1.12-61.1.16.el7uek.x86_64 #2 SMP Fri Oct 21 14:23:20 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux – PaulS May 27 at 4:25
  • This is still "leaking" with the latest UEK4 series of kernels (only days old) = 4.1.12-124.28.1.el7uek.x86_64 #2 SMP Mon Jun 3 14:09:53 PDT 2019 x86_64 x86_64 x86_64 GNU/Linux – PaulS Jun 6 at 23:00
  • (Unbreakable Kernels are broken) – PaulS Jun 7 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.