United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6256268 : Regression test java/rmi/Naming/DefaultRegistryPort.java failed on winXP Home

Details
Type:
Bug
Submit Date:
2005-04-16
Status:
Closed
Updated Date:
2005-05-03
Project Name:
JDK
Resolved Date:
2005-05-03
Component:
core-libs
OS:
windows_xp
Sub-Component:
java.rmi
CPU:
x86
Priority:
P4
Resolution:
Cannot Reproduce
Affected Versions:
6
Fixed Versions:

Related Reports
Relates:

Sub Tasks

Description
Regression test java/rmi/Naming/DefaultRegistryPort.java failed.
This happened on winxp HOME, tested on winxp pro, and other os did not find the problem.
Test bundles: b31, b27
See also bug: 6256847

#Test Results (version 2)
#Sun Aug 14 06:59:10 CST 2005
#checksum:2d5ac6b883138add
#-----testdescription-----
$file=D:\\kc\\jdk\\jreg\\b31\\test\\java\\rmi\\Naming\\DefaultRegistryPort.java
$root=D:\\kc\\jdk\\jreg\\b31\\test
author=Dana Burns
keywords=bug4251878
library=../testlibrary
run=USER_SPECIFIED build TestLibrary\r\nUSER_SPECIFIED build DefaultRegistryPort\r\nUSER_SPECIFIED main DefaultRegistryPort\r\n
source=DefaultRegistryPort.java
title=change in default URL port causes regression in java.rmi.Naming

#-----environment-----

#-----testresult-----
description=file:///D:/kc/jdk/jreg/b31/test/java/rmi/Naming/DefaultRegistryPort.java
end=Sun Aug 14 06:59:10 CST 2005
environment=regtest
execStatus=Failed. Execution failed: `main' threw exception: TestFailedException: TEST FAILED: Test failed: unexpected exception
javatestOS=Windows XP 5.1 (x86)
javatestVersion=2.1.5
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build compile build compile build main
start=Sun Aug 14 06:59:01 CST 2005
status=Failed. Execution failed: `main' threw exception: TestFailedException: TEST FAILED: Test failed: unexpected exception
test=java/rmi/Naming/DefaultRegistryPort.java
work=D:\\kc\\jdk\\jreg\\b31\\JTwork\\java\\rmi\\Naming

#section:script_messages
----------messages:(4/197)----------
JDK under test: (g:/jdk1.6.0)
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b31)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b31, mixed mode, sharing)

#section:build
----------messages:(3/115)----------
command: build TestLibrary 
reason: User specified action: run build TestLibrary 
elapsed time (seconds): 2.052
result: Passed. Compilation successful

#section:compile
----------messages:(3/184)*----------
command: compile D:\\kc\\jdk\\jreg\\b31\\test\\java\\rmi\\Naming\\..\\testlibrary\\TestLibrary.java 
reason: .class file out of date or does not exist
elapsed time (seconds): 2.052
----------System.out:(0/0)----------
----------System.err:(2/179)*----------
Note: D:\\kc\\jdk\\jreg\\b31\\test\\java\\rmi\\Naming\\..\\testlibrary\\TestLibrary.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
result: Passed. Compilation successful

#section:build
----------messages:(3/131)----------
command: build DefaultRegistryPort 
reason: User specified action: run build DefaultRegistryPort 
elapsed time (seconds): 1.613
result: Passed. Compilation successful

#section:compile
----------messages:(3/175)*----------
command: compile D:\\kc\\jdk\\jreg\\b31\\test\\java\\rmi\\Naming\\DefaultRegistryPort.java 
reason: .class file out of date or does not exist
elapsed time (seconds): 1.613
----------System.out:(0/0)----------
----------System.err:(0/0)----------
result: Passed. Compilation successful

#section:build
----------messages:(3/106)----------
command: build DefaultRegistryPort 
reason: Named class compiled on demand
elapsed time (seconds): 0.0
result: Passed. No need to compile: DefaultRegistryPort.java

#section:main
----------messages:(3/128)----------
command: main DefaultRegistryPort
reason: User specified action: run main DefaultRegistryPort 
elapsed time (seconds): 5.578
----------System.out:(0/0)----------
----------System.err:(41/2631)----------
Starting registry on default port REGISTRY_PORT=1099
Failed to create a registry, try using existing one
Found registry=RegistryImpl_Stub[UnicastRef [liveRef: [endpoint:[:1099](remote),objID:[0:0:0, 0]]]]
java.rmi.ConnectIOException: Exception creating connection to: ; nested exception is: 
	java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:587)
	at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
	at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
	at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:323)
	at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
	at DefaultRegistryPort.main(DefaultRegistryPort.java:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
	at java.net.Socket.createImpl(Socket.java:387)
	at java.net.Socket.<init>(Socket.java:360)
	at java.net.Socket.<init>(Socket.java:178)
	at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
	at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
	... 11 more
TEST FAILED: Test failed: unexpected exception
TestFailedException: TEST FAILED: Test failed: unexpected exception
	at TestLibrary.bomb(TestLibrary.java:71)
	at TestLibrary.bomb(TestLibrary.java:74)
	at DefaultRegistryPort.main(DefaultRegistryPort.java:84)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:595)

JavaTest Message: Test threw exception: TestFailedException: TEST FAILED: Test failed: unexpected exception
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: TestFailedException: TEST FAILED: Test failed: unexpected exception
result: Failed. Execution failed: `main' threw exception: TestFailedException: TEST FAILED: Test failed: unexpected exception


test result: Failed. Execution failed: `main' threw exception: TestFailedException: TEST FAILED: Test failed: unexpected exception

###@###.### 2005-04-18 20:33:42 GMT
###@###.### 2005-04-18 20:43:58 GMT

                                    

Comments
EVALUATION

This Windows error code, 10106, has the symbolic name WSAEPROVIDERFAILEDINIT (see winsock2.h).  We have seen these sorts of mysterious Windows socket failures before, and they have typically been the result of certain Windows environment variables not being set property when the test is run.  I don't remember the details offhand, but from the following JDC forum thread:

http://forum.java.sun.com/thread.jspa?threadID=329241&messageID=2459095

It appears that the "SystemRoot" environment variable needs to be set to the Windows installation directory (like "C:\WINDOWS").  This variable is normally set that way, of course, but some execution environments (like test harnesses) can cause it to be unintentionally removed when executing subprocesses.

The fact that the same exception occurs when attempting a network operation through a different (non-RMI) library (see 6256847)-- not to mention the nature of the exception-- would seem to suggest that there is not an RMI bug here.

Did all other RMI regression tests pass in this same environment?

###@###.### 2005-04-27 17:22:24 GMT

It's the only rmi case we run for i18n regression.
###@###.### 2005-04-27 17:50:05 GMT

Submitter has confirmed that the failure was due to an issue with environment variable settings for test execution on the Windows XP Home machine:

> Good news, I check the script running env which is MKS, using setenv found
> the varible is set as SYSTEMROOT, so set a new varible $SystemRoot and run
> the script again, now both cases are passed.
> The cause is due to the varible set wrongly as SYSTEMROOT on winXP home,
> Where on other platform, like winXP pro and etc, the varible set correctly
> on MKS as SystemRoot.

###@###.### 2005-05-03 01:03:25 GMT
                                     
2005-04-27



Hardware and Software, Engineered to Work Together