felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Problems with deadlocks in the framework
Date Tue, 28 Jun 2011 14:14:15 GMT

we're experiencing some deadlocks or more precisely starvations in the
framework. At some point we have three threads where two are waiting
for the bundle lock and one for the global lock. But noone is actually
holding this lock. So it seems that no notification has been send to
get one of these threads out of the wait state.

We're not sure yet, what the exact problem is and unfortunately it
seems that this is very hard to reproduce. This happens with 3.0.7.

I know had a quick look at the framework code and (with trunk) I see
two places where potentially a global lock might not be released:
- StatefulResolver#resolve : this method requests the global lock, but
before the try / finally block starts, an exception is thrown, but the
lock is not released
- Felix#refreshPackages : there is a lot of code between the
acquireGlobalLock and the try / finally block. If an exception would
occur here, the lock would not be released (though chances might be

The same is in Felix#startBundle with the bundle lock (again chances
might be very low)

Are my assumptions correct or am I missing something?

Carsten Ziegeler

View raw message