Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1074546

Summary: SimpleMarshallerTests.testConcurrentHashMap fails on Java 8
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Ladislav Thon <lthon>
Component: RemotingAssignee: Panagiotis Sotiropoulos <psotirop>
Status: CLOSED WONTFIX QA Contact: Ladislav Thon <lthon>
Severity: unspecified Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.3.0CC: cdewolf, psotirop
Target Milestone: ---   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-25 11:39:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1104190    

Description Ladislav Thon 2014-03-10 14:18:38 UTC
[Putting to the Remoting component, as there is no Marshalling component.]

Description of problem:

The org.jboss.test.marshalling.SimpleMarshallerTests.testConcurrentHashMap test from JBoss Marshalling test suite is failing with Java 8 on JBoss Marshalling from EAP 6.3.0.DR2.

Version-Release number of selected component (if applicable):

EAP 6.3.0.DR2, JBoss Marshalling 1.4.3, Java 1.8.0-b128 (that's what we've got on Jenkins, I tried locally with 1.8.0-b132 and it fails too)

How reproducible:

Always

Steps to Reproduce:
1. Run the JBoss Marshalling test suite with Java 8

Actual results:

SimpleMarshallerTests.testConcurrentHashMap fails

Expected results:

All tests pass

Additional info:

I've seen that there's already JBoss Marshalling 1.4.4, but it fails on Java 8 too.

For test runs, see:

https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-Marshalling/job/eap-60-marshalling-testsuite-RHEL-JDK-matrix-QE/29/

https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-Marshalling/job/eap-60-marshalling-testsuite-Windows-JDK-matrix-QE/36/ (yes, fails on Windows too)

https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-Marshalling/job/eap-60-marshalling-testsuite-RHEL-JDK-matrix___RHEL7-only/3/ (RHEL 7 run)

Comment 1 David M. Lloyd 2014-03-10 14:50:33 UTC
Is there an upstream bug?

Comment 2 Ladislav Thon 2014-03-11 12:52:24 UTC
It is now: https://issues.jboss.org/browse/JBMAR-160

Comment 3 David M. Lloyd 2014-04-02 14:20:35 UTC
This problem does not affect EAP or any other internal consumers of jboss-marshalling, including WildFly (upstream) and JDG/Infinispan.  This only affects building of jboss-marshalling itself on JDK 8.

Comment 4 Panagiotis Sotiropoulos 2014-10-03 13:16:17 UTC
SimpleMarshallerTests.testConcurrentHashMap passes the test with openjdk version 1.8.0_11

Failing test is SimpleMarshallerTests.testExternalizableWithFollowingObjects 

Error : 
testExternalizableWithFollowingObjects(org.jboss.test.marshalling.SimpleMarshallerTests)  Time elapsed: 0.007 sec  <<< FAILURE!
java.io.StreamCorruptedException: Unexpected byte found when reading an object: 10
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:755)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
	at org.jboss.test.marshalling.SimpleMarshallerTests$65.runRead(SimpleMarshallerTests.java:2696)
	at org.jboss.test.marshalling.TestBase.runReadWriteTest(TestBase.java:116)
	at org.jboss.test.marshalling.SimpleMarshallerTests.testExternalizableWithFollowingObjects(SimpleMarshallerTests.java:2673)

Comment 5 Panagiotis Sotiropoulos 2014-10-07 12:49:52 UTC
Root of issue found. Not a Java 8 issue.

Comment 6 Panagiotis Sotiropoulos 2014-10-07 14:23:27 UTC
Tested with java version "1.8.0_20" (build 1.8.0_20-b26)
and openjdk version 1.8.0_11

Comment 7 Panagiotis Sotiropoulos 2014-10-08 07:06:53 UTC
testConcurrentHashMap still fails.
testExternalizableWithFollowingObjects is fixed.

Comment 8 Panagiotis Sotiropoulos 2014-10-08 10:50:21 UTC
testConcurrentHashMap using riverTestMarshallerProvider pass
testConcurrentHashMap using serialTestMarshallerProvider fail

Comment 9 Panagiotis Sotiropoulos 2014-10-10 07:33:23 UTC
Two issues:
1. Error produced during the Serial Marshalling (FIXED) :

java.lang.IllegalStateException: putFields() may not be called now
at org.jboss.marshalling.serial.SerialObjectOutputStream.putFields(SerialObjectOutputStream.java:232)
at java.util.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1404)
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 org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:284)
at org.jboss.marshalling.serial.SerialMarshaller.writeSerialData(SerialMarshaller.java:293)
at org.jboss.marshalling.serial.SerialMarshaller.doWriteObject(SerialMarshaller.java:273)
at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58)
at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:111)
at org.jboss.test.marshalling.SimpleMarshallerTests$46.runWrite(SimpleMarshallerTests.java:1344)
at org.jboss.test.marshalling.TestBase.runReadWriteTest(TestBase.java:105)
at org.jboss.test.marshalling.SimpleMarshallerTests.testConcurrentHashMap(SimpleMarshallerTests.java:1342)
Caused by: an exception which occurred:
in object java.util.concurrent.ConcurrentHashMap@ca6147a4


2. Error produced during the Serial Unmarshalling (NOT FIXED YET - Related to JDK 8) :

testConcurrentHashMap(org.jboss.test.marshalling.SimpleMarshallerTests) Time elapsed: 7 sec <<< FAILURE!
java.io.StreamCorruptedException: Unexpected lead byte 0
at org.jboss.marshalling.serial.SerialUnmarshaller.badLeadByte(SerialUnmarshaller.java:526)
at org.jboss.marshalling.serial.SerialUnmarshaller.doReadObject(SerialUnmarshaller.java:335)
at org.jboss.marshalling.serial.BlockUnmarshaller.readObject(BlockUnmarshaller.java:136)
at org.jboss.marshalling.serial.BlockUnmarshaller.readObject(BlockUnmarshaller.java:122)
at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:53)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
at java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1443)
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 org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:320)
at org.jboss.marshalling.serial.PlainDescriptor.doReadObject(PlainDescriptor.java:94)
at org.jboss.marshalling.serial.PlainDescriptor.readSerial(PlainDescriptor.java:68)
at org.jboss.marshalling.serial.SerialUnmarshaller.doReadSerialObject(SerialUnmarshaller.java:348)
at org.jboss.marshalling.serial.SerialUnmarshaller.doReadObject(SerialUnmarshaller.java:288)
at org.jboss.marshalling.serial.SerialUnmarshaller.doReadObject(SerialUnmarshaller.java:74)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
at org.jboss.test.marshalling.SimpleMarshallerTests$46.runRead(SimpleMarshallerTests.java:1350)
at org.jboss.test.marshalling.TestBase.runReadWriteTest(TestBase.java:116)
at org.jboss.test.marshalling.SimpleMarshallerTests.testConcurrentHashMap(SimpleMarshallerTests.java:1342)

Comment 10 JBoss JIRA Server 2014-10-17 11:40:22 UTC
Panagiotis Sotiropoulos <panossot> updated the status of jira JBMAR-170 to Closed

Comment 11 Panagiotis Sotiropoulos 2014-10-17 11:43:40 UTC
PR sent : 
https://github.com/jboss-remoting/jboss-marshalling/pull/26

Comment 12 Panagiotis Sotiropoulos 2014-10-17 12:34:02 UTC
PR sent also against JBOSS marshalling master branch: 
https://github.com/jboss-remoting/jboss-marshalling/pull/27