harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1833) [DRLVM] deadlock during finalization
Date Thu, 12 Oct 2006 04:59:37 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1833?page=comments#action_12441616 ] 
            
Alexey Varlamov commented on HARMONY-1833:
------------------------------------------

Thread 2: compiles java/util/zip/ZipFile.finalize()
#11 0x40b7f3bc in Lock_Manager::_lock (this=0x8083098) 
    at /export/users2/avarlamo/linux.ia32/svn-repo/drlvm/vm/vmcore/src/thread/lock_manager.cpp:62

(gdb) p ((apr_thread_mutex_t *)lock)->mutex
$8 = {
  __m_reserved = 2,
  __m_count = 1,
  __m_owner = 0x61e7,
  __m_kind = 1,
  __m_lock = {
    __status = 1,
    __spinlock = 0
  }
}

Thread 1: compiles java/lang/FinalizerThread.spawnBalanceThreads()
#9  0x414e9e18 in Jitrino::Mutex::lock (this=0x417aaca8) at mkernel.h:111
111         void lock(void)     { pthread_mutex_lock(&m_handle);    }
(gdb) p m_handle
$10 = {
  __m_reserved = 2,
  __m_count = 1,
  __m_owner = 0x61f9,
  __m_kind = 1,
  __m_lock = {
    __status = 1,
    __spinlock = 0
  }
}

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