Bug 242750 - Thread problem when running java, Sun JDK 1.6.x or IBM JDK 1.5.x
Thread problem when running java, Sun JDK 1.6.x or IBM JDK 1.5.x
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.5
i386 Linux
low Severity urgent
: ---
: ---
Assigned To: Red Hat Kernel Manager
Martin Jenner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-05 12:43 EDT by Uno Engborg
Modified: 2007-11-16 20:14 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-12 15:57:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Uno Engborg 2007-06-05 12:43:22 EDT
Description of problem:

There seam to be some kind threading problem in RHEL 4.5 that affects java. My
guss is that this is somehow related to some kind of kernel problem. So far it
seams that it only affects multiprocessor systems. I have tested it on Intel
Woodcrest processor.


How reproducible:
Very. The error seam to occur within a few minutes if you try to run things like
the admin interface of fedora-ds, and immediately if you try to run glassfish or
 the Sun supported Sun Java Application Server.


Steps to Reproduce:
1. Install Sun JDK1.6 build 1.6.0_01-b06)
2. Install Sun Glassfish
3. Start glassfish (asadmin start-appserv) and use a webbrowser to visit
http://localhost:4848
  
Actual results:
No page shows up


Expected results:
A login page for the admin glassfish interface should have show up.
Instead you get nothing


Additional info:
Another program that seam to be affected by this is the admin interface of
fedora directory server.
Comment 1 Ernie Petrides 2007-06-08 18:21:46 EDT
Please provide specific URLs showing where I can download Sun
JDK1.6, Sun Glassfish, and Fedora Directory Server from.  (I
have a stock RHEL4.5 installation, which has none of these.)

If you could provide an isolated reproducer program that shows
why you think this is a kernel problem, that would be even better.

Thanks in advance.
Comment 2 Uno Engborg 2007-06-19 19:16:13 EDT
You find fedora-ds
at:http://directory.fedoraproject.org/download/fedora-ds-1.0.4-1.RHEL4.i386.opt.rpm

Glssfish can be downloaded from:
https://glassfish.dev.java.net/public/downloadsindex.html
Then follow the GlassFish V1 UR1 P01 link to get the latest stable release.


I also have found a work around for this problem.
If I edit the startup scripts for the programs above so that java is started
with -Xrs option (that reduce use ofOS signaling things works fine).

Comment 3 Ernie Petrides 2007-06-20 19:12:19 EDT
I installed the x86_64 version of the Fedora Directory Server (based on the
URL in the prior comment) and took all the default values (besides passwords)
when running the /opt/fedora-ds/setup/setup script (as instructed).  I then
ran the "startconsole" script (as instructed) as follows:

  ./startconsole -u admin -a http://pesto.boston.redhat.com:39525/

But it produced the following errors:

  pesto 26# cd /opt/fedora-ds

  pesto 27# ls
  LICENSE.txt  alias    dist     lib      restart-admin  slapd-pesto  stop-admin
  README.txt   bin      httpacl  manual   setup          start-admin  uninstall
  admin-serv   clients  java     plugins  shared         startconsole

  pesto 28# ./startconsole -u admin -a http://pesto.boston.redhat.com:39525/
  Warning: -ms8m not understood. Ignoring.
  Warning: -mx64m not understood. Ignoring.
  Exception in thread "GtkMain" java.lang.UnsatisfiedLinkError: gtkInit
     at _Jv_LookupJNIMethod (/usr/lib64/libgcj.so.5.0.0)
     at _Jv_JNIMethod.call(ffi_cif, void, ffi_raw, void) (/usr/lib64/libgcj.so.\
  5.0.0)
     at gnu.java.awt.peer.gtk.GtkMainThread.run() (Unknown Source)
     at java.lang.Thread.run() (/usr/lib64/libgcj.so.5.0.0)
     at _Jv_ThreadRun(java.lang.Thread) (/usr/lib64/libgcj.so.5.0.0)
     at GC_start_routine (/usr/lib64/libgcj.so.5.0.0)
     at __clone (/lib64/tls/libc-2.3.4.so)

There was no further output in that window (but I could later ^C it).

Then in another window, I tried running "start-admin" from /opt/fedora-ds,
but it simply came back with a prompt and no admin interface came up.  I
don't know if these problems exist under i386.  But without further info,
I don't know how to reproduce the reported problem.


I also looked at the GlassFish download page specified in the prior comment,
but it clearly indicates that JDK 5 is required, which contradicts the method
to reproduce the problem in the original description of this bug report (which
listed JDK 1.6 as the relevant version).

Were you using JDK 5 as required?  And if so, from what URL can I download it?


