JDK-4742013 : Regtest-test com/sun/jdi/JITDebug.sh test fails on Windows 98
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 1.4.0,1.4.1,1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_98,windows_2000
  • CPU: x86
  • Submitted: 2002-09-05
  • Updated: 2012-10-01
  • Resolved: 2003-09-04
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description

Name: asR10013			Date: 09/04/2002


Filed By       : J2SE-SQA [###@###.###
JDK            : JDK1.4.1-b21
Testbase       : RegTest-test
Platform[s]    : Windows 98
Falling test[s]: 
	com/sun/jdi/JITDebug.sh

Regtest-test com/sun/jdi/JITDebug.sh fails on Windows 98. 

The test passes on other platforms (Linux, Windows 2000, Solaris 8 (x86)).

The cause of the failure is that there are some problems with socket transport on Windows 98.
When the SystemRoot variable is defined in the -DenvVars construction, the script uses
dt_socket as a transport method and fails. 

The test passes if the SystemRoot variable is removed from -DenvVars and the test
uses dt_shmem.


jtr file location:
==================

/net/jtgb4u4c.eng/export/sail15/results/hopper/b21/regtest/win32/win98_client_linux-17/workDir/test/com/sun/jdi/JITDebug.jtr

How to reproduce:
=================
Start JT3.1 using the jtreg script.
Run the test.

Test output (part of JITDebug.sh):
===================================
----------messages:(3/116)----------
command: shell JITDebug.sh 
reason: User specified action: run shell JITDebug.sh 
elapsed time (seconds): 600.01
----------System.out:(23/990)*----------
JDK under test is: k:/jdk1.4.1/win32

Environment variable definitions are:

CLASSPATH=k:/jdk1.4.1/win32/lib/tools.jar;.
PATH=C:/MKSNT
SystemRoot=c:\\windows
TESTCLASSES=H:\\results_full\\hopper\\b21\\regtest\\win32\\win98_linux-17\\workDir\\test\\classes\\com\\sun\\jdi
TESTJAVA=k:/jdk1.4.1/win32
TESTJAVAHOME=k:/jdk1.4.1/win32
TESTSRC=k:\\regtest\\test\\com\\sun\\jdi
TRANSPORT_METHOD=dt_socket
_=C:/MKSNT/env.exe
windir=c:/windows


Starting test:
k:/jdk1.4.1/win32/bin/java -showversion -DTRANSPORT_METHOD="${TRANSPORT_METHOD}" -classpath "k:/jdk1.4.1/win32/lib/tools.jar;." JITDebug
Launching: [K:\\JDK1.4.1\\WIN32\\JRE\\bin\\java, -Xdebug, -Xnoagent, -Djava.compiler=NONE, -Xrunjdwp:transport=dt_socket,server=y,onuncaught=y,launch=K:\\JDK1.4.1\\WIN32\\JRE\\bin\\java
-DTRANSPORT_METHOD=dt_socket JITDebug DEBUGGER , JITDebug, TARGET]
trigger onuncaught launch
trivial debugger started
attached to: 1061
Exception: com.sun.jdi.VMDisconnectedException - hanging
----------System.err:(3/148)----------
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
result: Failed. Execution failed: Program `sh' interrupted! (timed out?)


test result: Failed. Execution failed: Program `sh' interrupted! (timed out?)



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

Name: dkR10014			Date: 12/16/2002


The following nsk test fails intermittently due to this bug 
 nsk/jdi/EventQueue/remove/remove003
when it is run on Windows 2000 in server -Xmixed mode.
======================================================================

Comments
PUBLIC COMMENTS .
10-06-2004

EVALUATION When sockets are used, the test appears to get a VMDisconnectedException when it calls vm.exit(). Other tests work ok with sockets on Win 98. ###@###.### 2002-11-11 vm.exit() is throwing a VMDisconnectedException due to an underlying IOException indicating that the connection has been reset. The reset arises because the JDWP stub terminates the VM without gracefully closing the connection to the debugger. Due to timing issues terminating the VM may occur before the reply to the exit command has been transmitted and on Windows this always results in a connection reset. ###@###.### 2002-12-10 Since tiger b12 the JDWP agent closes the transport before it exits. In the case of the socket transport this ensures that the socket is closed gracefully and the connection reset error no longer occurs. The change in b12 came about with the port of the JDWP agent to JVMTI (4873324). Although 4873324 is an unrelated rfe I will close this one as a duplicate. ###@###.### 2003-09-04
04-09-2003

SUGGESTED FIX ------- VirtualMachineImpl.c ------- *** /tmp/sccs.7JaaBK Tue Jan 7 17:23:57 2003 --- VirtualMachineImpl.c Tue Jan 7 17:30:51 2003 *************** *** 11,16 **** --- 11,17 ---- #include "commonRef.h" #include "inStream.h" #include "outStream.h" + #include "transport.h" #include "util.h" #include "eventHandler.h" #include "eventHelper.h" *************** *** 475,480 **** --- 476,486 ---- } outStream_sendReply(out); + /* Destroy streams and close transport */ + inStream_destroy(&in); + outStream_destroy(&out); + transport_close(); + /* * TO DO: When JVMDI provides a better way to exit, use it here. */ ###@###.### 2003-01-07
07-01-2003