JDK-8027973 : javax/xml/jaxp/transform/jdk8004476/XSLTExFuncTest.java hangs (win)
  • Type: Bug
  • Component: xml
  • Sub-Component: javax.xml.transform
  • Affected Version: 7,8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-11-07
  • Updated: 2014-10-15
  • Resolved: 2013-11-26
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.
JDK 7 JDK 8
7u60Fixed 8 b119Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
TESTFAIL:javax/xml/jaxp/transform/jdk8004476/XSLTExFuncTest.java

This test has been timing our or hanging for long periods on Windows since it was added. The main thread appears to be blocks in Xerces code attempting a ftp connection (perhaps due to the file URL). Here is a sample stack trace:

"main" #1 prio=5 os_prio=0 tid=0x00000000025a0800 nid=0x591c runnable [0x00000000022be000]
   java.lang.Thread.State: RUNNABLE
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
        - locked <0x00000007aeeb7600> (a java.net.DualStackPlainSocketImpl)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.Socket.connect(Socket.java:585)
        at java.net.Socket.connect(Socket.java:534)
        at sun.net.ftp.impl.FtpClient.doConnect(FtpClient.java:957)
        at sun.net.ftp.impl.FtpClient.tryConnect(FtpClient.java:917)
        at sun.net.ftp.impl.FtpClient.connect(FtpClient.java:1012)
        at sun.net.ftp.impl.FtpClient.connect(FtpClient.java:998)
        at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:294)
        - locked <0x00000007aed38e80> (a sun.net.www.protocol.ftp.FtpURLConnection)
        at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:393)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:616)
        at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
        at com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.parse(Parser.java:430)
        at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:413)
        at com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:512)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:951)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:766)
        at XSLTExFuncTest.transform(XSLTExFuncTest.java:211)
        at XSLTExFuncTest.testExtFunc(XSLTExFuncTest.java:97)
        at XSLTExFuncTest.main(XSLTExFuncTest.java:82)


and a .jtr file (although it duplicates easily by just running it interactively on Windows).


#Test Results (version 2)
#Thu Nov 07 11:04:31 GMT 2013
#checksum:183f19c5dfc8875c
#-----testdescription-----
$file=C\:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476\\XSLTExFuncTest.java
$root=C\:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test
keywords=bug8004476 othervm
run=USER_SPECIFIED main/othervm XSLTExFuncTest\r\n
source=XSLTExFuncTest.java
title=test XSLT extension functions

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

