United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 4966341 Threads6 VM testcase fails on RHEL3 for 1.3.1
4966341 : Threads6 VM testcase fails on RHEL3 for 1.3.1

Details
Type:
Bug
Submit Date:
2003-12-10
Status:
Closed
Updated Date:
2006-06-12
Project Name:
JDK
Resolved Date:
2006-06-12
Component:
hotspot
OS:
linux_redhat_3.0
Sub-Component:
runtime
CPU:
x86
Priority:
P4
Resolution:
Won't Fix
Affected Versions:
1.3.1_11
Fixed Versions:
1.3.1_19

Related Reports

Sub Tasks

Description
Machine : multi processor running RHEL3.0 with compat-libstdc++-7.3-2.96.122.i386.rpm installed

Attached is the VM testcase Threads6.tar
to Run :
untar to a dir
set PATH to 131 JDK

[root@qt0 Threads6]# java -classpath . Threads6
Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread
        at java.lang.Thread.start(Native Method)
        at Threads6.main(Threads6.java:74)
[root@qt0 Threads6]# java_g -classpath . Threads6
 Locks owned:
Mutex: [0x804d010/0x804d068] createThread_lock - owner: 0x805f220
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Fatal: acquiring lock SystemDictionary_lock/2 out of order with (at least) createThread_lock/2 -- possible deadlock
#
# Error ID: /BUILD_AREA/jdk131-update/ws/ea/hotspot/build/linux/../../src/share/vm/runtime/mutex.cpp, 155
#
# Problematic Thread: prio=1 tid=0x805f220 nid=0x586a runnable 
#
Current thread is 0xb618e080
Dumping core ...
Aborted
[root@qt0 Threads6]# 

RHEL is not a supported platform for 131, hence the low priority.
Many other RH versions supported by jdk131 are however being EOL'ed
###@###.### 2003-12-10

Attaching ThreadBug1 testcase which also fails with similar result.
###@###.### 2003-12-10

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
1.3.1_12


                                     
2004-06-14
WORK AROUND

set LD_ASSUME_KERNEL to 2.4.9 ( or a value lower that 2.4.20) to disable NPTL.
                                     
2004-06-11
EVALUATION

not reproducible on a single processor linux machine with kernel patch 2.4.7-10.
I am trying to get hold of a multiprocessor linux m/c with RHEL 3.0 installed.


###@###.### 2004-01-27

---------------------------------------------------

###@###.### 2004-02-12

I tested it on a machine ###@###.### provided with RHEL3.0 on it,
qt0.Ireland.Sun.COM. Stack size on this machine was set pretty high at 10m(10240k). With this size the test case failed after creating around 280 threads. That means threads have already taken up 2.73GB and an outofmemory error seems very likely. After I reduced the stack size to 1024k the probelm is not reproducible. 
I have a suspicion, this bug was raised after testing on a machine which had ulimit -s set to a very high value. 
I would like the originator of this bug to confirm if this was the case.

The test case is available at 
/tmp/Threads6/Threads6 on qt0.Ireland.Sun.COM.
I added a line to Threads6.java to print Thread# in each iteration.

As it stands currently, it doesn't look like a bug.
Let me know after you test with a proper stack size.
---------------------------------------------------------------

Adjusting the stack size to 1024 does work on RHEL. However, should this be necessary?
I set the stacksize to 10240 on a RH 8.0 and RHAS 2.1 (multi-processor) and on both times the test (Threads6) passed.(200 threads created)
Details of 2.1 RHAS computer :
[root@xplg1 Threads6]# uname -a
Linux xplg1 2.4.9-e.3smp #1 SMP Fri May 3 16:48:54 EDT 2002 i686 unknown
[root@xplg1 Threads6]# more /etc/redhat-release
Red Hat Linux Advanced Server release 2.1AS (Pensacola)
[root@xplg1 Threads6]# ulimit -s
10240
[root@xplg1 Threads6]# 


this still looks like a problem between RHAS3.0 and java.


###@###.### 2004-02-12
---------------------------------------

###@###.### 2004-02-13

Please set up a gdb & other trace tools like strace on qt0, so that I can debug this issue further. I could not fine them in /usr/bin.
Also, give me log in permissions on the machine where it succeeds with 10240k size.

--------------------------------------------------
###@###.### 2004-02-17

Setting the env variable LD_ASSUME_KERNEL to 2.4.9, makes the program run to completion without any problems. Since 2.4.20 kernel, NPTL support is provided. 
Setting LD_ASSUME_KERNEL disables usage of NPTL and we don't see problem reproduced with LinuxThreads. 
Running top showed that by the time the process crashed using NPTL, the stack+data size had grown to 1527M. 

This looks like a problem due to NPTL usage on RHEL3. 

This also probably explains why it's not reproduced on RH 8.0 and RHAS 2.1.
RH8 uses kernel 2.4.18 &  RHAS 2.1 uses 2.4.9 on xplg1.ireland. 

NPTL as far as I know is supported only for 1.4.2 and 1.4.1_03 (??). 

Now, I am not sure if we want to implement NPTL support in 1.3.1_XX. 

---------------------------------------------------------
                                     
2004-06-11



Hardware and Software, Engineered to Work Together