JDK-5015535 : Error: assert(mdp == mdp2,"wrong mdp") on nsk/jvmti test
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-03-18
  • Updated: 2004-05-10
  • Resolved: 2004-04-13
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
5.0 b45Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
###@###.### 2004-03-17

The test nsk/jvmti/PopFrame/popframe001 is failure in Serviceability Nightly
starting from 03/16/2004:

#!/usr/bin/sh

LD_LIBRARY_PATH=/net/vmsqe.sfbay/export/backup/UNIFIED-DTF/DTWS/suites/JVMTI_QUICKLOOK/testbase/bin/lib/sparc/nsk/jvmti/PopFrame:/net/vmsqe.sfbay/export/backup/UNIFIED-DTF/DTWS/suites/JVMTI_QUICKLOOK/testbase/src/nsk/share/lib/sparc:/net/vmsqe.sfbay/export/nightly/mantis/JDK/service_hs_baseline/jdk1.5/solaris-sparc/jre/lib/sparc/server
RAS_OPTIONS=
SHELL=/usr/bin/sh
DISPLAY=vmsqe.sfbay:0.0
CLASSPATH=/var/tmp/Work/exec/JVMTI_QUICKLOOK-NIGHTLY-Serv_Baseline-ServerVM-comp-Solsparc-2004-03-16-04-29-08/run2/fhsu.Solaris.sparc/popframe001:/net/vmsqe.sfbay/export/backup/UNIFIED-DTF/DTWS/suites/JVMTI_QUICKLOOK/testbase/bin/classes:/net/vmsqe.sfbay/export/nightly/mantis/JDK/service_hs_baseline/jdk1.5/solaris-sparc/lib/tools.jar
PATH=/net/vmsqe.sfbay/export/nightly/mantis/JDK/service_hs_baseline/jdk1.5/solaris-sparc/bin:/bin:/usr/bin:/bin:/usr/bin/cut:/usr/bin/echo
HOME=/var/tmp

