View Single Post

   
  #4 (permalink)  
Old 01-05-2008, 11:15 AM
Paul Pluzhnikov
 
Posts: n/a
Default Re: Spurious segv's and malloc catastrophe

jimwgramling@gmail.com writes:

> Am I right in the following assumption: if I shut down every instance
> of the particular application, shouldn't the allocated heap be
> released, unless it is a shared memory segment or data segments
> associated with a shared library held open by some other app?


Heap is not shared between processes; shutting down one instance of
a particular application has no effect on any other instances of it.

But SYSV shared memory is another story -- shutting down *all*
instances of apps using it doesn't clean shared memory.

> I ask
> this, because I have tracked down the most likely culprit to a
> particular shared library, which is linked both to the client app as
> well as the server app. Even after shutting down all client apps, the
> problem continued after restarting the executable. But once I shut
> down the server, and released the shared library (as verified with
> genkld), the problem disappeared.


Perhaps the server "voluntarily" cleans up shared memory (if it
even uses shared memory).

You can run "ipcs" before and after starting the server -- any new
shared memory segments indicate that the server does use shared
memory.

> I am somewhat at a loss at how to proceed. The shared library is part
> of a proprietary commercial software package.


That's tough. You could plead with the vendor to provide you a
debugging version of that library.

> Right now, I'm hoping for some inspiration, or a lucky break!


Lucky break always helps :-)

Cheres,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Reply With Quote