Bug 1006079 - Serialization failing due to non-sorted OTCs
Summary: Serialization failing due to non-sorted OTCs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER4
: 6.0.0
Assignee: Edson Tirelli
QA Contact: Tomas Schlosser
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-10 00:56 UTC by Edson Tirelli
Modified: 2014-08-06 20:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:19:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Edson Tirelli 2013-09-10 00:56:31 UTC
Description of problem:
Serialization is failing intermittently in different platforms due to OTCs not being sorted prior to serialization.

Comment 2 Edson Tirelli 2013-09-10 01:08:47 UTC
This problem is very hard to isolate in a test because it happens randomly. It depends on the hashcode of objects calculated by the JVM. Given that, I am not adding a test case.

Comment 7 Tomas Schlosser 2013-10-18 10:45:19 UTC
Edson, could you share the environment you encountered the problem in? I am trying to verify the issue, but I can't get the error even with older BRMS versions.

Comment 8 Edson Tirelli 2013-10-18 13:23:55 UTC
Tomas, I was unable to create a test case that would reproduce the problem because it depends on how the JVM calculates the hashcode of the OTCs. This is JVM/OS dependent.

The only thing you can do to verify is create a positive test, meaning you would check the lexicographic order of the OTCs that were serialized to the byte[]/disk, but even this is very low level and would not test the code for failures, only for successes. This is why I did not add such a test. 

Having said that, we have hundreds of serialization tests that indirectly test this code by doing double roundtrip. I.e., each serialization test we have will do:

1. create a session "a"
2. serialize "a" into byte[] "x"
3. deserialize "x" into a new session "b"
4. serialize "b" into byte[] "y"
5. compare "x" and "y" for equality

If the problem still exists, eventually some of these tests will fail (that is how we caught the problem). It is not ideal, but as I said, since it is dependent on JVM/OS, it is quite hard to enforce reproducibility.

Comment 9 Tomas Schlosser 2013-10-18 13:54:55 UTC
Could you, please, tell me the configuration (OS and JVM) where the original was discovered? I'd like to at least try to reproduce it.

Comment 10 Edson Tirelli 2013-10-18 18:21:16 UTC
Sent an e-mail to the team copying you.

Comment 11 Tomas Schlosser 2013-10-22 13:49:33 UTC
The issue is very hard to reproduce. I have looked over the code of the fix and mark this issue as verified in BRMS.6.0.0.ER4.


Note You need to log in before you can comment on or make changes to this bug.