History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: JBPAPP-355
Type: Task Task
Status: Resolved Resolved
Resolution: Done
Priority: Major Major
Assignee: Fernando Nasser
Reporter: Jay Howell
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JBoss Enterprise Platform App Edition

Merge JBAS-4698 into the next CP. This effectively fixes the oswego library. Several defects were found, including an unthreadsafe call to toArray().

Created: 04/Oct/07 10:26 AM   Updated: 04/Apr/08 08:00 PM
Component/s: Build
Affects Version/s: 4.2.0.GA_CP01 , 4.2.0.GA
Fix Version/s: 4.2.0.GA_CP02 , 4.3.0.GA_CP01
Security Level: Public (Everyone can see)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Text File ConcurrentHashMap.patch (3 kb)
2. Text File ConcurrentReaderHashMap.patch (3 kb)
3. Text File PooledExecutor.patch (2 kb)

Issue Links:
Dependency
 
This issue is a dependency of:
JBPAPP-596 Fix Race condition using the toArray(... Major Reopened
Related
 
This issue is related to:
JBAS-4697 Use of EDU.oswego.cs.dl.util.concurre... Major Closed
JBAS-4698 Oswego Concurrent needs checking for ... Major Closed

Affects: Release Notes
Help Desk Ticket Reference: https://na1.salesforce.com/50030000003i7xQ


 Description  « Hide
Original problem was that a customer was gettting an Caused by: java.util.NoSuchElementException when trying to recover from a failed transaction. The bug is from the concurrent.jar(oswego). Adrian patched the oswego jar and rebuilt it in JBAS-4698. it just needs to be included in the build.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order:
Fernando Nasser [22/Oct/07 09:35 AM]
We don't ship binary JAs, we build all from source.

It seems that Adrian used patches from the oswego site:

Adrian Brock [11/Sep/07 09:54 AM]
The two "unreleased fixes" described at the bottom of here:
http://g.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
have been applied as patches to create an oswego-concurrent:1.3.4-jboss

We could try and find those same patches and apply to our build if our concurrent version is the same (latest).

If the concurrent version is newer than the one we are currently using, you will need to assing this JIRA to "Patch Triage Team" for review.

Regards.

Jay Howell [12/Dec/07 11:39 PM]
Yep Adrian wisely fixed the code and added a new version in the repository(1.3.4-jboss). The previous version was 1.3.4-brew. Oswego is not releasing any more builds because they are in maintenance. Matter of fact, these fixes weren't released as a package, but were available as individual files on the site. 1.3.4 is the last version that will ever be released from them.

The original problem that Adrian fixed is that values, keySet, and entrySet toArray() methods were not thread safe. Adrian put a fix in there that used an iterator to build a secondary collection that we then call toArray with. This was the bug that was fixed. JBAS-4698. It doesn't look like that fix was ever moved into the cp. Actually there were a couple fixes in the oswego libraries that Adrian fixed, that didn't look like they were in EAP 4.2 CP/4.3. The version of the oswego libaries that was released for this fix(it went into 4.2.2) was 1.3.4-jboss(https://svn.jboss.org/repos/repository.jboss.org/oswego-concurrent/1.3.4-jboss/)

The problem with the 1.3.4-jboss fix is that if an entry is removed, then it leaves a null in the map. When iterating through the collections the null would be propagated to the temporary collection being used to convert to an array. The end result was that when toArray() is called, it throws a null pointer exception. So the new version 1.3.4-jboss-update1 has that fix in there. So I put a check for a null in there for the values, keyset, and entry collections. This version of the oswego libraries that was just released is 1.3.4-jboss-update1.(https://svn.jboss.org/repos/repository.jboss.org/oswego-concurrent/1.3.4-jboss-update1).

My plan is to change the build-thirdparty.xml file to reflect the new version. I also had to change the component-info.xml file in jbossxb version 1.0.0SP1-brew to reflect the compatibility with the new version of concurrent.jar.(http://repository.jboss.com/jboss/jbossxb/1.0.0.SP1-brew/component-info.xml)

I had assumed that the same build process for EAP as AS, is that an incorrect assumption. The build-thirdparty.xml file holds the versions that are to be looked up in the repository. The version is then fetched from the repository and build. I have put a new version up in the repository. The build seems to run fine with the new entry in build-thirdpary. Does EAP build do the same thing? I had made the assumption that it did.
Jay:)

Jay Howell [12/Dec/07 11:46 PM]
fixed build-thirdparty.xml file to point to the fixed Oswego library in the repository.

Jay Howell [13/Dec/07 12:23 AM]
Also please note. The patch files for patching the Oswego 1.3.4 distribution to the currently fixed oswego libraries are located in the repository, under http://repository.jboss.com/oswego-concurrent/1.3.4-jboss-update1/src/
Jay:)

Fernando Nasser [13/Dec/07 09:27 AM]
Sorry Jay, we can't use binary JARs in EAP.

I am reverting your change in the branch. Please peovide a source code diff against oswego-concurrent 1.3.4 so we can rebuild it with the patch. You can attach it to this JIRA and leave the building, uploading etc to us.

Regards,
Fernando

Jay Howell [13/Dec/07 11:09 AM]
I provided the patch files to make a brew build. I also included the original source.

They are at http://repository.jboss.com/oswego-concurrent/1.3.4-jboss-update1/src/

Why aren't the patch files enough. Do I have to attach this to this defect also?

Cheers, Jay:)

Jay Howell [13/Dec/07 11:51 AM]
Assigning to the Patch Triage Team with the patch files attached.

Alex Pinkin [09/Jan/08 05:38 PM]
re-assigned to Fernando for feedback

Fernando Nasser [24/Jan/08 02:42 PM]
Branch upgraded to 1.3.4.patch01-brew (which contain the 3 patches).
Hudson tests run and <compatible> lines added to Messaging and JBossXB.

Fernando Nasser [04/Apr/08 08:00 PM]
With the branch unification, this will be also on EAP 4.3 CP01