[
https://issues.apache.org/jira/browse/POOL-356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16662754#comment-16662754
]
ASF GitHub Bot commented on POOL-356:
-------------------------------------
Github user coveralls commented on the issue:
https://github.com/apache/commons-pool/pull/11
[](https://coveralls.io/builds/19703092)
Coverage increased (+0.3%) to 85.174% when pulling
**016a1f67263fe1cde1d910dc7002d972811951c5 on struberg:POOL-356** into
**d4e0e88227ad91d8c8ef36ba01d656f71c770f83 on apache:master**.
> deadlock if borrowObject gets called to fast and maxIdle is 0
> -------------------------------------------------------------
>
> Key: POOL-356
> URL: https://issues.apache.org/jira/browse/POOL-356
> Project: Commons Pool
> Issue Type: Bug
> Affects Versions: 2.6.0
> Reporter: Mark Struberg
> Assignee: Mark Struberg
> Priority: Major
> Fix For: 2.6.1
>
>
> I figured this while creating a unit test for OpenJPA. But also did see this
> in real production with commons-dbcp2. See DBCP-513 for more info.
> See this comment for a precise explanation what happens
> https://issues.apache.org/jira/browse/DBCP-513?focusedCommentId=16660545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16660545
> The problem is basically that the logic to immediately destroy a pool object
> does not notify the DeLinkedQueue:
> {code}
> if (isClosed() || maxIdleSave > -1 && maxIdleSave <=
> idleObjects.size()) {
> try {
> destroy(p);
> {code}
> But the borrowObject code is locking on that condition...
> {code}
> if (borrowMaxWaitMillis < 0) {
> p = idleObjects.takeFirst();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)