Re: [pool] New DBCP deadlock reported (DBCP-44)

2008-03-05 Thread Christoph Kutzinski
> > Not having thought this through all the way, I was thinking about an > > integer property that could take one of four values > > "BORROWED" - a ghost in the pool snapshot > > "IDLE" - in the pool, OK to borrow > > "DEAD" - in the pool, marked for eviction > > "VALIDATING" - in the pool, being

Re: [pool] New DBCP deadlock reported (DBCP-44)

2008-03-04 Thread Christoph Kutzinski
Phil Steitz wrote: > 3) when to do _factory.destroyObject - can't do this is the > mid-section because borrowObject could jump in and grab the destroyed > object. Need some way to prevent that, maybe by locking / marking the > ObjectTimeStampPair. That could be done after the second synch

Re: [pool] New DBCP deadlock reported (DBCP-44)

2008-03-02 Thread Phil Steitz
On Sun, Mar 2, 2008 at 6:09 AM, Christoph Kutzinski <[EMAIL PROTECTED]> wrote: > Hi Phil, > > > Phil Steitz wrote: > > Thanks, Christoph > > > > On Sat, Mar 1, 2008 at 4:21 AM, Christoph Kutzinski <[EMAIL PROTECTED]> > wrote: > >> As the 'inversed' locking order in evict() is obviously the so

Re: [pool] New DBCP deadlock reported (DBCP-44)

2008-03-02 Thread Christoph Kutzinski
Hi Phil, Phil Steitz wrote: Thanks, Christoph On Sat, Mar 1, 2008 at 4:21 AM, Christoph Kutzinski <[EMAIL PROTECTED]> wrote: As the 'inversed' locking order in evict() is obviously the source of the problems, I would try to avoid calling any _factory methods while holding the 'this' lock.

Re: [pool] New DBCP deadlock reported (DBCP-44)

2008-03-01 Thread Phil Steitz
Thanks, Christoph On Sat, Mar 1, 2008 at 4:21 AM, Christoph Kutzinski <[EMAIL PROTECTED]> wrote: > As the 'inversed' locking order in evict() is obviously the source of > the problems, I would try to avoid calling any _factory methods while > holding the 'this' lock. +1 evict and addObject curr

Re: [pool] New DBCP deadlock reported (DBCP-44)

2008-03-01 Thread Christoph Kutzinski
As the 'inversed' locking order in evict() is obviously the source of the problems, I would try to avoid calling any _factory methods while holding the 'this' lock. I thinking about something like this: public void evict() { CursorableLinkedList tmpPool; Collection connsToEvict = new Array

[pool] New DBCP deadlock reported (DBCP-44)

2008-02-29 Thread Phil Steitz
Pool 1.4 has made DBCP-44 worse. The synchronization changes implemented to address other issues in pool 1.4 have created more opportunities for Evictor / client contention for locks on the pool and factory-related objects. The stack trace added to DBCP-44 on 27-feb-08 shows a new deadlock. That