harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Evgueni Brevnov" <evgueni.brev...@gmail.com>
Subject Re: [drlvm][classlib unit tests] iterative runs
Date Fri, 24 Nov 2006 15:41:57 GMT
On 11/24/06, Salikh Zakirov <Salikh.Zakirov@intel.com> wrote:
> Evgueni Brevnov wrote:
> > Agree! It seems like a mess for me as well. The most clean approach is
> > to return EXCEPTION_CONTINUE_SEARCH for any exception happened in a
> > native code.
> I recently found out the reason why smoke test gc.LOS hangs DRLVM on Windows
> XP, and it turned out to be related to the hardware exception handling.
> Since the fix will involve significant modifications to the file
> vm/vmcore/src/util/win/ia32/nt_exception_filter.cpp,
> I can do this modification too.

Sounds reasonable :-)

> P.S. The reason of hang of gc.LOS is deadlock on a thread suspension:
> Assume thread A handles NPE:
> A1) segfault occured
> A2) grab "system hwe lock" and call vectored_exception_handler
> A3) instantiate NullPointerException object
> A4) set up throwing NullPointerExceptionObject in the register snapshot
> A5) return from vectored_exception_handler release "system hwe lock"
> Let's next assume that garbage collection was started exactly when thread A
> was in progress of running NullPointerException constructor. Then, thread A
> will be suspended while still holding "system hwe lock".
> Another thread B at that moment may be blocked on a "system hwe lock",
> and since this lock is system and not known to Thread Manager, it just
> waits forever for thread B to reach a safepoint.

Hmmm .... this is intresting.... Good catch!


View raw message