Bugs item #747143, was opened at 2003-06-01 13:57
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=747143&group_id=22866

Category: JBossCMP
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Veliath (andrewtv)
Assigned to: Nobody/Anonymous (nobody)
Summary: CMR exception when many threads get 1-side from N-side

Initial Comment:
OS: Linux
JDK: 1.4.0_04

We have experienced a new exception going from 3.2.0RC1
to 3.2.1 regarding CMR's under load (with MySQL and
InnoDB).  Here is the scenario: there are 2 EJB 2.0
beans using CMR, Partition and StationGroup (there are
many more, but use these two for example). There is a
1-N relation from Partition to StationGroup, and there
is some code that retrieves the PartitionLocal from the
station group side (i.e. retrieving the 1-side local
intf from the N-side intf).  All methods in Partition
and StationGroup have the "Required"
trans-attribute, and non are marked read-only.  Note
this problem does not occur in 3.2.0RC1, but in 3.2.1
it appears to happen in about 1/500 cases under
moderate load.  Since it is hard to reproduce it sounds
like some sort of race or synchronization issue.

The problem appears to happen here--it seems that doing
"partLocal = sg.getPartition()" (N-side retrieving
1-side local) to retrieve the PartitionLocal seems to
lock and load the entire Partition bean, however it
does not appear to lock Partition properly and multiple
threads that call sg.getPartition can somehow interfere
with each other (i.e. many N-side threads call
get1Side()), causing JDBCCMRFieldBridge.FieldState to
be invalidate()d and the other threads calling
sg.getPartition() from different StationGroups will
start throwing NPEs (in loadRelations typically since
setHandle[0] is then null I assume),
ConcurrentModificationExceptions, etc.

This is sort of the *opposite* test of the current
CMRStressTestCase (many N-side threads getting the
1-side, instead of many threads getting the N-side from
the 1-side), and the only difference is that our get
methods are not marked as read-only at the moment.  I
agree a test case will help for this.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=747143&group_id=22866


-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to