Repost: Help! JRockit hangs on my Linux!
By Henrik Stahl on Sep 10, 2008
Originally posted 8/14 2006 on http://dev2dev.bea.com/blogs/hstahl, reposted on request.
We sometimes get bug reports from users who are having issues with JRockit on a Linux distribution that we do not support officially, such as Debian, Ubuntu or Fedora Core. Sometimes - in particular when JRockit hangs intermittently - the cause is a broken OS. Here are two things you can do to check your Linux installation.
1. Verify that you are using the NPTL threading library
Before the 2.6 kernel, most Linux distributions used the old pthreads library. We have seen a number of issues with this over the years. To check your kernel version:
hstahl@sthx6421:~> cat /proc/version
Linux version 2.6.5-7.244-smp (geeko@buildhost) (gcc version 3.3.3 (SuSE Linux)) #1 SMP Mon Dec 12 18:32:25 UTC 2005
In this case, the kernel is 2.6.5. Anything based on 2.6 or later uses NPTL (plus the 2.4-based kernel in Red Hat EL 3.0, but that's a special case)
Also, make sure that you are not setting the LD_ASSUME_KERNEL environment variable!
2. Verify that your distribution handles signals correctly
JRockit uses OS signals to suspend and resume Java threads. Unfortunately, this sometimes exposes bugs in the underlying OS, causing the JRockit process to hang (or crash).
To check your Linux installation; download this small C program, compile and run it on your computer following the instructions in the source code. If the program hangs or crashes, then you most likely have a broken kernel and/or glibc. Try updating your OS to a later build/patch level/service pack and rerun. If you still have an issue, please report it to the appropriate vendor and/or community.
If the test program fails, then you will see intermittent JRockit hangs and/or crashes on your platform. It may take days or weeks, but it will happen eventually.
Note that we have for the past two years or so run this program or similar tests on all OSes we support, and we always make sure such OS bugs are fixed before we add it to our list of supported configurations, so if you are using one of those then you should be safe.