Red Hat Bugzilla – Bug 106690
glibc-2.2.4-32.8 does not fix the debugger with pthreads
Last modified: 2007-11-30 17:06:53 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705; .NET CLR 1.1.4322)
Description of problem:
After installing RHSA-2003:249, we see the same old error messages from gdb
complaining that it can't correlate threads to LWPs. This is particularly
acute when trying to debug JNI code inside JDK 1.4.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. We can supply a test case if you don't have one.
Please provide the testcase.
First, you need:
advanced% $JAVA_HOME/bin/java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
set JAVA_HOME appropriately in your environment.
Then, in the attached tarball, you will find a shell script that will compile
two Java classes and a trivial JNI shared library. COmmented out at the end of
the script, you will find the gdb commands needed to get into the traditional
state where you can't even quit gdb without control-Z.
Created attachment 95098 [details]
everything you need.
Test case OK? Or is this, 'tough luck, Java's linked with the wrong stuff'?
The libstub.so binary included in your test is not built properly.
Include a test containing only sources, that compiles from scratch on
a stock 2.1AS installation.
Java is not part of a stock install. If I can't reproduce this sans-
java, is this over?
No, an install including IBMJava2-* rpms is fine too.
Those are optional parts of 2.1AS, though I think 1.3 are the
supported ones. Just do not include binaries in your test case, since
they are not properly made.
Created attachment 96687 [details]
repairs demo.sh, omits binaries.
The 1.3.1 version of IBMJava2 is what is available for 2.1AS that I am
aware of. Using that I do not see a problem (nor do I see multiple
threads in gdb), though your exact recipe doesn't quite work since
that 'java' is a shell script, not the real executable.
I guess you'd better close this out. Presumably the Sun 1.4.x JRE
isn't linked with the right stuff.
gdb ought to work with pthreads regardless of what the application is
doing. If you give me reliable information on reproducing the problem
from scratch, e.g. exactly what Java rpms you have installed, then I
can look into it. You've now mentioned the Sun JRE, when heretofore
you always talked about IBM's JRE. Make the report clear.
Well, if you look at 'additional comment #2', you'll see my dump of
exactly which java I'm working with. I don't think I ever mentioned
the IBM version at all -- I don't see it in any of my comments that
are in this bugzilla.
What you need to specify is what rpms you installed to get what you
have. If you did not install rpms, then you are probably not using a
supported configuration. Nonetheless I would like to be able to
reproduce the problem, so describe what has to be installed regardless.
http://java.sun.com/j2se/1.4.1/download.html gets you to ...
RPM in self-extracting file, English (j2sdk-1_4_1_06-linux-i586-
rpm.bin, 38.38 MB)
I'm certainly not using a 'supported config', since, to the best of
my knowledge, RH is not officially releasing RPMs for Java 1.4.1. If
you want to poke around, you can download the RPM or non-RPM version
of the 1.4.1 J2SE JDK from Sun.
I'm closing this bug. I don't think we can make progress especially with such
old code and the proprietary nature of the JVM.
If there are similar problems with RHEL3/4 when using NPTL consider filing a new