[jira] Created: (POOL-152) GenericObjectPool hangs forever in borrowObject when newly created object is not validated

4 messages Options
Embed this post
Permalink
JIRA jira@apache.org

[jira] Created: (POOL-152) GenericObjectPool hangs forever in borrowObject when newly created object is not validated

Reply Threaded More More options
Print post
Permalink
GenericObjectPool hangs forever in borrowObject when newly created object is not validated
------------------------------------------------------------------------------------------

                 Key: POOL-152
                 URL: https://issues.apache.org/jira/browse/POOL-152
             Project: Commons Pool
          Issue Type: Bug
    Affects Versions: 1.5.3, 1.5.2
            Reporter: Bushov Alexander


If your set GenericObjectPool parameters such as: maxActive = 1 and whenExhaustedAction to block, testOnBorrow to true, call borrowObject that fails in validation of newly created object then second call of borrowObject will stuck.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Updated: (POOL-152) GenericObjectPool hangs forever in borrowObject when newly created object is not validated

Reply Threaded More More options
Print post
Permalink

     [ https://issues.apache.org/jira/browse/POOL-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bushov Alexander updated POOL-152:
----------------------------------

    Attachment: borrowObject.patch
                Test.java

example and patch

> GenericObjectPool hangs forever in borrowObject when newly created object is not validated
> ------------------------------------------------------------------------------------------
>
>                 Key: POOL-152
>                 URL: https://issues.apache.org/jira/browse/POOL-152
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.2, 1.5.3
>            Reporter: Bushov Alexander
>         Attachments: borrowObject.patch, Test.java
>
>
> If your set GenericObjectPool parameters such as: maxActive = 1 and whenExhaustedAction to block, testOnBorrow to true, call borrowObject that fails in validation of newly created object then second call of borrowObject will stuck.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Resolved: (POOL-152) GenericObjectPool hangs forever in borrowObject when newly created object is not validated

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/POOL-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Thomas resolved POOL-152.
------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.4

Thanks for the report. This has now been fixed in trunk.

That patch wasn't quite right - allocate() still needs to be called since the internal processing count has changed and that may allow another object to be allocated. GenericKeyedObjectPool also needed a similar fix and I also added a test case.

> GenericObjectPool hangs forever in borrowObject when newly created object is not validated
> ------------------------------------------------------------------------------------------
>
>                 Key: POOL-152
>                 URL: https://issues.apache.org/jira/browse/POOL-152
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.2, 1.5.3
>            Reporter: Bushov Alexander
>             Fix For: 1.5.4
>
>         Attachments: borrowObject.patch, Test.java
>
>
> If your set GenericObjectPool parameters such as: maxActive = 1 and whenExhaustedAction to block, testOnBorrow to true, call borrowObject that fails in validation of newly created object then second call of borrowObject will stuck.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Closed: (POOL-152) GenericObjectPool hangs forever in borrowObject when newly created object is not validated

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/POOL-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz closed POOL-152.
----------------------------


> GenericObjectPool hangs forever in borrowObject when newly created object is not validated
> ------------------------------------------------------------------------------------------
>
>                 Key: POOL-152
>                 URL: https://issues.apache.org/jira/browse/POOL-152
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.2, 1.5.3
>            Reporter: Bushov Alexander
>             Fix For: 1.5.4
>
>         Attachments: borrowObject.patch, Test.java
>
>
> If your set GenericObjectPool parameters such as: maxActive = 1 and whenExhaustedAction to block, testOnBorrow to true, call borrowObject that fails in validation of newly created object then second call of borrowObject will stuck.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.