[vmkit-commits] [PATCH/DISCUSS] registerNatives Lock, avoid deadlock

Will Dietz wdietz2 at illinois.edu
Sat Nov 5 14:26:18 PDT 2011


On Fri, Nov 4, 2011 at 5:11 PM, Nicolas Geoffray
<nicolas.geoffray at gmail.com> wrote:
> Oh yes, because getRegisteredNative is called while compiling, and the class
> loader lock may be used indirectly by application, we may have a deadlock
> situation.

Yep, that's exactly what was happening :).

> Besides fixing the problem, I think your patch is cleaner because it makes
> the locking local. Apologies for suggesting you a bogus implementation. I'm
> surprised you encountered the bug that early though! Are you running vmkit
> w/openjdk on an application that creates mulitple threads?

No worries re:suggestion, and yeah local lock sounds good :).

I *am* running vmkit (w/openjdk) on applications that spawn multiple
threads, but none run correctly yet (my only non-synthetic test cases
are dacapo and similar).  Thanks for the SPECJVM suggestion, didn't
realize it was free.  As for more tractable goals, let me know if you
have any suggestions for suitable test applications.

Note that beyond what's here on the mailing list, I have a few more
patches (phew, almost done!) in my local tree that haven't been
upstreamed yet.  Hopefully I'll be synced with trunk very soon and can
start looking at fixing remaining unimplemented things (and perhaps
misc bugs :)).

> Please apply!

Will do, thanks! :)

~Will



More information about the vmkit-commits mailing list