...I should mention that 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.
Regards, Andrew .........----------------==================---- ..--==- 01 Jun 2003 12:41:57 -0700, ..--==- Andrew Veliath (AV) discussed: AV) Hello Good People, AV) We have experienced a new exception going from 3.2.0RC1 to 3.2.1 AV) regarding CMR's under load (with MySQL and InnoDB). Here is the AV) scenario: there are 2 EJB 2.0 beans using CMR, Partition and AV) StationGroup (there are many more, but use these two for AV) example). There is a 1-N relation from Partition to StationGroup, and AV) there is some code that retrieves the PartitionLocal from the station AV) group side (i.e. retrieving the 1-side local intf from the N-side AV) intf). All methods in Partition and StationGroup have the "Required" AV) trans-attribute. Note this problem does not occur in 3.2.0RC1, but in AV) 3.2.1 it appears to happen in about 1/500 cases. AV) The problem appears to happen here--it seems that doing "partLocal = AV) sg.getPartition()" (N-side retrieving 1-side local) to retrieve the AV) PartitionLocal seems to lock and load the entire Partition bean, AV) however it does not appear to lock Partition properly and multiple AV) threads that call sg.getPartition can somehow interfere with each AV) other (i.e. many N-side threads call get1Side()), causing AV) JDBCCMRFieldBridge.FieldState to be invalidate()d and the other AV) threads calling sg.getPartition() from different StationGroups will AV) start throwing NPEs (in loadRelations typically since setHandle[0] is AV) then null I assume), ConcurrentModificationExceptions, when dealing AV) with the Partition relation data. AV) I'll try to come up with test case for this, being a race it is not AV) simple to reproduce.. It seems like a significant issue to be in a AV) production codebase, and I haven't been able to localize it to a AV) problem on the application side or find a workaround (well, yet :-). AV) If someone in jboss dev would like more info to help us figure this AV) one out we can provide more info (and perhaps additional motivation AV) :-). AV) 2003-06-01 04:58:52,628 23085794 ERROR [org.jboss.ejb.plugins.LogInterceptor] (Job#119:)java.lang.NullPointerException AV) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge$FieldState.loadRelations(JDBCCMRFieldBridge.java:1544) AV) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.load(JDBCCMRFieldBridge.java:1051) AV) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.loadInstanceResults(JDBCCMRFieldBridge.java:1160) AV) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:190) AV) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:83) AV) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:632) AV) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getInstanceValue(JDBCCMRFieldBridge.java:565) AV) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getValue(JDBCCMRFieldBridge.java:508) AV) at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:124) AV) at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59) AV) at com.five9.inf.ejb.StationGroupCMP$Proxy.getPartition(<generated>) AV) at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source) AV) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) AV) at java.lang.reflect.Method.invoke(Method.java:324) AV) at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1044) AV) at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:95) AV) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:301) AV) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) AV) at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:82) AV) at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:174) AV) at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89) AV) at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53) AV) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) AV) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243) AV) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104) AV) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117) AV) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) AV) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) AV) at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:483) AV) at org.jboss.ejb.Container.invoke(Container.java:674) AV) at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353) AV) at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38) AV) at $Proxy132.getPartition(Unknown Source) AV) partLocal = sg.getPartition(); AV) ... AV) 2003-06-01 04:58:52,632 23085798 ERROR [] (Job#119) excjavax.ejb.TransactionRolledbackLocalException: Load failed; CausedByException is: AV) null; CausedByException is: AV) Load failed; CausedByException is: AV) null AV) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:204) AV) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243) AV) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104) AV) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117) AV) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) AV) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) AV) at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:483) AV) at org.jboss.ejb.Container.invoke(Container.java:674) AV) at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353) AV) at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38) AV) at $Proxy132.getPartition(Unknown Source) AV) Andrew AV) ------------------------------------------------------- AV) This SF.net email is sponsored by: eBay AV) Get office equipment for less on eBay! AV) http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 AV) _______________________________________________ AV) JBoss-user mailing list AV) [EMAIL PROTECTED] AV) https://lists.sourceforge.net/lists/listinfo/jboss-user -- ------------------------------------------------------- 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-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
