harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Salikh Zakirov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2320) [drlvm] Throw exception outside of HWE handler to avoid deadlocks on Windows XP
Date Mon, 27 Nov 2006 19:50:22 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-2320?page=all ]

Salikh Zakirov updated HARMONY-2320:
------------------------------------

    Attachment: fix_nt_exception_handler-updated.diff

fix_nt_exception_handler-updated.diff: updated version of the patch
in_java is now passed on stack, so it is not recomputed twice

The bug with enumeration was caused by M2nFrame pushed twice (incorrectly).
This is also fixed in this patch.

Other comments about changing Linux signal handling scheme, changing the way how jvmti events
are implemented and moving parameters to TLS (instead of stack) will be addressed by different
patches.

This patch passes JVMTI, smoke and kernel tests on JITs (tests still running on interpreter)

> [drlvm] Throw exception outside of HWE handler to avoid deadlocks on Windows XP
> -------------------------------------------------------------------------------
>
>                 Key: HARMONY-2320
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2320
>             Project: Harmony
>          Issue Type: Sub-task
>         Environment: Windows XP
>            Reporter: Salikh Zakirov
>         Attachments: fix_nt_exception_handler-updated.diff, fix_nt_exception_handler.diff
>
>
> 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 (A3). Then, thread A
> will be suspended while still holding "system hwe lock".
> Another thread B at that moment have just perfomed access to null pointer (B1),
> and then it is blocked on a "system hwe lock" (B2),
> Since this lock is system and not known to Thread Manager, the thread C which tries to
start garbage
> collection and so requested suspension of all threads, and then waits forever for thread
B to reach a safepoint,
> while B is waiting for thread A to release "system hwe lock", and thread A was already
suspended and waits
> for thread C to resume it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message