while [ $# -gt 0 ];
do
  if [ $1 = "-jdk" ]; then
	shift 1
	PATH=${1}/bin:${PATH}
	shift 1
  else
	if [ $1 = "-d" ]; then
	  shift 1
	  if [ $# -gt 0  ]; then
		DISPLAY=$1
		shift 1
	  else
		DISPLAY=:0.0
	  fi
	fi
  fi
done

export LD_LIBRARY_PATH
export RAS_OPTIONS
export SHELL
export DISPLAY
export CLASSPATH
export PATH
export HOME

#annotate TEST javaopt=/net/vmsqe.sfbay/export/nightly/mantis/JDK/service_hs_baseline/jdk1.5/solaris-sparc/bin/java -server -Xcomp -XX:-PrintVMOptions -XX:CompileOnly=nsk -agentlib:popframe001
/usr/bin/perl /net/vmsqe.sfbay/export/backup/UNIFIED-DTF/DTWS/suites/JVMTI_QUICKLOOK/testbase/src/nsk/share/jvmti/run_jvmti.pl /net/vmsqe.sfbay/export/nightly/mantis/JDK/service_hs_baseline/jdk1.5/solaris-sparc/bin/java -server -Xcomp -XX:-PrintVMOptions -XX:CompileOnly=nsk -DHANGINGJAVA6618 -agentlib:popframe001 nsk.jvmti.PopFrame.popframe001
##Exit status of execution step=6
##Core file exists
##!checkExitCode

#FAILED verify : actual mdp f3175420   expected mdp f3175408 @ bci 7
#  actual di 48   expected di 24
#  actual bci is 21  expected bci 7
#method data for {method} 'run' '()V' in 'nsk/jvmti/PopFrame/popframe001$popFrameCls'
#0     bci: 1    VirtualCallData     count(0) entries(0)
#24    bci: 7    BranchData          taken(1) displacement(152)
#                                    not taken(0)
#40    bci: 14   CounterData         count(0)
#48    bci: 21   CounterData         count(0)
#56    bci: 26   VirtualCallData     count(0) entries(0)
#80    bci: 30   VirtualCallData     count(0) entries(0)
#104   bci: 35   VirtualCallData     count(0) entries(0)
#128   bci: 38   VirtualCallData     count(0) entries(0)
#152   bci: 41   VirtualCallData     count(0) entries(0)
#0 aload_0
#1 invokevirtual 3 <activeMethod> <()V> 
#  0   bci: 1    VirtualCallData     count(0) entries(0)
#4 getstatic 4
#7 ifeq 44
#  24  bci: 7    BranchData          taken(1) displacement(152)
#                                    not taken(0)
#10 aload_0
#11 getfield 0 <this$0>
#14 invokestatic 5 <access$000> <(Lnsk/jvmti/PopFrame/popframe001;)Ljava/io/PrintStream;> 
#  40  bci: 14   CounterData         count(0)
#17 new 7
#20 dup
#21 invokespecial 6 <<init>> <()V> 
#  48  bci: 21   CounterData         count(0)
#24 ldcSymbol: 'popFrameCls ('
#26 invokevirtual 7 <append> <(Ljava/lang/String;)Ljava/lang/StringBuffer;> 
#  56  bci: 26   VirtualCallData     count(0) entries(0)
#29 aload_0
#30 invokevirtual 8 <append> <(Ljava/lang/Object;)Ljava/lang/StringBuffer;> 
#  80  bci: 30   VirtualCallData     count(0) entries(0)
#33 ldcSymbol: '): exiting...'
#35 invokevirtual 7 <append> <(Ljava/lang/String;)Ljava/lang/StringBuffer;> 
#  104 bci: 35   VirtualCallData     count(0) entries(0)
#38 invokevirtual 9 <toString> <()Ljava/lang/String;> 
#  128 bci: 38   VirtualCallData     count(0) entries(0)
#41 invokevirtual 10 <println> <(Ljava/lang/String;)V> 
#  152 bci: 41   VirtualCallData     count(0) entries(0)
#44 return
## To suppress the following error report, specify this argument
## after -XX: or in .hotspotrc:  SuppressErrorAt=/interpreterRuntime.cpp:786]
##
## An unexpected error has been detected by HotSpot Virtual Machine:
##
##  Internal Error (/net/prt-solsparc-q1-10/tmp/PrtBuildDir2/workspace/src/share/vm/interpreter/interpreterRuntime.cpp, 786 [ Patched ]), pid=11720, tid=13
##
## Java VM: Java HotSpot(TM) Server VM (20040315084135.ab23780.service_hs_baseline-debug compiled mode)
##
## Error: assert(mdp == mdp2,"wrong mdp")
## An error report file with more information is saved as hs_err_pid11720.log
##
## If you would like to submit a bug report, please visit:
##   http://java.sun.com/webapps/bugreport/crash.jsp
##
#Current thread is 13
#Dumping core ...


I made a search through PRT builds and found the putback responsible for the failure:
     20040302154502.jrose.tiger

There are 3 steps of the search in the log below:

=========================
(1) Search in the service_hs_baseline

yy prt_find1 service_hs_baseline c2 nsk2 'wrong mdp' fastdebug

yy prt_find1 service_hs_baseline c2 nsk2 wrong mdp fastdebug	[BEG: Wed Mar 17 16:32:34 PST 2004]
item 55: 20040114084501.dcubed.service_hs_merge

[9]    Done                 /home/ss45998/bin/sparc-S2/textedit ~/bin/setup/bbprt_nsk -Ws 800 400
    passed: 20040114084501.dcubed.service_hs_merge
item 27: 20040212212528.dcubed.service_hs_merge
    passed: 20040212212528.dcubed.service_hs_merge
item 13: 20040224130010.rfield.b
    passed: 20040224130010.rfield.b
item 6: 20040309093853.ab23780.service_hs_baseline
## Error: assert(mdp == mdp2,"wrong mdp")
    FAILED: 20040309093853.ab23780.service_hs_baseline
item 9: 20040304112129.dcubed.service_hs_merge
## Error: assert(mdp == mdp2,"wrong mdp")
    FAILED: 20040304112129.dcubed.service_hs_merge
item 11: 20040302133030.dcubed.service_hs_int
    passed: 20040302133030.dcubed.service_hs_int
item 10: 20040303091425.dcubed.service_hs_merge
    passed: 20040303091425.dcubed.service_hs_merge

Putback responsible for the failure: 20040304112129.dcubed.service_hs_merge
yy prt_find1 service_hs_baseline c2 nsk2 wrong mdp fastdebug	[END: Wed Mar 17 16:46:19 PST 2004]


So, the regression came from the merge with main/baseline: 20040304112129.dcubed.service_hs_merge

===========================
(2) Search in the main/baseline

ss45998@bratsk yy prt_find1 baseline c2 nsk2 'wrong mdp' fastdebug

yy prt_find1 baseline c2 nsk2 wrong mdp fastdebug	[BEG: Wed Mar 17 16:57:21 PST 2004]
item 56: 20031204062243.nips.c2_baseline_to_main_baseline
    passed: 20031204062243.nips.c2_baseline_to_main_baseline
item 28: 20040204193314.jmasa.gc_baseline_merge
    passed: 20040204193314.jmasa.gc_baseline_merge
item 14: 20040224145208.ovrskeek.main_baseline
    passed: 20040224145208.ovrskeek.main_baseline
item 7: 20040304053429.nips.c2_baseline_to_main_baseline
## Error: assert(mdp == mdp2,"wrong mdp")
    FAILED: 20040304053429.nips.c2_baseline_to_main_baseline
item 10: 20040303095423.dcubed.service_hs_merge
    passed: 20040303095423.dcubed.service_hs_merge
item 8: 20040304000253.dcubed.tiger_4895747
    passed: 20040304000253.dcubed.tiger_4895747

Putback responsible for the failure: 20040304053429.nips.c2_baseline_to_main_baseline
yy prt_find1 baseline c2 nsk2 wrong mdp fastdebug	[END: Wed Mar 17 17:08:59 PST 2004]

So, the regression came from the c2_baseline putback: 20040304053429.nips.c2_baseline_to_main_baseline

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

ss45998@bratsk yy prt_find1 c2_baseline c2 nsk2 'wrong mdp' fastdebug

yy prt_find1 c2_baseline c2 nsk2 wrong mdp fastdebug	[BEG: Wed Mar 17 17:13:37 PST 2004]
item 41: 20031219101509.nips.c2_baseline
    passed: 20031219101509.nips.c2_baseline
item 20: 20040209104756.kbr.c2_baseline
    passed: 20040209104756.kbr.c2_baseline
item 10: 20040303181245.never.c1
## Error: assert(mdp == mdp2,"wrong mdp")
    FAILED: 20040303181245.never.c1
item 15: 20040219074230.nips.main_to_c2_baseline
    passed: 20040219074230.nips.main_to_c2_baseline
item 12: 20040302154502.jrose.tiger
## Error: assert(mdp == mdp2,"wrong mdp")
    FAILED: 20040302154502.jrose.tiger
item 13: 20040302070650.rasbold.c2_baseline
    passed: 20040302070650.rasbold.c2_baseline

Putback responsible for the failure: 20040302154502.jrose.tiger
yy prt_find1 c2_baseline c2 nsk2 wrong mdp fastdebug	[END: Wed Mar 17 17:25:13 PST 2004]

So, the regression came from the putback: 20040302154502.jrose.tiger

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


To reproduce the failure:

/net/jano.sfbay/export/disk20/serviceability/bin/runnsk.sh -server -Xcomp -jdk $your_sdk_bld -o $your_out_dir nsk/jvmti/PopFrame/popframe001



Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b45 tiger-beta2 VERIFIED IN: tiger-beta2
14-06-2004

EVALUATION ###@###.### 2004-03-17 May be due to John's changes in MethodDataOop done for 4292742. ###@###.### 2004-03-19 John's putback exposes the bug in runtime. When PopFrame forces deoptimization and reexecute invoke we move mdp to the next position. So we have wrong mdp after return from invoke. We should NOT move mdp to the next position in this case.
11-06-2004

SUGGESTED FIX ###@###.### 2004-03-22 Do NOT move mdp to the next slot if PopFrame forces deoptimization and reexecution. http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/export2/archived_workspaces/main/c2_baseline/2004/20040324123956.kvn.4895131/workspace/webrevs/webrev-2004.03.24/index.html
11-06-2004