[JBoss JIRA] Updated: (JBMESSAGING-355) Remove possibility of delivery race conditions
by Ovidiu Feodorov (JIRA)
[ http://jira.jboss.com/jira/browse/JBMESSAGING-355?page=all ]
Ovidiu Feodorov updated JBMESSAGING-355:
----------------------------------------
Fix Version/s: 1.0.2.CR1
(was: 1.2.1)
This race condition affects 1.0.1.GA. See http://cruisecontrol.jboss.com/cc/buildresults/jms-1.0-testsuite?log=log2...
Clebert's comments:
It is a race condition between delivery and cancelDeliveries...
The delivery (on server side) is being incremented at ChannelSupport/deliveryInternal
CancelDelivery (SimpleDelivery) is not rolling back the reference count.
> Remove possibility of delivery race conditions
> ----------------------------------------------
>
> Key: JBMESSAGING-355
> URL: http://jira.jboss.com/jira/browse/JBMESSAGING-355
> Project: JBoss Messaging
> Issue Type: Task
> Reporter: Tim Fox
> Assigned To: Tim Fox
> Fix For: 1.0.2.CR1
>
> Attachments: race-condition.log
>
> Original Estimate: 3 days
> Remaining Estimate: 3 days
>
> Currently race conditions can occur on message delivery where the delivery is acknowledged or cancelled before the call to handle has returned.
> In ChannelState we defensively program against this by synchronizing on the returned delivery and by dealing with the situation where the delivery does not exist in the channel state and ignoring.
> See ChannelSupport::deliver() and ChannelState.cancelDelivery.
> This approach has the following problems:
> Complexity of code to maintain and understand.
> Where acks return quickly we are likely to get contention on the lock in ChannelSupport::deliver, thus reducing throughput.
> A much simpler solution enables us to remove the possibility of such race conditions and remove the corresponding lock contention.
> This can be done by adding a confirm() method on Delivery.
> When the receiver receives the message in it's handle() call, before dispatching the message it calls Delivery::confirm. This results in the channel adding the delivery to the channel state. Thus we can be assured that the delivery exists before any acknowledgment or cancellation comes in.
> This is a very simple change.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Updated: (JBMESSAGING-355) Remove possibility of delivery race conditions
by Ovidiu Feodorov (JIRA)
[ http://jira.jboss.com/jira/browse/JBMESSAGING-355?page=all ]
Ovidiu Feodorov updated JBMESSAGING-355:
----------------------------------------
Attachment: race-condition.log
Attached the race condition snapshot.
> Remove possibility of delivery race conditions
> ----------------------------------------------
>
> Key: JBMESSAGING-355
> URL: http://jira.jboss.com/jira/browse/JBMESSAGING-355
> Project: JBoss Messaging
> Issue Type: Task
> Reporter: Tim Fox
> Assigned To: Tim Fox
> Fix For: 1.0.2.CR1
>
> Attachments: race-condition.log
>
> Original Estimate: 3 days
> Remaining Estimate: 3 days
>
> Currently race conditions can occur on message delivery where the delivery is acknowledged or cancelled before the call to handle has returned.
> In ChannelState we defensively program against this by synchronizing on the returned delivery and by dealing with the situation where the delivery does not exist in the channel state and ignoring.
> See ChannelSupport::deliver() and ChannelState.cancelDelivery.
> This approach has the following problems:
> Complexity of code to maintain and understand.
> Where acks return quickly we are likely to get contention on the lock in ChannelSupport::deliver, thus reducing throughput.
> A much simpler solution enables us to remove the possibility of such race conditions and remove the corresponding lock contention.
> This can be done by adding a confirm() method on Delivery.
> When the receiver receives the message in it's handle() call, before dispatching the message it calls Delivery::confirm. This results in the channel adding the delivery to the channel state. Thus we can be assured that the delivery exists before any acknowledgment or cancellation comes in.
> This is a very simple change.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Created: (JBSEAM-428) Hibernate Session closed in Seam produced component with session scope
by fguerzoni (JIRA)
Hibernate Session closed in Seam produced component with session scope
----------------------------------------------------------------------
Key: JBSEAM-428
URL: http://jira.jboss.com/jira/browse/JBSEAM-428
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.1
Environment: WIN XP SP2, jdk1.5.0_04, SEAM from CVS as 18 october 2006, Jetty-6.0.1, Tomcat-5.5.17.
Seam is used configured to work in SE environment (with microcontainer)
Reporter: fguerzoni
I get org.hibernate.SessionException: Session is closed! when accessing my project home page.
I've sligthly modified 'hibernate' example in order to match my use case.
1) The problem arises when home.xhtml is rendered and a Config javabean is created by Seam. ConfigBean has Session scope and tries to access database to get some infos.
2) The problem arises only when the entity that results from query has a relationship (eg one-to-many) to other entities.
3) The problem arises only when the object istance returned by query is a global property of ConfigBean.
4) The problem arises only in Jetty and not in Tomcat.
In oder to reach 1) I've added a property (nickName) in LoginAction which is rendered by home.xhtml. Seam then tries to create the ConfigBean I've put in example.
In order to reach 2) I've created a new entity Phone. Hotel has a one-to-many relationship with Phone entities.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Created: (JBCACHE-767) Fail more silently when setting node versions
by Owen Taylor (JIRA)
Fail more silently when setting node versions
---------------------------------------------
Key: JBCACHE-767
URL: http://jira.jboss.com/jira/browse/JBCACHE-767
Project: JBoss Cache
Issue Type: Patch
Security Level: Public (Everyone can see)
Affects Versions: 1.4.0.SP1
Reporter: Owen Taylor
Assigned To: Manik Surtani
Priority: Minor
Attachments: jbosscache-fail-more-silently-20060912.patch
Hibernate's OptimisticTreeCache.writeUpdate does:
Option option = new Option();
option.setFailSilently( true );
option.setDataVersion( NonLockingDataVersion.INSTANCE );
cache.remove( new Fqn( regionFqn, key ), "ITEM", option );
Which you would expect would remove the item if it exists, while setting the data version,
and silently do nothing otherwise. But it ends up, logging at level INFO:
12:55:38,360 INFO [org.jboss.cache.interceptors.TxInterceptor] (http-127.0.0.1-8080-1): There was a problem handling this request
java.lang.NullPointerException
at org.jboss.cache.interceptors.OptimisticNodeInterceptor.invoke(OptimisticNodeInterceptor.java:68)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.EvictionInterceptor.invoke(EvictionInterceptor.java:84)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor.invoke(OptimisticCreateIfNotExistsInterceptor.java:69)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:75)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:122)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.OptimisticReplicationInterceptor.invoke(OptimisticReplicationInterceptor.java:136)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:345)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:156)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:183)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5530)
at org.jboss.cache.TreeCache.remove(TreeCache.java:3742)
at org.jboss.cache.TreeCache.remove(TreeCache.java:3297)
at org.hibernate.cache.OptimisticTreeCache.writeLoad(OptimisticTreeCache.java:76)
There are some differences of opinion as to what should be logged at level INFO, but that's pretty clearly
too much and too scary looking. My assumption is that any NullPointerException in the logs is a serious
problem.
What the attached patch does is if the failSiliently option is set and the node doesn't exist, just skip
setting the version. If failSilenlty isn't set, then it throws a CacheException rather than the current
NullPointerException.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months