harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Leviev (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4015) [drlvm][classloader][tc] Known/proven race conditions markup at "class.cpp" at func helper_get_interface_vtable() (499-514)
Date Thu, 31 May 2007 14:43:15 GMT
[drlvm][classloader][tc] Known/proven race conditions markup at "class.cpp" at func helper_get_interface_vtable()
(499-514)
---------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4015
                 URL: https://issues.apache.org/jira/browse/HARMONY-4015
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Ilya Leviev


Known/proven race conditions markup at "class.cpp" at func helper_get_interface_vtable() (499-514)

TC report on thread unsafe access that result in race conditions that occur during concurrent
execution of helper_get_interface_vtable function. 

As issues related to vm statistic data collection in debug mode and it not affect correctness
of execution I have marked it by special API for prevention of further alarms on this race.


Race conditions:

1) Write -> Write data-race	
Memory write at "class.cpp":499 conflicts with a prior memory write at "class.cpp":499

2) Write -> Write data-race	
Memory write at "class.cpp":501 conflicts with a prior memory write at "class.cpp":501

3) Write -> Write data-race	
Memory write at "class.cpp":503 conflicts with a prior memory write at "class.cpp":503


4) Write -> Write data-race	
Memory write at "class.cpp":514 conflicts with a prior memory write at "class.cpp":514



Stack Trace: 

Context
	Function void CallVoidMethodA(struct JNIEnv_External *,struct _jobject *,struct _jmethodID
*,union jvalue *) "jni_method.cpp":225
	Function call_method_no_ref_result "jni_method.cpp":187
	Function void vm_execute_java_method_array(struct _jmethodID *,union jvalue *,union jvalue
*) "ini.cpp":60
	Function ExecuteMethod "em_intf.cpp":43
	Function void DrlEMImpl::executeMethod(struct _jmethodID *,union jvalue *,union jvalue *)
"drlemimpl.cpp":509
	Function void JIT_execute_method_default(void *,struct _jmethodID *,union jvalue *,union
jvalue *) "ini_ia32.cpp":199
	Function vm_invoke_native_array_stub "ini_ia32.cpp":76
	Function hythread_thin_monitor_exit "thread_native_thin_monitor.c":436
	Function rth_get_interface_vtable "jit_runtime_support.cpp":650
	Function void * Class::helper_get_interface_vtable(struct ManagedObject *,struct Class *)
"class.cpp":494


1st Access
	Function class VM_thread * get_thread_ptr_stub(void) "thread_manager.cpp":138
	Function vm_get_gc_thread_local "c_interface.cpp":2414
	Function m2n_free_local_handles "m2n_ia32.cpp":268
	Function vm_get_gc_thread_local "c_interface.cpp":2414
	Function gc_alloc_fast "mutator_alloc.cpp":120
	Function class VM_thread * get_thread_ptr_stub(void) "thread_manager.cpp":138
	Function m2n_free_local_handles "m2n_ia32.cpp":268
	Function vm_get_gc_thread_local "c_interface.cpp":2414
	Function rth_get_interface_vtable "jit_runtime_support.cpp":650
	Function void * Class::helper_get_interface_vtable(struct ManagedObject *,struct Class *)
"class.cpp":499


	"497"	""	"     unsigned num_intfc = intfTable->n_entries;"
	"498"	""	" #ifdef VM_STATS"
	"499"	"*"	"     VM_Statistics::get_vm_stats().num_invokeinterface_calls++;"
	"500"	""	"     switch(num_intfc) {"
	"501"	"*"	"     case 1:  VM_Statistics::get_vm_stats().num_invokeinterface_calls_size_1++;
   break;"
	"502"	""	"     case 2:  VM_Statistics::get_vm_stats().num_invokeinterface_calls_size_2++;
   break;"
	"503"	"*"	"     default: VM_Statistics::get_vm_stats().num_invokeinterface_calls_size_many++;
break;"
	"504"	""	"     }"
	"505"	""	"     if(num_intfc > VM_Statistics::get_vm_stats().invokeinterface_calls_size_max)"
	"506"	""	"         VM_Statistics::get_vm_stats().invokeinterface_calls_size_max = num_intfc;"


2nd Access
	Function void CallVoidMethodA(struct JNIEnv_External *,struct _jobject *,struct _jmethodID
*,union jvalue *) "jni_method.cpp":225
	Function call_method_no_ref_result "jni_method.cpp":187
	Function void vm_execute_java_method_array(struct _jmethodID *,union jvalue *,union jvalue
*) "ini.cpp":60
	Function ExecuteMethod "em_intf.cpp":43
	Function void DrlEMImpl::executeMethod(struct _jmethodID *,union jvalue *,union jvalue *)
"drlemimpl.cpp":509
	Function void JIT_execute_method_default(void *,struct _jmethodID *,union jvalue *,union
jvalue *) "ini_ia32.cpp":199
	Function vm_invoke_native_array_stub "ini_ia32.cpp":76
	Function hythread_thin_monitor_exit "thread_native_thin_monitor.c":436
	Function rth_get_interface_vtable "jit_runtime_support.cpp":650
	Function void * Class::helper_get_interface_vtable(struct ManagedObject *,struct Class *)
"class.cpp":499


	"497"	""	"     unsigned num_intfc = intfTable->n_entries;"
	"498"	""	" #ifdef VM_STATS"
	"499"	"*"	"     VM_Statistics::get_vm_stats().num_invokeinterface_calls++;"
	"500"	""	"     switch(num_intfc) {"
	"501"	"*"	"     case 1:  VM_Statistics::get_vm_stats().num_invokeinterface_calls_size_1++;
   break;"
	"502"	""	"     case 2:  VM_Statistics::get_vm_stats().num_invokeinterface_calls_size_2++;
   break;"
	"503"	"*"	"     default: VM_Statistics::get_vm_stats().num_invokeinterface_calls_size_many++;
break;"
	"504"	""	"     }"
	"505"	""	"     if(num_intfc > VM_Statistics::get_vm_stats().invokeinterface_calls_size_max)"
	"506"	""	"         VM_Statistics::get_vm_stats().invokeinterface_calls_size_max = num_intfc;"


See also Source View screenshots. 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message