commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (POOL-347) borrowObject waits for maxWaitMillis over in pool full
Date Sat, 21 Jul 2018 16:35:00 GMT


ASF GitHub Bot commented on POOL-347:

Github user garydgregory commented on the issue:
    I am using:
    Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T12:33:14-06:00)
    Maven home: C:\Java\apache-maven-3.5.4\bin\..
    Java version: 1.8.0_172, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_172\jre
    Default locale: en_US, platform encoding: Cp1252
    OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
    I tried again and it worked, but then, trying again, I get 5 errors instead of the 3 above:
    [ERROR] Tests run: 82, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 78.346 s <<<
FAILURE! - in org.apache.commons.pool2.impl.TestGenericObjectPool
    [ERROR] testConstructors(org.apache.commons.pool2.impl.TestGenericObjectPool)  Time elapsed:
0.179 s  <<< ERROR!
    java.lang.NoSuchMethodError: org.apache.commons.pool2.impl.TestGenericObjectPool$DummyFactory.<init>(Lorg/apache/commons/pool2/impl/TestGenericObjectPool$1;)V
            at org.apache.commons.pool2.impl.TestGenericObjectPool.testConstructors(
    [ERROR] testFailingFactoryDoesNotBlockThreads(org.apache.commons.pool2.impl.TestGenericObjectPool)
 Time elapsed: 0.015 s  <<< ERROR!
    java.lang.NoSuchMethodError: org.apache.commons.pool2.impl.TestGenericObjectPool$CreateFailFactory.<init>(Lorg/apache/commons/pool2/impl/TestGenericObjectPool$1;)V
            at org.apache.commons.pool2.impl.TestGenericObjectPool.testFailingFactoryDoesNotBlockThreads(
    [ERROR] testMutable(org.apache.commons.pool2.impl.TestGenericObjectPool)  Time elapsed:
0.032 s  <<< ERROR!
    java.lang.NoSuchMethodError: org.apache.commons.pool2.impl.TestGenericObjectPool$HashSetFactory.<init>(Lorg/apache/commons/pool2/impl/TestGenericObjectPool$1;)V
            at org.apache.commons.pool2.impl.TestGenericObjectPool.testMutable(
    [ERROR] testErrorFactoryDoesNotBlockThreads(org.apache.commons.pool2.impl.TestGenericObjectPool)
 Time elapsed: 0.035 s  <<< ERROR!
    java.lang.NoSuchMethodError: org.apache.commons.pool2.impl.TestGenericObjectPool$CreateErrorFactory.<init>(Lorg/apache/commons/pool2/impl/TestGenericObjectPool$1;)V
            at org.apache.commons.pool2.impl.TestGenericObjectPool.testErrorFactoryDoesNotBlockThreads(
    [ERROR] testEqualsIndiscernible(org.apache.commons.pool2.impl.TestGenericObjectPool) 
Time elapsed: 0.005 s  <<< ERROR!
    java.lang.NoSuchMethodError: org.apache.commons.pool2.impl.TestGenericObjectPool$HashSetFactory.<init>(Lorg/apache/commons/pool2/impl/TestGenericObjectPool$1;)V
            at org.apache.commons.pool2.impl.TestGenericObjectPool.testEqualsIndiscernible(
    Now I am trying to build without the patch and it passes. I tried 3 times in a row without
errors. Each build (mvn clean test) takes about 5:15 minutes.
    So there is a side-effect in play with the patch... Can you run the build many times in
a row and report?

> borrowObject waits for maxWaitMillis over in pool full
> ------------------------------------------------------
>                 Key: POOL-347
>                 URL:
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 2.4.3, 2.5.0, 2.6.0
>            Reporter: Shunsuke Nakamura
>            Priority: Critical
> Since POOL-303's [fix|],
even if we specify maxWaitMillis, object creation continues waiting for longer time without
any hard limit at [this line|].

> Here's the actual stacktrace:
> {code}
>    java.lang.Thread.State: WAITING (on object monitor)
> 	at java.lang.Object.wait(Native Method)
> 	- waiting on <0x0000000741158358> (a java.lang.Object)
> 	at java.lang.Object.wait(
> 	at org.apache.commons.pool2.impl.GenericObjectPool.create(
> 	- locked <0x0000000741158358> (a java.lang.Object)
> 	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(
> 	at org.apache.commons.pool2.impl.TestGenericObjectPool.testReturnBorrowObjectWithingMaxWaitMillis(
> {code}
> As example of this issue, 
> we use Jedis2.9 with commons-pool 2.4.3 and maxWaitMillis=500ms in our environment.
> However, when master node is down and the connection pool for the node is full, succeeding
JedisConnections wait there forever until pool is free. 
> Therefore, borrowObject (and the aborting) of last connections takes 40 ~ 80 sec at worst
> In order to avoid such situations, we should set hard limit to wait by reusing maxWaitMillis
or another value.  

This message was sent by Atlassian JIRA

View raw message