beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Bellew <>
Subject FlowController.incrementRequestCount() bug
Date Thu, 22 Mar 2007 20:19:58 GMT
FlowController.incrementRequestCount() and 
FlowController.decrementRequestCount() access the variables 
_requestCount and _maxConcurrentRequestCount outside of any synchronized 
block.  This makes it possible to _requestCount, especially on a 
multi-processor machine.  The subtlety of this bug is that 
--_requestCount and ++_requestCount look atomic, but they are not.

In particular, we have an action that returns images.  Since some pages 
contain many images, this controller can be hit my many requests 
concurrently from the same session.  We hit the decrementRequestCount() 
assert quite frequently in production.

        assert _requestCount > 0 : request.getRequestURI();


View raw message