
On Fri, 30 Sep 2011 18:36:54 +0200, Ceki Gülcü wrote:
I don't see how anything a caller of logback, in this case zookeeper, could do to cause the readLock to be unlocked before it is locked. Actually, how could you trigger the observed behavior even if you wanted to trigger it on purpose? Do you have any ideas?
The most common cause seems to be a swallowed inner exception. Several other findings seem to support this: http://java.net/jira/browse/GLASSFISH-1881 http://lists.terracotta.org/pipermail/ehcache-list/2011-July/thread.html http://cs.oswego.edu/pipermail/concurrency-interest/2006-June/002738.html See last one for a good example. Curiously it seems that this problem reared its head some time ago: http://qos.ch/pipermail/logback-dev/2009-February/003620.html though I think that was more about safe lock usage, which seems to be addressed now. Maybe somehow there _is_ a silent exception happening between Logger.appendLoopOnAppenders() and AAI, since it also appears on the JIRA's stack trace? I'm not familiar enough with logback's internals to make more educated guesses right now. The only thing I can immediately think of would be some weird recursive logging from a threaded appender, with bits of StackOverflow (maybe causing more logging..) thrown in. -h