|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (POOL-147) Thread stuck in GenericObjectPool borrowObject()Thread stuck in GenericObjectPool borrowObject()
------------------------------------------------ Key: POOL-147 URL: https://issues.apache.org/jira/browse/POOL-147 Project: Commons Pool Issue Type: Bug Affects Versions: 1.5.1 Reporter: Giambattista Bloisi Priority: Minor In my application I found a thread stuck at GenericObjectPool.borrowObject(GenericObjectPool.java:1099) even though resources were availbale (in my case connections for DBCP). After an analysis of the code I think I spotted what could have caused this behavior. GenericObjectPool.java:1099 line corresponds to an indefinite wait to a "latch" object. This wait should be awaken when new resources are made available to the pool. The problem is likely that borrowObject enters in wait without performing "latch.getPair()" check in a critical section. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Updated: (POOL-147) Thread stuck in GenericObjectPool borrowObject()[ https://issues.apache.org/jira/browse/POOL-147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Giambattista Bloisi updated POOL-147: ------------------------------------- Attachment: 01-borrowObject.patch Proposed patch > Thread stuck in GenericObjectPool borrowObject() > ------------------------------------------------ > > Key: POOL-147 > URL: https://issues.apache.org/jira/browse/POOL-147 > Project: Commons Pool > Issue Type: Bug > Affects Versions: 1.5.1 > Reporter: Giambattista Bloisi > Priority: Minor > Attachments: 01-borrowObject.patch > > > In my application I found a thread stuck at GenericObjectPool.borrowObject(GenericObjectPool.java:1099) even though resources were availbale (in my case connections for DBCP). > After an analysis of the code I think I spotted what could have caused this behavior. GenericObjectPool.java:1099 line corresponds to an indefinite wait to a "latch" object. This wait should be awaken when new resources are made available to the pool. The problem is likely that borrowObject enters in wait without performing "latch.getPair()" check in a critical section. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Resolved: (POOL-147) Thread stuck in GenericObjectPool borrowObject()[ https://issues.apache.org/jira/browse/POOL-147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Thomas resolved POOL-147. ------------------------------ Resolution: Fixed Fix Version/s: 1.5.2 Many thanks for the report, your analysis and the patch. One day all bug reports will be like this one ;) I only made one change to your patch which was to break out of the loop as soon as we know we have been allocated an object. Again, many thanks. > Thread stuck in GenericObjectPool borrowObject() > ------------------------------------------------ > > Key: POOL-147 > URL: https://issues.apache.org/jira/browse/POOL-147 > Project: Commons Pool > Issue Type: Bug > Affects Versions: 1.5.1 > Reporter: Giambattista Bloisi > Priority: Minor > Fix For: 1.5.2 > > Attachments: 01-borrowObject.patch > > > In my application I found a thread stuck at GenericObjectPool.borrowObject(GenericObjectPool.java:1099) even though resources were availbale (in my case connections for DBCP). > After an analysis of the code I think I spotted what could have caused this behavior. GenericObjectPool.java:1099 line corresponds to an indefinite wait to a "latch" object. This wait should be awaken when new resources are made available to the pool. The problem is likely that borrowObject enters in wait without performing "latch.getPair()" check in a critical section. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
| Free embeddable forum powered by Nabble | Forum Help |