Vjeran Marcinko wrote:
And here I go ...
Linux is Debian v3, with kernel 2.4.20, and jdk is 1.4.1_01
I don't have any native calls in my classes using
> Runtime (btw. I found some zombie problems on the web using
> that class).
And symptoms of my problem if anyone is interested :
This zombie behaviour don't disrupt my app or OS since it
> occures just few times per day in following fashion - all of
> my app's threads function properly, but one zombie thread
> keeps appearing and dissapearing ?! It didn't impose any
> problems, but nonetheless I would like to get rid of it ..

I believe that's indeed the JVMs garbage collector. Nothing you can do about that in your code (or in avalon code), except watch for it and restart when you find one. I think. Not sure. Just guessing. Maybe running a testcase which creates and destroys lots of objects and calls System.gc() will get you some more info, ie, something like

testGC()
{
int num = 10000;
long pause = 10000; // millis

System.out.println( "Creating " + num + " integer classes" );

Object[] list = new Object[num];

for( int i = 0; i < num; i++ )
{
  list[i] = new Integer( i );
}

System.out.println( "now sleeping for " + pause + "milliseconds" );
Thread.sleep( pause );

System.out.println( "dereferencing " + num + " integer classes" );

for( int i = 0; i < num; i++ )
{
  list[i] = null;
}
list = null;

System.out.println( "Now calling System.gc()" );
System.gc();

System.out.println( "now sleeping for " + pause + "milliseconds" );
Thread.sleep( pause );

System.out.println( "end of testGC()" );
}

(untested code). You could also try adding code like this somewhere in your actual application. If you get more zombie processes, you can assume it is the garbage collector :D

I found several reports on the web related to this, but nothing very informative.

For example, Costin (one of the tomcat hackers) writes @ http://www.webweavertech.com/costin/archives/cat_java.html:

"To recap: under load I got java "defunct processes" ( zombies ). I suspect this is related with the garbage collection and memory management, and of course a certain combination of libraries. I did try different kernels and glibc - including the exact same combination that works without problem on my other computer. Right now the only thing I can do is get the sources ( I remember they were available under scsl ) and see what's happening. A "clean" system works just fine, it is something I did or installed that created the problem - and no amount of reinstalling or checking libraries solved that."


my crappy advice: if it doesn't cause any problems, live with it.


- Leo



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to