RMI server crashing the Virtual Machine
843793Dec 8 2002 — edited Dec 11 2002I am writing an enterprise RMI service at work and it has been crashing at seemingly random points and in-frequently. It is not actually crashing as such, because I have added a shutdown hook and that is getting called before it exits. I know for sure that it is not a system.exit() call because I have prevented all system.exit() calls in the security manager. I also have put in very tight memory management and an extended heap so I don't think its a memory issue either. Frequent calls to freeMemory() show that there is no memory leakage and that everything seems to be being cleaned up correctly.
I am using the IBM 1.3 virtual machine on a linux box for the server and thus the calls to the garbage collector are working nicely and when requested.
The crashing is happening at seemingly random points and I have covered all my public methods with try....catch blocks that catch Throwable, and it doesn't seem to be an exception. Code that 19 out of 20 times will run fine, crashes on the 20th run etc.
What I am wondering is - has anyone had similar problems and do you know how to fix it?
My other thought is that perhaps it is a problem with the IBM virtual machine, and I am thus going to try running things through the Sun 1.3 virtual machine to see if I get any different results.
Any insights or help from people developing similar services would be greatly appreciated (this is the first RMI service I have implemented).