commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mayur Naik" <mayur.n...@gmail.com>
Subject deadlocks in dbcp?
Date Fri, 15 Aug 2008 16:23:39 GMT
Hello,

I'm developing a static deadlock checking tool for Java and am
evaluating it on open-source programs.  I ran it on the latest dbcp
source code (from svn) using the latest pool source code (also from
svn) and here are the results:

http://chord.stanford.edu/dbcp1.3/deadlocks.html

The first three reports, under groups 1-3, point to the deadlock
reported in DBCP-44 (https://issues.apache.org/jira/browse/DBCP-44).
I presume this problem is still unresolved?

The remaining reports all seem to point to a previously unknown
deadlock, and they all seem to occur because the close() method in
PoolableConnection is synchronized.  Can a dbcp developer confirm if
any of these reports points to a real deadlock (or whether they are
all false positives)?  Also, it seems like they are related to DBCP-49
(https://issues.apache.org/jira/browse/DBCP-49) which is where the
close() method was first synchronized.

If you want me to run the deadlock checker more extensively, let me
know.  The test case I currently have
(http://chord.stanford.edu/dbcp1.3/T.java.html) excludes many usage
scenarios.  Anyone who knows scenarios I'm missing or has test cases
exercising those scenarios can point them out to me.  They don't have
to be too "concrete": the tool does static analysis which ignores
specific values of timers, flags, etc.  So even one "abstract" test
case like the above one actually covers several concrete test cases.

Also let me know if you need help interpreting the above deadlock reports.

Lastly, as some of the dbcp concurrency issues listed in jira
indicate, deadlocks and races are related in that fixing a race can
introduce deadlocks and vice versa.  I also have a static race
checking tool which I applied long ago to pool and found a bunch of
races which the pool folks fixed.  I'm not working on that tool right
now but in around a month's time, I would be happy to run both the
deadlock and race checkers on dbcp+pool.

Thanks,

-- Mayur

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


Mime
View raw message