commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39340] - [pool] Infinite loop in Evictor of GenericKeyedObjectPool
Date Wed, 19 Apr 2006 03:25:36 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39340>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39340


sandymac@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From sandymac@apache.org  2006-04-19 03:25 -------
Could you provide some test code that triggers this infinite loop? Based on your
description I couldn't reproduce the problem.

As I read it, according to what you say the following should deadlock the pool
as eviction is synchronized and an infinite loop in the evictor wouldn't allow
other threads to borrow or return objects.

GenericKeyedObjectPool pool = ...;
pool.setMaxTotal(3);
pool.setMaxIdle(3);
pool.setTimeBetweenEvictionRunsMillis(100);
PoolUtils.prefill(pool, "a", 3);
Thread.sleep(150);
pool.borrowObject("a");

The last line would block forever waiting for the evictor to release it's
synchronization but in my test code all those lines execute and return promptly.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message