Bug 106690

Summary: glibc-2.2.4-32.8 does not fix the debugger with pthreads
Product: Red Hat Enterprise Linux 2.1 Reporter: benson margulies <bim2003>
Component: glibcAssignee: Roland McGrath <roland>
Status: CLOSED WORKSFORME QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: drepper, fweimer, jakub, roland
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-25 23:23:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
everything you need.
none
repairs demo.sh, omits binaries. none

Description benson margulies 2003-10-09 17:11:02 UTC
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):
glibc-2.2.4-32.8

How reproducible:
Always

Steps to Reproduce:
1. We can supply a test case if you don't have one.
2.
3.
    

Additional info:

Comment 1 Jakub Jelinek 2003-10-09 22:30:26 UTC
Please provide the testcase.

Comment 2 benson margulies 2003-10-10 11:20:27 UTC
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.


Comment 3 benson margulies 2003-10-10 11:21:28 UTC
Created attachment 95098 [details]
everything you need.

Comment 4 benson margulies 2003-10-19 23:21:00 UTC
Test case OK? Or is this, 'tough luck, Java's linked with the wrong stuff'?

Comment 5 Roland McGrath 2003-12-24 01:47:47 UTC
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.

Comment 6 benson margulies 2003-12-24 01:51:11 UTC
Java is not part of a stock install. If I can't reproduce this sans-
java, is this over?

Comment 7 Roland McGrath 2003-12-24 01:55:25 UTC
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.

Comment 8 benson margulies 2003-12-24 02:02:31 UTC
Created attachment 96687 [details]
repairs demo.sh, omits binaries.

Comment 9 Roland McGrath 2003-12-24 02:32:45 UTC
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.

Comment 10 benson margulies 2003-12-24 02:34:58 UTC
I guess you'd better close this out. Presumably the Sun 1.4.x JRE 
isn't linked with the right stuff.


Comment 11 Roland McGrath 2003-12-24 02:38:31 UTC
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.

Comment 12 benson margulies 2003-12-24 02:41:06 UTC
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.

Comment 13 Roland McGrath 2003-12-24 02:47:46 UTC
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.

Comment 14 benson margulies 2003-12-24 03:19:30 UTC

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) 



Comment 15 benson margulies 2003-12-24 03:20:53 UTC
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.


Comment 17 Ulrich Drepper 2005-07-25 23:23:06 UTC
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
bug.