I could reinstall my i386 test machine if necessary, but it would be easier for
me to work with x86_64 (since that test machine is already running RHEL4.5).
Comment 4 Uno Engborg 2007-06-21 07:05:36 EDT
(In reply to comment #3)
> I installed the x86_64 version of the Fedora Directory Server (based on the
> URL in the prior comment) and took all the default values (besides passwords)
> when running the /opt/fedora-ds/setup/setup script (as instructed).  I then
> ran the "startconsole" script (as instructed) as follows:
> 
>   ./startconsole -u admin -a http://pesto.boston.redhat.com:39525/
> 
> But it produced the following errors:
> 
>   pesto 26# cd /opt/fedora-ds
> 
>   pesto 27# ls
>   LICENSE.txt  alias    dist     lib      restart-admin  slapd-pesto  stop-admin
>   README.txt   bin      httpacl  manual   setup          start-admin  uninstall
>   admin-serv   clients  java     plugins  shared         startconsole
> 
>   pesto 28# ./startconsole -u admin -a http://pesto.boston.redhat.com:39525/
>   Warning: -ms8m not understood. Ignoring.
>   Warning: -mx64m not understood. Ignoring.
>   Exception in thread "GtkMain" java.lang.UnsatisfiedLinkError: gtkInit
>      at _Jv_LookupJNIMethod (/usr/lib64/libgcj.so.5.0.0)
>      at _Jv_JNIMethod.call(ffi_cif, void, ffi_raw, void) (/usr/lib64/libgcj.so.\
>   5.0.0)
>      at gnu.java.awt.peer.gtk.GtkMainThread.run() (Unknown Source)
>      at java.lang.Thread.run() (/usr/lib64/libgcj.so.5.0.0)
>      at _Jv_ThreadRun(java.lang.Thread) (/usr/lib64/libgcj.so.5.0.0)
>      at GC_start_routine (/usr/lib64/libgcj.so.5.0.0)
>      at __clone (/lib64/tls/libc-2.3.4.so)
> 
> There was no further output in that window (but I could later ^C it).
> 
> Then in another window, I tried running "start-admin" from /opt/fedora-ds,
> but it simply came back with a prompt and no admin interface came up.  I
> don't know if these problems exist under i386.  But without further info,
> I don't know how to reproduce the reported problem.
> 
> 
> I also looked at the GlassFish download page specified in the prior comment,
> but it clearly indicates that JDK 5 is required, which contradicts the method
> to reproduce the problem in the original description of this bug report (which
> listed JDK 1.6 as the relevant version).
> 
> Were you using JDK 5 as required?  And if so, from what URL can I download it?
> 
> 
> I could reinstall my i386 test machine if necessary, but it would be easier for
> me to work with x86_64 (since that test machine is already running RHEL4.5).
> 

Your error output, indicates that you somehow are using libgcj. This will most
likely not work. You would need to link with Sun libraries instead. If I my
memory doesn't fails me the only thing you need to to is to make sure that the
Sun java is listed before the Red Hat Java in the PATH, and the Sun JDK will
find the right libs automagically without any alterations of ld.so.conf or
LD_LIBRARYPATH.

I have tested this with various version of Sun and IBM JDK1.5, and various
versions of JDK1.6. The result is the same. It works on RHEL4.4 and on RHEL4.5
single processor systems, and fails miserably on multiprocessor systems. I have
never tested 64 bit OSes so I have no idea if that worked in RHEL4.4.

The fact that it worked on single processor systems, and that it works even on
multiprocessor systems if I use the java -Xrs flag (controls use of OS signals)
 on Sun JDK is the only reason I belive this is something kernel related.

Now some help on how to get fedora ds up and running:

first run the start-admin script.
Then run ./startconsole that should pop up a splash screen, a login prompt and a
link to the admin server.



Comment 5 Ernie Petrides 2007-06-25 19:16:49 EDT
Okay, I've switched to using an i386 test box now, and have installed a fresh
copy of RHEL4.5 (all packages).


I was finally been able to download and install the Sun Java SE Development
Kit 6 Update 1 from the following URL:

https://sdlc5e.sun.com/ECom/EComActionServlet/DownloadPage:~:com.sun.sunit.sdlc.content.DownloadPageInfo;jsessionid=...

I then put the following directory at the beginning of my $PATH:

  /usr/java/jdk1.6.0_01/bin


After downloading and installing the Fedora Directory Server from the URL
provided in comment #2, I was able to do a "startconsole" (following the
"start-admin" and interact with the admin interface.  I logged in, interacted
with various screens, jumped back and forth between the various interface
screens, but after a few minutes, I could not generate any hangs.


Then I tried to download and install Sun Glassfish starting from the URL in
comment #2.  I was unable to perform the installation as instructed, most
likely because the directions are incorrect/insufficient.  Here's what I did:

  [NOTE: "l" is aliased to "ls -CF"]

  sauce 48# set path=(/usr/java/jdk1.6.0_01/bin $path)
  [...]

  sauce 62# java -Xmx256m -jar glassfish-installer-v1_ur1-p01-b02.jar
  [...]

  sauce 65# cd glassfish
  [...]

  sauce 66# l
  3RD-PARTY-LICENSE-persistence.txt  LICENSE.txt                    imq/
  3RD-PARTY-LICENSE.txt              License_Notice_Translated.pdf  javadb/
  BinariesLicense                    README                         lib/
  CDDLv1.0.txt                       README-persistence             setup.xml
  COPYRIGHT                          docs/

  sauce 67# ant -f setup.xml
  ant: Command not found.

  sauce 68# l lib
  LauncherBootstrap.class        install/
  PLBootstrap.class              installer-builder/
  activation.jar                 j2ee-svc.jar
  addons/                        j2ee.jar
  admin-cli.jar                  javaee.jar
  ant/                           jhall.jar
  appclient/                     jmxremote_optional.jar
  appserv                        jsf-impl.jar
  appserv-admin.jar              launcher.properties
  appserv-cmp.jar                launcher.xml
  appserv-deployment-client.jar  libcliutil.so
  appserv-ext.jar                libutilforsyslog.so
  appserv-jstl.jar               mail.jar
  appserv-jwsacc.jar             modutil
  appserv-launch.jar             normalized/
  appserv-rt.jar                 package-appclient.xml
  appserv-tags.jar               pk12util
  appserv-upgrade.jar            processLauncher.properties
  appserv-ws.jar                 processLauncher.xml
  appservLauncher                schemas/
  certutil                       sun-appserv-ant.jar
  com-sun-commons-launcher.jar   toplink-essentials-agent.jar
  com-sun-commons-logging.jar    toplink-essentials.jar
  dbschema.jar                   upgrade/
  deployment/                    verifier/
  dtds/

  sauce 69# l lib/ant
  KEYS     LICENSE.dom  LICENSE.xerces  README    bin/  lib/
  LICENSE  LICENSE.sax  NOTICE          WHATSNEW  etc/  welcome.html

  sauce 70# lib/ant/ant -f setup.xml
  lib/ant/ant: Command not found.

  sauce 71# l lib/ant/bin
  ant      antRun      antenv.cmd           lcp.bat    runrc.cmd
  ant.bat  antRun.bat  complete-ant-cmd.pl  runant.pl
  ant.cmd  antRun.pl   envset.cmd           runant.py

  sauce 72# lib/ant/bin/ant -f setup.xml
  lib/ant/bin/ant: Permission denied.

  sauce 73# ls -l lib/ant/bin/ant
  -rw-r--r--  1 root petrides 8837 Jun 25 18:32 lib/ant/bin/ant

  sauce 74# file lib/ant/bin/ant
  lib/ant/bin/ant: Bourne shell script text executable

  sauce 75# sh !$
  sh lib/ant/bin/ant
  Buildfile: build.xml does not exist!
  Build failed

  sauce 76# l
  3RD-PARTY-LICENSE-persistence.txt  LICENSE.txt                    imq/
  3RD-PARTY-LICENSE.txt              License_Notice_Translated.pdf  javadb/
  BinariesLicense                    README                         lib/
  CDDLv1.0.txt                       README-persistence             setup.xml
  COPYRIGHT                          docs/

  sauce 77# which asadmin
  asadmin: Command not found.

  sauce 78#


Please provide *exact* detailed instructions on how to install Glassfish and
produce the hang.  Please also provide the "ps -el" output on your machine
(at least for the relevant X11/java/glassfish processes) once the hang occurs.

Thanks in advance.  -ernie
Comment 6 Ernie Petrides 2007-07-11 17:03:17 EDT
Hello, Uno.  Will you be able to provide the info requested in my prior comment?
Comment 7 Uno Engborg 2007-07-12 02:42:22 EDT
Unfortunately not as I do not have access to the machine. The machine was owned
by a customer that we no longer do consulting for. From what I understand they
have now upgraded to RHEL5 and everything works just fine.

Anyway, if you get other customers with similar problems, they could use the
workaround suggested above. Unless you have more time to tamper with this by
yorself I would suggest you close this bug with a wont fix.
Comment 8 Ernie Petrides 2007-07-12 15:57:04 EDT
Thanks for the update, Uno.  Since I was never able to reproduce this problem,
and it's still not clear whether the hang was the result of a kernel bug, I'm
going to close this now with the INSUFFICIENT_DATA disposition.

If you encounter this problem again and can provide exact instructions for
reproducing the hang, feel free to reopen this bug report.

Thanks.  -ernie

Note You need to log in before you can comment on or make changes to this bug.