memory leak... tricky



Hello:

I just upgraded a server from fedora-core-2 to red-hat-enterprise-5
and am experiencing a rather bizarre memory leak with one of my
processes. When the process is running, the total 'memory used' (as
seen by top) keeps on going up, BUT what's rather interesting is that
the memory related to this particular process is not changing (I've
looked at VIRT, RES, SHR, SWAP,CODE,DATA). I'm pretty sure the problem
is related to this particular process, because if/when I shut it down,
the 'total memory used' stays fairly constant. If I leave the process
running, eventually the system runs out of memory and needs to be
restarted.

The same binary works fine on the fc2 server.

The issues are:

* why is the memory of the process not increasing? but yet the 'total
memory used' is?

* could this be related to the different versions of the libs that the
code is linking against (see below)?

* what do i do next, given that I need this code operational. I
suppose copying libs over from old to new server might be an option? I
can note that did use valgrind to try to see what's going on, and did
end up with a few errors - but they're the same regarding weather
running on fc2 or on rhel5.

Here is some info regarding lib versions that are used:

oldHost (fc2 - working fine):
----------------------------

ldd process info:
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x009d6000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x001de000)
libm.so.6 => /lib/tls/libm.so.6 (0x0080b000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x001d4000)
libc.so.6 => /lib/tls/libc.so.6 (0x006e7000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x006ce000)

ls -la /lib/tls/libpthread.so.0
lrwxrwxrwx 1 root root 18 Nov 12 2004 /lib/tls/libpthread.so.0 ->
libpthread-0.61.so
ls -la /usr/lib/libstdc++.so.5
lrwxrwxrwx 1 root root 18 Nov 9 2004 /usr/lib/libstdc++.so.5 ->
libstdc++.so.5.0.5
ls -la /lib/tls/libm.so.6
lrwxrwxrwx 1 root root 13 Nov 12 2004 /lib/tls/libm.so.6 ->
libm-2.3.3.so
ls -la /lib/libgcc_s.so.1
lrwxrwxrwx 1 root root 28 Nov 9 2004 /lib/libgcc_s.so.1 ->
libgcc_s-3.3.3-20040413.so.1
ls -la /lib/tls/libc.so.6
lrwxrwxrwx 1 root root 13 Nov 12 2004 /lib/tls/libc.so.6 ->
libc-2.3.3.so
ls -la /lib/ld-linux.so.2
lrwxrwxrwx 1 root root 11 Nov 12 2004 /lib/ld-linux.so.2 ->
ld-2.3.3.so

newHost (rhel5 - memory leaking):
----------------------------------

ldd process info:
linux-gate.so.1 => (0x00ed4000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00405000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00cea000)
libm.so.6 => /lib/libm.so.6 (0x003d6000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00765000)
libc.so.6 => /lib/libc.so.6 (0x00297000)
/lib/ld-linux.so.2 (0x00275000)


ls -la /lib/libpthread.so.0
lrwxrwxrwx 1 root root 17 May 7 07:12 /lib/libpthread.so.0 ->
libpthread-2.5.so
ls -la /usr/lib/libstdc++.so.5
lrwxrwxrwx 1 root root 18 May 7 07:18 /usr/lib/libstdc++.so.5 ->
libstdc++.so.5.0.7
ls -la /lib/libm.so.6
lrwxrwxrwx 1 root root 11 May 7 07:12 /lib/libm.so.6 -> libm-2.5.so
ls -lka /lib/libgcc_s.so.1
lrwxrwxrwx 1 root root 1 May 7 07:12 /lib/libgcc_s.so.1 ->
libgcc_s-4.1.1-20070105.so.1
ls -la /lib/libc.so.6
lrwxrwxrwx 1 root root 11 May 7 07:12 /lib/libc.so.6 -> libc-2.5.so
ls -la /lib/ld-linux.so.2
lrwxrwxrwx 1 root root 9 May 7 07:12 /lib/ld-linux.so.2 -> ld-2.5.so


thank you.

.



Relevant Pages

  • Re: Release: ExtraFunc49+ v0.88
    ... I was trying to calculate the fifth Fibonacci number, ... though, as all memory allocation is dynamic, hence too little memory ... I've only just got the calculator and haven't had much time to use it much, although I have been installing my favourite libs over the past few days. ... Try reinstalling the toolbox. ...
    (comp.sys.hp48)
  • Re: GPL encumbrance problems
    ... Dynamic linking and virtual memory are real ... Actually I do embedded development for a living. ... dynamically linked, because once you have multiple apps running, running ... them all with static linked libs is stupidly wasteful of memory. ...
    (Fedora)
  • Re: SpamAssassin/Perl eating enormous amounts of memory?
    ... I've had similar memory problems using Hyperestraier to index ... with GCC. ... LIBS = libmalloc.a libcppmalloc.a ... ranlib $/libcppmalloc.a ...
    (freebsd-questions)
  • Re: Clear the computers memory?
    ... used on a day to day basis in terms of memory wastage. ... I don't understand how closing Firefox can give me back 200MB ... The reason is shared memory and libs. ... job of reclaiming that memory. ...
    (Ubuntu)
  • Usinf USB memory sticks in VMWARE 4.5.2
    ... I have vmware-4.5.2 running under FC2, my guest OS is ... But I have problems to access the memory stick under WinXP: It is not shown as a drive. ...
    (Fedora)