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 Fri, 24 Nov 2006 19:30:03 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-2320?page=all ]

Salikh Zakirov updated HARMONY-2320:

    Attachment: fix_nt_exception_handler.diff

fix_nt_exception_handler.diff fixes nt exception handler to return before trying to instantiate
java exception object.
This fixes hangs on gc.LOS.

It also seems to pass smoke, cunit and kernel tests on Windows XP.
However, I've just seen the test gc.LOS crash with an assertion in GC, which hints at some
enumeration problem.
I need to look into it further.

Please review the patch, it also incorporates nt exception handler cleanup that was discussed
recently on a mailing list.

> [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.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


View raw message