Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77C497527 for ; Wed, 21 Dec 2011 17:45:54 +0000 (UTC) Received: (qmail 59452 invoked by uid 500); 21 Dec 2011 17:45:54 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 59364 invoked by uid 500); 21 Dec 2011 17:45:54 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 59347 invoked by uid 99); 21 Dec 2011 17:45:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2011 17:45:54 +0000 X-ASF-Spam-Status: No, hits=-2002.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2011 17:45:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 299CA11F60E for ; Wed, 21 Dec 2011 17:45:32 +0000 (UTC) Date: Wed, 21 Dec 2011 17:45:32 +0000 (UTC) From: "Phil Steitz (Closed) (JIRA)" To: issues@commons.apache.org Message-ID: <536360562.36174.1324489532171.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1558914559.14568.1314298109503.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (POOL-189) close() does not release threads blocked on borrowObject() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/POOL-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz closed POOL-189. ---------------------------- > close() does not release threads blocked on borrowObject() > ---------------------------------------------------------- > > Key: POOL-189 > URL: https://issues.apache.org/jira/browse/POOL-189 > Project: Commons Pool > Issue Type: Bug > Affects Versions: 1.5.6 > Environment: java 1.6.0_24 > Reporter: Adrian Nistor > Fix For: 1.5.7 > > Attachments: BUG-189v1.diff, BUG-189v2.diff, Test.java > > > Hi, > When I call close() and borrowObject() concurrently with no objects in > the pool, close() will finish but borrowObject() is blocked forever. > The documentation of close() mentions that borrowObject() should fail > with IllegalStateException, so I would expect the waiting threads to > throw IllegalStateException. > I will attach a test that exposes this problem. For this test, the > expected output is: > 0 > 1 > 2 > ... > 4999 > DONE > But when the bug manifests (almost always for this test), the output > is: > 0 > 1 > 2 > The test does not finish, it just gets stuck after printing several > values. > Is this a bug or am I reading the documentation wrongly? Is there > a patch for this? > Thanks! > Adrian -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira