Issue Details (XML | Word | Printable)

Key: POOL-113
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Sebb
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Pool

Inconsistent synch in InvalidEvictorLender, GenericKeyedObjectPool, GenericObjectPool

Created: 09/Dec/07 01:19 AM   Updated: 20/Dec/07 12:29 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works InvalidEvictorLender.txt 2007-12-09 01:19 AM Sebb 0.8 kB


 Description  « Hide
InvalidEvictorLender does not always synchronize referant field.

Patch to follow - please check that the correct synch object is used.

Similar problems apply to GenericKeyedObjectPool:

Inconsistent synchronization of org.apache.commons.pool.impl.GenericKeyedObjectPool._testOnBorrow; locked 66% of time
GenericKeyedObjectPool.java line 913
Inconsistent synchronization of org.apache.commons.pool.impl.GenericKeyedObjectPool._testOnReturn; locked 66% of time
GenericKeyedObjectPool.java line 1096

And to GenericObjectPool:

Inconsistent synchronization of org.apache.commons.pool.impl.GenericObjectPool._testOnBorrow; locked 66% of time
GenericObjectPool.java line 915
Inconsistent synchronization of org.apache.commons.pool.impl.GenericObjectPool._testOnReturn; locked 66% of time
GenericObjectPool.java line 1017



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #603449 Wed Dec 12 03:45:21 UTC 2007 psteitz Made _testOnBorrow, _testOnReturn volatile and removed syncrhonization in
associated getters and setters in GenericObjectPool, GenericKeyedObjectPool.
Made getNumIdle synchronized in StackKeyedObjectPool.

JIRA: POOL-113
Reported and by Sebastian Bazley (grace FindBugs)
Files Changed
MODIFY /commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
MODIFY /commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java
MODIFY /commons/proper/pool/branches/1_4_RELEASE_BRANCH/xdocs/changes.xml
MODIFY /commons/proper/pool/branches/1_4_RELEASE_BRANCH/src/java/org/apache/commons/pool/impl/GenericObjectPool.java

Repository Revision Date User Message
ASF #603451 Wed Dec 12 04:00:46 UTC 2007 psteitz Porting POOL-113 fixes from 1.4 release branch.

Made _testOnBorrow, _testOnReturn volatile and removed syncrhonization in
associated getters and setters in GenericObjectPool, GenericKeyedObjectPool.
Made getNumIdle synchronized in StackKeyedObjectPool.

JIRA: POOL-113
Reported and by Sebastian Bazley (grace FindBugs)
Files Changed
MODIFY /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericKeyedObjectPool.java
MODIFY /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/StackKeyedObjectPool.java
MODIFY /commons/proper/pool/trunk/src/java/org/apache/commons/pool/impl/GenericObjectPool.java
MODIFY /commons/proper/pool/trunk/xdocs/changes.xml