harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Pervov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1833) [DRLVM] deadlock during finalization
Date Wed, 25 Oct 2006 08:17:18 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1833?page=comments#action_12444601 ] 
            
Pavel Pervov commented on HARMONY-1833:
---------------------------------------

Almost.

I would made two changes here:
1) (insist) change "size_t name_len = strlen(name);" to "size_t name_len = (*it).first->len;",
as package name length is already available and there is no need to calculate it once again.
2) (recommend) change "char* buf = (char*)STD_MALLOC(buf_len + 1);" to "char* buf = (char*)STD_ALLOCA(buf_len
+ 1);" and remove corresponding "STD_FREE(buf);". Although, it is called only once, but there
is no need to defragment heap. :)

Other than that everything is ok.

> [DRLVM] deadlock during finalization
> ------------------------------------
>
>                 Key: HARMONY-1833
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1833
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: SLES 9 32-bit SP2; CPU 2xXeon x64
> gcc 3.3.3 drlvm debug build
>            Reporter: Alexey Varlamov
>         Attachments: H-1833.patch
>
>
> The classlib tests hang sporadically, usually in JNDI module when running all classlib
unit tests (single runs of JNDI alone always ok).
> Investigation shows that there are deadlocks happening between main thread (MT) and finalizer
thread (FT): 
> 1) MT performs classloading, it grabs ClassLoader::_lock;
> 2) GC happens, FinalizerThread.startFinalization() is called, FT activates;
> 3) FT invokes some finalize() method, compilation starts and grabs g_compileLock;
> 4) FT waits for ClassLoader::_lock to allocate code_chunk_info;
> 5) MT proceeds to compilation of FinalizerThread.spawnBalanceThreads() and waits for
g_compileLock;

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