#-----testresult-----
description=file\:/C\:/cygwin/home/alanb/ws/tl/jdk/test/javax/xml/jaxp/transform/jdk8004476/XSLTExFuncTest.java
elapsed=127916 0\:02\:07.916
end=Thu Nov 07 11\:04\:31 GMT 2013
environment=regtest
execStatus=Failed. Execution failed\: `main' threw exception\: java.lang.RuntimeException\: Connection timed out\: connect Connection timed out\: connect Connection timed out\: connect Connection timed out\: connect
hostname=irl10085.ie.oracle.com
javatestOS=Windows Server 2012 6.2 (amd64)
javatestVersion=4.4
jtregVersion=jtreg 4.1 dev b00
script=com.sun.javatest.regtest.RegressionScript
sections=script_messages build compile main
start=Thu Nov 07 11\:02\:23 GMT 2013
test=javax/xml/jaxp/transform/jdk8004476/XSLTExFuncTest.java
user.name=alanb
work=C\:\\cygwin\\home\\alanb\\testing\\jtreg\\JTwork\\javax\\xml\\jaxp\\transform\\jdk8004476

#section:script_messages
----------messages:(5/294)*----------
JDK under test: (c:\\cygwin\\home\\alanb\\ws\\tl\\build\\windows-x86_64-normal-server-release\\images\\j2sdk-image)
java version "1.8.0-internal"
Java(TM) SE Runtime Environment (build 1.8.0-internal-alanb_2013_11_07_09_45-b00)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b56, mixed mode)


#section:build
----------messages:(3/102)----------
command: build XSLTExFuncTest
reason: Named class compiled on demand
elapsed time (seconds): 0.103
result: Passed. Build successful

#section:compile
----------messages:(3/230)*----------
command: compile -XDignore.symbol.file=true C:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476\\XSLTExFuncTest.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.1
----------rerun:(23/2445)*----------
'PATH=C:\\cygwin\\usr\\local\\bin;C:\\cygwin\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Program Files\\TortoiseHg' \\
SystemDrive=C: \\
'SystemRoot=C:\\Windows' \\
'TEMP=C:\\cygwin\\tmp' \\
'TMP=C:\\cygwin\\tmp' \\
'windir=C:\\Windows' \\
    'c:\\cygwin\\home\\alanb\\ws\\tl\\build\\windows-x86_64-normal-server-release\\images\\j2sdk-image\\bin\\javac' \\
        -J-ea \\
        -J-esa \\
        -J-Xmx512m \\
        -J-DCompatibilityTest.disableNetwork=true \\
        -J-Dtest.vm.opts='-ea -esa -Xmx512m -DCompatibilityTest.disableNetwork=true' \\
        -J-Dtest.class.path.prefix='C:\\cygwin\\home\\alanb\\testing\\jtreg\\JTwork\\classes\\3\\javax\\xml\\jaxp\\transform\\jdk8004476;C:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476' \\
        -J-Dtest.jdk='c:\\cygwin\\home\\alanb\\ws\\tl\\build\\windows-x86_64-normal-server-release\\images\\j2sdk-image' \\
        -J-Dtest.src.path='C:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476' \\
        -J-Dtest.compiler.opts= \\
        -J-Dcompile.jdk='c:\\cygwin\\home\\alanb\\ws\\tl\\build\\windows-x86_64-normal-server-release\\images\\j2sdk-image' \\
        -J-Dtest.classes='C:\\cygwin\\home\\alanb\\testing\\jtreg\\JTwork\\classes\\3\\javax\\xml\\jaxp\\transform\\jdk8004476' \\
        -J-Dtest.class.path='C:\\cygwin\\home\\alanb\\testing\\jtreg\\JTwork\\classes\\3\\javax\\xml\\jaxp\\transform\\jdk8004476' \\
        -J-Dtest.java.opts= \\
        -J-Dtest.src='C:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476' \\
        -J-Dtest.tool.vm.opts='-J-ea -J-esa -J-Xmx512m -J-DCompatibilityTest.disableNetwork=true' \\
        -d 'C:\\cygwin\\home\\alanb\\testing\\jtreg\\JTwork\\classes\\3\\javax\\xml\\jaxp\\transform\\jdk8004476' -classpath 'C:\\cygwin\\home\\alanb\\testing\\jtreg\\JTwork\\classes\\3\\javax\\xml\\jaxp\\transform\\jdk8004476;C:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476;c:\\cygwin\\home\\alanb\\ws\\tl\\build\\windows-x86_64-normal-server-release\\images\\j2sdk-image\\lib\\tools.jar' -sourcepath 'C:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476' -XDignore.symbol.file=true 'C:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476\\XSLTExFuncTest.java'
result: Passed. Compilation successful

#section:main
----------messages:(3/127)----------
command: main XSLTExFuncTest
reason: User specified action: run main/othervm XSLTExFuncTest
elapsed time (seconds): 127.81
----------System.out:(4/58)----------

Number of tests passed: 0
Number of tests failed: 4

----------System.err:(32/1597)----------
ERROR:  'Could not compile stylesheet'
FATAL ERROR:  'Connection timed out: connect'
           :Connection timed out: connect
ERROR:  'Could not compile stylesheet'
FATAL ERROR:  'Connection timed out: connect'
           :Connection timed out: connect
ERROR:  'Could not compile stylesheet'
FATAL ERROR:  'Connection timed out: connect'
           :Connection timed out: connect
ERROR:  'Could not compile stylesheet'
FATAL ERROR:  'Connection timed out: connect'
           :Connection timed out: connect
java.lang.RuntimeException: Connection timed out: connect
Connection timed out: connect
Connection timed out: connect
Connection timed out: connect
        at TestBase.tearDown(TestBase.java:64)
        at XSLTExFuncTest.main(XSLTExFuncTest.java:86)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
        at java.lang.Thread.run(Thread.java:744)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Connection timed out: connect
Connection timed out: connect
Connection timed out: connect
Connection timed out: connect
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Connection timed out: connect Connection timed out: connect Connection timed out: connect Connection timed out: connect
----------rerun:(21/2300)*----------
'PATH=C:\\cygwin\\usr\\local\\bin;C:\\cygwin\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Program Files\\TortoiseHg' \\
SystemDrive=C: \\
'SystemRoot=C:\\Windows' \\
'TEMP=C:\\cygwin\\tmp' \\
'TMP=C:\\cygwin\\tmp' \\
'windir=C:\\Windows' \\
'CLASSPATH=C:\\cygwin\\home\\alanb\\jtreg\\lib\\javatest.jar;C:\\cygwin\\home\\alanb\\jtreg\\lib\\jtreg.jar;C:\\cygwin\\home\\alanb\\testing\\jtreg\\JTwork\\classes\\3\\javax\\xml\\jaxp\\transform\\jdk8004476;C:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476;c:\\cygwin\\home\\alanb\\ws\\tl\\build\\windows-x86_64-normal-server-release\\images\\j2sdk-image\\lib\\tools.jar' \\
    'c:\\cygwin\\home\\alanb\\ws\\tl\\build\\windows-x86_64-normal-server-release\\images\\j2sdk-image\\bin\\java' \\
        -Dtest.vm.opts='-ea -esa -Xmx512m -DCompatibilityTest.disableNetwork=true' \\
        -Dtest.class.path.prefix='C:\\cygwin\\home\\alanb\\testing\\jtreg\\JTwork\\classes\\3\\javax\\xml\\jaxp\\transform\\jdk8004476;C:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476' \\
        -Dtest.jdk='c:\\cygwin\\home\\alanb\\ws\\tl\\build\\windows-x86_64-normal-server-release\\images\\j2sdk-image' \\
        -Dtest.src.path='C:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476' \\
        -Dtest.compiler.opts= \\
        -Dcompile.jdk='c:\\cygwin\\home\\alanb\\ws\\tl\\build\\windows-x86_64-normal-server-release\\images\\j2sdk-image' \\
        -Dtest.classes='C:\\cygwin\\home\\alanb\\testing\\jtreg\\JTwork\\classes\\3\\javax\\xml\\jaxp\\transform\\jdk8004476' \\
        -Dtest.class.path='C:\\cygwin\\home\\alanb\\testing\\jtreg\\JTwork\\classes\\3\\javax\\xml\\jaxp\\transform\\jdk8004476' \\
        -Dtest.java.opts= \\
        -Dtest.src='C:\\cygwin\\home\\alanb\\ws\\tl\\jdk\\test\\javax\\xml\\jaxp\\transform\\jdk8004476' \\
        -Dtest.tool.vm.opts='-J-ea -J-esa -J-Xmx512m -J-DCompatibilityTest.disableNetwork=true' \\
        -ea -esa -Xmx512m -DCompatibilityTest.disableNetwork=true \\
        com.sun.javatest.regtest.MainWrapper 'C:\\cygwin\\home\\alanb\\testing\\jtreg\\JTwork\\classes\\3\\javax\\xml\\jaxp\\transform\\jdk8004476\\XSLTExFuncTest.jta'
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Connection timed out: connect Connection timed out: connect Connection timed out: connect Connection timed out: connect


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Connection timed out: connect Connection timed out: connect Connection timed out: connect Connection timed out: connect

Comments
Dev/sustaining has automatic SQE approval for test only fixes as per http://wiki.se.oracle.com/display/JPG/SQE+approval+policy+on+regression+test+ONLY+fixes+in+update+releases.
31-01-2014

The above changeset was for JDK-8028822. I accidentally left the wrong bug id when editing the commit message. I've manually added the record to JDK-8028822.
06-12-2013

RFR: http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-November/023442.html
25-11-2013

http://cr.openjdk.java.net/~pzhang/8027973/webrev/
21-11-2013

Suggested Fix: Replace "file://" with "file:///". It should work on windows and it will not impact other platforms like Linux or Solaris.
21-11-2013

Root Cause: The problem is caused by wrong file URL on windows. =================== protected void setUp() { ....... xslFileId = "file://" + xslFile; } =================== On windows, xsFile looks like "c:\xyz" and does not have one "/" at head. Then the schema format is incorrect.
21-11-2013