Well I have a java program written under Windows and it works well. Basically it’s algorithm related and during the time it’s running it usually consumes almost full CPU capacity, which is normal.
However under MacOS it always gets stuck at some particular point where there is a large amount of data and memory consumption reaches at about 240M. The program is still running but doesn’t move on. The memory is not released but the CPU usage drops to 0. I don’t know what this exactly means and I have no idea what’s going on.
Sorry I can’t provide the code piece since this is not a problem regarding specific part of the code. Anybody who is familiar with JVM can give some hints/advice?
First thing I would do is to take a thread dump and find out who is doing what. You can issue a
kill -3to obtain a thread dump, or you could also hook-up a profiler. For details, please see this answer: Thread Dump Analysis Tool / MethodYou might want to post the thread dump here if you have trouble figuring on what is going on.
My wild guess is be a concurrency bug, like a dead lock but we’ll have to see the thread dump!