felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: Deadlock in Felix
Date Wed, 30 Jan 2008 10:20:25 GMT
Felix Meschberger wrote:
> Hi Niclas,
> The problem is (a) the generous synchronisation of Log4J and (b) locking
> used by stuff used for class loading. In our projects we regularly face
> issues between Log4J and our ClassLoader implementations synchronizing
> on ClassLoader.loadClass().
> The deadlock occurrs because both parties - framework and Log4J - lock
> "big" parts of their code and call to code outside of their scope while
> being locked: the framework calls the LogService outside of the
> framework and Log4J calls into class loading outside of Log4J.
> On solution, I could imagine, is not using Log4J, which may or may not
> be an option. Maybe SLF4J or Logback could be an option here ? [ In
> Sling we actually use Logback as a logging backend for our LogService
> implementation ]
After I read Niclas problems, I think that I had this problem once or twice
in Sling as well - a very rare deadlock during a logging statement. I 
never investigated further as a restart solved the problem :) and it 
occured only for one day two weeks ago.
So I fear switching to a different logging implementation makes things 
better but not optimal :)

Carsten Ziegeler

View raw message