Newsgroups: comp.parallel.pvm
From: roman@parsys.co.uk (Roman Souljik)
Subject: pvmd3 eats memory
Keywords: Porting PVM, pvmd
Organization: Parsys Engineering Limited
Date: 11 Aug 1994 16:05:36 GMT
Message-ID: <32di8g$95s@marble.Britain.EU.net>

Hello

I am porting pvm3.3 & xpvm to a transputer system based on T800s (IDRIS operating
system, Sys V & BSD mix). Anyway, at the moment I do have pvm3.3 and xpvm1.0 
(pathed 1,2 &3) working happily, but it still does crash sometime.

The problem is that pvmd3 doesn't seem to be cleaning up after processes 
properly - i.e I suspect that it doesn't free all the message buffers it
allocates. Maybe it's something else, I'm not sure. Pvm only started working
properly a couple days ago, and I've only discovered this today, so I haven't 
debugged these crashes yet.

Anybody else had this problem? Under IDRIS, the memory management is next to 
nothing - there are no hardware memory protection, etc, so applications do have 
to be extra careful. Also, the heap/stack for each executable is specified 
at load time, so it is easy for a program to run out of heap if it doesn't free
allocated memory properly.

The symptoms : I allocate pvmd3 stack/heap of 2 megabytes. It runs happily. 
The I spawn a task which spawns another one & exits. The heap is reduced to 1.8M.
Next run it's reduced to 1.6M. And so on - until there's no heap left. 
Spectacular crash follows.

The problem may exist on other systems as well, it's just that you wouldn't notice
it if the OS has proper memory management - every time the process runs out of
heap, setbrk() would be called & more allocated. It doesn't happen on IDRIS.

Any help / ideas would be appreciated.

Thanks.

Roman. 

