nwbind memory leak in mars_nwe-0.99pl0?

nwbind memory leak in mars_nwe-0.99pl0?

Post by Kendall S Hunt » Wed, 13 Aug 1997 04:00:00



Thanks go to Emmanuelle et Philippe and Claus-Peter Knaut who recently
helped me get mars_nwe properly configured for my machine. I can now share
and print files from  W95.

However, I've noticed what I think is a problem. The nwbind process starts
using about 3200KB of memory; as time goes on, however, it begins using more
and more and more; right now, 4hr 30min after the process was started, ps
reports a RSS of 9800KB.

Two days ago I left the daemon running for a whole day, and found it was
using 26M, with a Virtual image size of 31M!

I feel that this is abnormal behaviour... I'm not much of a C programmer
(Fortran is my game, sorry) so I'm uncertain I can help in tracking this
problem, if indeed it needs tracking - but if anyone has advice on what
to look for, I'm game.

PS - in the time it took me to write from '9800' to here, nwbind has grown
to 9956KB.

Kendall Hunter
University of Colorado

 
 
 

nwbind memory leak in mars_nwe-0.99pl0?

Post by Ian Cla » Tue, 19 Aug 1997 04:00:00



: Thanks go to Emmanuelle et Philippe and Claus-Peter Knaut who recently
: helped me get mars_nwe properly configured for my machine. I can now share
: and print files from  W95.

: However, I've noticed what I think is a problem. The nwbind process starts
: using about 3200KB of memory; as time goes on, however, it begins using more
: and more and more; right now, 4hr 30min after the process was started, ps
: reports a RSS of 9800KB.

: Two days ago I left the daemon running for a whole day, and found it was
: using 26M, with a Virtual image size of 31M!

: I feel that this is abnormal behaviour... I'm not much of a C programmer
: (Fortran is my game, sorry) so I'm uncertain I can help in tracking this
: problem, if indeed it needs tracking - but if anyone has advice on what
: to look for, I'm game.

: PS - in the time it took me to write from '9800' to here, nwbind has grown
: to 9956KB.

I run mars_nwe (revision date of nwbind 12 July 1996)here.  My max uptime is
about 80 days with no problems (circuit breaker blew!).
Here is an extract from 'top' on my machine (a 486SX-66 with 10M memory, 2.0.6).
As the load average show it doesn't get a huge amount of use, but nwe is
used for file sharing and printing from win 3.1

 12:39pm  up 14 days, 23:31,  2 users,  load average: 0.00, 0.03, 0.02
45 processes: 44 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  3.7% user,  5.3% system,  9.0% nice, 91.0% idle

  PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
 1555 root       0   0   680  616   300 S       0  0.0  5.6   0:05 nwbind
 1554 root       0   0   560  520   268 S       0  0.0  4.7   0:01 nwserv
 1556 root       0   0   436  400   168 S       0  0.0  3.6   0:20 ncpserv

 --


 
 
 

1. memory leaks by shared memory and fork

Hi,

i've a problem with a server-program. It consums memory and never release
the memory. Even if i kill the program the memory never comes back.

When the program starts, it allocate a bunch of RPC-client connections, and
stores them in an shared-mem region (created with mmap() PROT_READ |
PROT_WRITE, MAP_SHARED | MAP_ANON ).
When my program receives an RPC-call it calls fork(), the child takes one of
the free connections from the pool, mark it as busy, and route the RPC via
the connection to another server.
Before the child process terminates (via exit() ) it marks the connection as
free.
The parent process runs in an loop, and waits for new RPC-calls or SIGCHLD
when a child terminates.

That what makes me "unhappy" is, that every fork consum 4kb, and the memory
is never released. There is no malloc (new) after the fork.
The child only read/write the mmap-memory.
There is only a special handling for broken RPC-connections. Then the server
(in the child process) replace the broken connection with a new one. But
this happens very rare.

Has anyone a good idea whats the reason for this behavior?

Okay, the system is a RH8.0 standard installation. Nothing is patched or
changed.
I get the same results on RH7.2 or SuSE 7.3. Under Solaris 9 happens nothing
and the program works as designed!

best regards
Joerg

2. Accessing Process Control Block (PCB) in Digital UNIX 4.0D (SVR4)

3. Sun workshop memory monitor does not detect all memory leak

4. logging all command lines

5. 64bit solaris 2.8 memory name resolution memory leak?

6. file

7. How can I recover memory from a memory leak

8. Can't get rid of printer banner pages

9. mm/memory.c, 2.4.1 : memory leak with swap cache (updated)

10. How to find out the memory size used by a process or check its memory leaking?

11. MARS_NWE cannot mount real Novell-Server when running MARS_NWE

12. Question on mars_nwe-0.99pl4 w/RH5.0 & glibc

13. Memory Leaking. Help!