JDK-4326260 : JDB runs incorrectly under the Hotspot VM
  • Type: Bug
  • Component: vm-legacy
  • Sub-Component: jvmdi
  • Affected Version: 2.0,1.3.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_7,windows_nt
  • CPU: x86,sparc
  • Submitted: 2000-03-30
  • Updated: 2000-05-19
  • Resolved: 2000-05-19
Related Reports
Duplicate :  
Relates :  
Description

Name: dkC59003			Date: 03/30/2000



The JDB is called to run the very simple application
(see java source below). 
Then the "stop in regresab45.main" and "run" JDB commands
are given.  After breakpoint the "cont" JDB command is
given and JDB is expected to finish.

But the further behaviour of the JDB is not correct -
one more breakpoint happens.
After this on Solaris the application hangs.
On Win32 the application does not hang and the
next "cont" JDB command after the second unexpected 
breakpoint completes the application and JDB.

These failures happen with the following HotSpot VMs:
Java HotSpot Client VM (build 1.3.0rc2-Y) on Solaris;
Java HotSpot Server VM (build 2.0rc2-D) on Win32;
Java HotSpot Client VM (build 1.3.0rc2-Y) on Win32;


This bug prevents the regression test (testbase_nsk)
nsk/regression/regresab45 to pass.

Under the Classic VM the JDB runs well.
The HotSpot Client VM (build 1.3.0rc1-T) on Win32 is OK too.


See logs:

on Solaris:

% java -version
java version "1.3.0rc2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc2-Y)
Java HotSpot(TM) Client VM (build 1.3.0rc2-Y, interpreted mode)

% jdb regresab45
Initializing jdb...
> stop in regresab45.main
Deferring breakpoint regresab45.main.
It will be set after the class is loaded.
> run
run regresab45
Java HotSpot(TM) Client VM warning: Setting of property "java.compiler" is ignored

VM Started: > Set deferred breakpoint regresab45.main

Breakpoint hit: thread="main", regresab45.main(), line=7, bci=0
  7         System.out.println("===>  started");

main[1] cont

Breakpoint hit: thread="main", regresab45.main(), line=7, bci=0
  7         System.out.println("===>  started");

main[1] > cont
Nothing suspended.
> exit
% 
 
on Win32:

$ java  -version
java version "1.3.0rc2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc2-Y)
Java HotSpot(TM) Client VM (build 1.3.0rc2-Y, mixed mode)

$ jdb regresab45
Initializing jdb...
> stop in regresab45.main
Deferring breakpoint regresab45.main.
It will be set after the class is loaded.
> run
run regresab45
Java HotSpot(TM) Client VM warning: Setting of property "java.compiler" is ignored
>
VM Started: Set deferred breakpoint regresab45.main

Breakpoint hit: thread="main", regresab45.main(), line=7, bci=0
  7         System.out.println("===>  started");

main[1] cont
>
Breakpoint hit: thread="main", regresab45.main(), line=7, bci=0
  7         System.out.println("===>  started");

main[1] cont
===>  started
===>  finished
>
The application exited


Under HotSpot Client VM (build 1.3.0rc1-T):

$ java -version
java version "1.3.0rc1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-U)
Java HotSpot(TM) Client VM (build 1.3.0rc1-T, mixed mode)

$ jdb regresab45
Initializing jdb...
> stop in regresab45.main
Deferring breakpoint regresab45.main.
It will be set after the class is loaded.
> run
run regresab45
Java HotSpot(TM) Client VM warning: Setting of property "java.compiler" is ignored
>
VM Started: Set deferred breakpoint regresab45.main

Breakpoint hit: thread="main", regresab45.main(), line=7, bci=0
  7         System.out.println("===>  started");

main[1] cont
> ===>  started
===>  finished

The application exited


See java source - regresab45.java:
------------------------------------------------------------
// File: %Z%%M% %I% %E% 
// Copyright %G% Sun Microsystems, Inc. All Rights Reserved

class regresab45 {

    public static void main(String args[]) {
        System.out.println("===>  started");
        System.out.println("===>  finished");
    }
} // end of regresab45 class
------------------------------------------------------------

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

Comments
EVALUATION daniel.daugherty@Eng 2000-05-18 This bug is reproducible using solaris_baseline (Beta1) on both SPARC and Win32. It is also reproducible using solaris_baseline as of the 00.05.12 JVM/DI putback on Win32, but not on SPARC. When fast breakpoints are enabled on Win32, it is also not reproducible. Steffen's fix for incorrect byte code stepping (4293376) also fixed this bug and the fix for 4337667 enables the fix to work on Win32. I'm closing this bug as a duplicate of 4293376.
11-06-2004