Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 47464 invoked from network); 22 Mar 2011 00:38:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Mar 2011 00:38:50 -0000 Received: (qmail 27501 invoked by uid 500); 22 Mar 2011 00:38:49 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 27432 invoked by uid 500); 22 Mar 2011 00:38:49 -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 27424 invoked by uid 99); 22 Mar 2011 00:38:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2011 00:38:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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; Tue, 22 Mar 2011 00:38:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B5CB7413FB for ; Tue, 22 Mar 2011 00:38:05 +0000 (UTC) Date: Tue, 22 Mar 2011 00:38:05 +0000 (UTC) From: "Phil Steitz (JIRA)" To: issues@commons.apache.org Message-ID: <1843935307.2904.1300754285741.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <16441002.43591293546287577.JavaMail.jira@thor> Subject: [jira] [Commented] (POOL-179) GenericObjectPool.borrowObject() incorrectly swallos InterruptedException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/POOL-179?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D130094= 90#comment-13009490 ]=20 Phil Steitz commented on POOL-179: ---------------------------------- The current code in the 2.0 branch contains this same bug. I will port the= fix to the 2.0 code for the time being (we have talked about replacing the= core implementation in 2.0). > GenericObjectPool.borrowObject() incorrectly swallos InterruptedException > ------------------------------------------------------------------------- > > Key: POOL-179 > URL: https://issues.apache.org/jira/browse/POOL-179 > Project: Commons Pool > Issue Type: Bug > Affects Versions: 1.5.5 > Environment: mac osx 10.5.8 jdk 1.6.0_22 > Reporter: Axel Gro=C3=9Fmann > Fix For: 1.5.6 > > Attachments: FileDiff154-155.jpg > > > I just updated from commpons-pool 1.5.4 to 1.5.5 and suddenly some of my = tests crash with threads hanging. > After some inspection is appears that GenericObjectPool.borrowObject() no= longer handles InterruptedException correctly. I made a file diff and foun= d that there has been a modification in that area that contains the bug. Se= e attached image. > I have created a patched version absed on 1.5.4 source which works correc= tly in my use case. The important part is: > {code:java} > catch (final InterruptedException e) > { > synchronized (this) > { > if (latch.getPair() =3D=3D null) > { > _allocationQueue.remove(latch); > } > else > { > _numInternalProcessing--; > _numActive++; > _allocationQueue.remove(latch); > returnObject(latch.getPair().value); > } > } > Thread.currentThread().interrupt(); > throw e; > } > {code}=20 -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira