JDK-8008356 : Test java/lang/invoke/lambda/LambdaSerialization.java failing
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-02-17
  • Updated: 2013-03-22
  • Resolved: 2013-02-21
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 8
8 b82Fixed
Related Reports
Relates :  
Relates :  
Description
This test has just started failing in jdk8/tl, probably related to JDK-8004970.


#Test Results (version 2)
#Sun Feb 17 10:36:18 GMT 2013
#checksum:5549e6b105cd6a34
#-----testdescription-----
$file=/u/alanb/ws/tl/jdk/test/java/lang/invoke/lambda/LambdaSerialization.java
$root=/u/alanb/ws/tl/jdk/test
keywords=bug8004970
run=ASSUMED_ACTION main LambdaSerialization\n
source=LambdaSerialization.java
title=Lambda serialization

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

#-----testresult-----
description=file\:/u/alanb/ws/tl/jdk/test/java/lang/invoke/lambda/LambdaSerialization.java
elapsed=579 0\:00\:00.579
end=Sun Feb 17 10\:36\:18 GMT 2013
environment=regtest
execStatus=Failed. Execution failed\: `main' threw exception\: java.io.IOException\: unexpected exception type
hostname=ashtown.ie.oracle.com
javatestOS=Linux 3.2.0-23-generic (amd64)
javatestVersion=4.4
jtregVersion=jtreg 4.1 fcs b05
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build compile main
start=Sun Feb 17 10\:36\:17 GMT 2013
test=java/lang/invoke/lambda/LambdaSerialization.java
user.name=albatem
work=/u/alanb/testing/JTwork/java/lang/invoke/lambda

#section:script_messages
----------messages:(5/271)----------
JDK under test: (/u/alanb/ws/tl/build/linux-x86_64-normal-server-release/images/j2sdk-image)
java version "1.8.0-internal"
Java(TM) SE Runtime Environment (build 1.8.0-internal-albatem_2013_02_16_19_31-b00)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b18, mixed mode)


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

#section:compile
----------messages:(3/170)----------
command: compile /u/alanb/ws/tl/jdk/test/java/lang/invoke/lambda/LambdaSerialization.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.307
result: Passed. Compilation successful

#section:main
----------messages:(3/137)----------
command: main LambdaSerialization
reason: Assumed action based on file name: run main LambdaSerialization 
elapsed time (seconds): 0.272
----------System.err:(72/4485)----------
java.io.IOException: unexpected exception type
	at java.io.ObjectStreamClass.throwMiscException(ObjectStreamClass.java:1518)
	at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1097)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1782)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
	at LambdaSerialization.readAssert(LambdaSerialization.java:75)
	at LambdaSerialization.main(LambdaSerialization.java:59)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:487)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:706)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: LambdaSerialization
	at java.net.URLClassLoader$1.run(URLClassLoader.java:359)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:263)
	at java.lang.invoke.SerializedLambda$1.run(SerializedLambda.java:169)
	at java.lang.invoke.SerializedLambda$1.run(SerializedLambda.java:166)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.lang.invoke.SerializedLambda.readResolve(SerializedLambda.java:166)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:487)
	at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1091)
	... 11 more
java.io.IOException: unexpected exception type
	at java.io.ObjectStreamClass.throwMiscException(ObjectStreamClass.java:1518)
	at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1097)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1782)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
	at LambdaSerialization.readAssert(LambdaSerialization.java:75)
	at LambdaSerialization.main(LambdaSerialization.java:59)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:487)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:706)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: LambdaSerialization
	at java.net.URLClassLoader$1.run(URLClassLoader.java:359)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:263)
	at java.lang.invoke.SerializedLambda$1.run(SerializedLambda.java:169)
	at java.lang.invoke.SerializedLambda$1.run(SerializedLambda.java:166)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.lang.invoke.SerializedLambda.readResolve(SerializedLambda.java:166)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:487)
	at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1091)
	... 11 more

JavaTest Message: Test threw exception: java.io.IOException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.io.IOException: unexpected exception type


test result: Failed. Execution failed: `main' threw exception: java.io.IOException: unexpected exception type
Comments
I think this failure is related to running the tests in agentvm mode (tests run sequentially in the same VM rather than starting up a VM for each test). The java/lang/** tests are run in agentvm in JPRT so this might not duplicate locally unless you explicitly specify "-agentvm" on the jtreg command line.
17-02-2013