JDK-4702168 : test b4322869 hangs up on ServerVM in -Xcomp mode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 1.4.1,1.4.1_05
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_2.6
  • CPU: generic
  • Submitted: 2002-06-14
  • Updated: 2003-11-12
  • Resolved: 2002-08-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other
1.4.1_07 07Fixed 1.4.2Fixed
Related Reports
Duplicate :  
Description

Name: ipR10196			Date: 06/13/2002


--------------------------------------
Test            : nsk/regression/b4322869
TestBase        : testbase_nsk
VM              : server (32-bit and 64-bit)
Mode            : comp
Platform        : generic
OS              : generic
----------------------------------------

Steps to reproduce 
================
1. cd /net/sqesvr.eng/export/vsn/GammaBase/Bugs/{BugID}
2. sh doit.sh $JAVA_HOME -server -Xcomp

In this test a thread creates many copies of object in a 
infinite loop:

        for (int i = 1; i > 0; i++) {
            log_out.println("##> begin iterate: i = " + i);

            Object copy = null;
            try {
                copy = s_b4322869_object.clone();
            }
            catch (CloneNotSupportedException e) {
            }

	    <...>

            log_out.println("##> end iterate: i = " + i);
        }
        log_out.println("##> loop ends");

Running on ServerVM in -Xcomp mode this loop untimely ends after 
the first iteration:

    ##> begin iterate: i = 1
    ##> end iterate: i = 1
    ##> loop ends

(I've added log_out.println() to the code to track the loop iterations)
This causes main thread of the test to wait infinitely for a change
in global variables which should be made in the next iterations, so
the test hungs up.

Running on ClientVM and/or other VM modes the test passes successfully,
executing all iterations of the loop. 

Test ouput:
-----------------------------------------------------
Requesting JVM version...
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
Java HotSpot(TM) Server VM (build 1.4.1-beta-b14, compiled mode)
Running the test...
==> nsk/regression/b4322869 test LOG:
--> This test on #4322869 bug; Category: hotspot; Subcategory: compiler1
    Synopsis: race condition when returning from native calls with oop result

--> b4322869: test execution time limit = 8 minutes
--> b4322869: Thread "NativeOopThread" started
##> begin iterate: i = 1
##> end iterate: i = 1
##> loop ends

<test hungs up>
-----------------------------------------------------

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.1_07 generic mantis FIXED IN: 1.4.1_07 mantis INTEGRATED IN: 1.4.1_07 mantis VERIFIED IN: mantis
14-06-2004

SUGGESTED FIX In loopnode.cpp, near line 270, move if( stride_con > 0 ) return NULL; // count up loop rolls through MININT from the "ge" case to the "gt" case. Do the analogous change for "le" and "lt". ###@###.### 2002-06-17
17-06-2002

EVALUATION The loop in method NativeOopThread.run is misidentified as a "counted loop", and then optimized wrongly. ###@###.### 2002-06-17
17-06-2002