Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 15568 invoked from network); 19 Dec 2007 10:56:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Dec 2007 10:56:07 -0000 Received: (qmail 55693 invoked by uid 500); 19 Dec 2007 10:55:57 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 55588 invoked by uid 500); 19 Dec 2007 10:55:56 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 55579 invoked by uid 99); 19 Dec 2007 10:55:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2007 02:55:56 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2007 10:55:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EC051714289 for ; Wed, 19 Dec 2007 02:55:43 -0800 (PST) Message-ID: <20762338.1198061743961.JavaMail.jira@brutus> Date: Wed, 19 Dec 2007 02:55:43 -0800 (PST) From: "Pavel Rebriy (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-3897) [drlvm][thread][tc] Race condition at thread_java_basic.c:531 and thread_native_suspend.c":189 In-Reply-To: <20265830.1179406756302.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553300 ] Pavel Rebriy commented on HARMONY-3897: --------------------------------------- Regarding revision 603614 code of jthread_sleep() was re-developed and described race condition was remove. That why I think the bug could be closed. > [drlvm][thread][tc] Race condition at thread_java_basic.c:531 and thread_native_suspend.c":189 > ---------------------------------------------------------------------------------------------- > > Key: HARMONY-3897 > URL: https://issues.apache.org/jira/browse/HARMONY-3897 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Reporter: Ilya Leviev > Assignee: weldon washburn > Attachments: SourceViewScreenshot-1.jpg > > > TC report on thread unsafe access to "state" field that result in race condition that occur during concurrent execution of jthread_sleep and wait_safe_region_event functions. > Write -> Write data-race > Memory write at "thread_native_suspend.c":189 conflicts with a prior memory write at "thread_java_basic.c":531 > Stack Trace: > Context > Function vm_get_gc_thread_local "c_interface.cpp":2334 > Function gc_alloc_fast "gc_for_vm.cpp":178 > Function vm_get_gc_thread_local "c_interface.cpp":2334 > Function gc_alloc_fast "gc_for_vm.cpp":178 > Function rth_get_interface_vtable "jit_runtime_support.cpp":651 > Function rth_update_checkcast_stats "jit_runtime_support.cpp":377 > Function hythread_thin_monitor_try_enter "thread_native_thin_monitor.c":323 > Function unreserve_lock "thread_native_thin_monitor.c":162 > Function hythread_suspend_other "thread_native_suspend.c":255 > Function wait_safe_region_event "thread_native_suspend.c":169 > 1st Access > Function __int64 Jitrino::Jet::rt_h_i64_a(__int64,__int64,enum JavaByteCodes) "arith_rt.cpp":218 > Function class VM_thread * get_thread_ptr_stub(void) "thread_manager.cpp":138 > Function m2n_free_local_handles "m2n_ia32.cpp":268 > Function class VM_thread * get_thread_ptr_stub(void) "thread_manager.cpp":138 > Function m2n_free_local_handles "m2n_ia32.cpp":268 > Function int Jitrino::Jet::rt_h_lcmp(__int64,__int64) "arith_rt.cpp":69 > Function class VM_thread * get_thread_ptr_stub(void) "thread_manager.cpp":138 > Function hythread_suspend_enable "hythread_ext.h":370 > Function Java_java_lang_VMThreadManager_sleep "java_lang_vmthreadmanager.cpp":140 > Function jthread_sleep "thread_java_basic.c":531 > "530" "" " " > "531" "*" " tm_native_thread->state |= TM_THREAD_STATE_RUNNABLE;" > "532" "" " return status;" > 2nd Access > Function vm_get_gc_thread_local "c_interface.cpp":2334 > Function gc_alloc_fast "gc_for_vm.cpp":178 > Function vm_get_gc_thread_local "c_interface.cpp":2334 > Function gc_alloc_fast "gc_for_vm.cpp":178 > Function rth_get_interface_vtable "jit_runtime_support.cpp":651 > Function rth_update_checkcast_stats "jit_runtime_support.cpp":377 > Function hythread_thin_monitor_try_enter "thread_native_thin_monitor.c":323 > Function unreserve_lock "thread_native_thin_monitor.c":162 > Function hythread_suspend_other "thread_native_suspend.c":255 > Function wait_safe_region_event "thread_native_suspend.c":189 > "187" "" " thread, thread->suspend_count, thread->request));" > "188" "" " hymutex_lock(&thread->mutex);" > "189" "*" " thread->state |= TM_THREAD_STATE_SUSPENDED;" > "190" "" " hymutex_unlock(&thread->mutex);" > "191" "" " return TM_ERROR_NONE;" > See also Source View screenshot. > If it not affect correctness of execution I will mark it by special API for prevention of further alarms on this race. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.