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-3976) [drlvm][gc_gen] Race conditions at finalizer_weakref_metadata.cpp :(206-223) at collector_reset_weakref_sets and gc_set_weakref_sets functions
Date Fri, 25 May 2007 09:54:16 GMT
[drlvm][gc_gen] Race conditions at finalizer_weakref_metadata.cpp :(206-223) at collector_reset_weakref_sets
and gc_set_weakref_sets functions
----------------------------------------------------------------------------------------------------------------------------------------------

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



TC report on thread unsafe access that result in race condition that occur during concurrent
execution of ollector_reset_weakref_sets and gc_set_weakref_sets functions


if it not affect correctness of execution I will mark it by special API for prevention of
further alarms on this race.


Write -> Write data-race	
Memory write at "finalizer_weakref_metadata.cpp":223 conflicts with a prior memory write at
"finalizer_weakref_metadata.cpp":206


Stack Trace: 

Context
	Function hythread_create_with_group "thread_native_basic.c":136
	Function os_thread_create "os_thread.c":37
	Function _beginthreadex "threadex.c":145
	Function EntryPoint "dllcrt0.c":323
	Function threadstartex "threadex.c":241
	Function thread_start_proc "thread_native_basic.c":711
	Function collector_thread_func "collector.cpp":181
	Function void nongen_forward_pool(struct Collector *) "fspace_nongen_forward_pool.cpp":233
	Function void collector_identify_finref(struct Collector *) "finalizer_weakref.cpp":538
	Function void gc_set_weakref_sets(struct GC *) "finalizer_weakref_metadata.cpp":213

Definition
	Function EntryPoint "dllcrt0.c":323
	Function EntryPoint "crtexe.c":202
	Function EntryPoint "crtexe.c":398
	Function main "cmain.c":146
	Function gpProtectedMain "main.c":383
	Function invocation "main.c":660
	Function JNI_CreateJavaVM "jni.cpp":499
	Function int vm_init1(struct JavaVM_Internal *,struct JavaVMInitArgs *) "vm_init.cpp":693
	Function gc_init "gc_for_vm.cpp":61
	Function void collector_initialize(struct GC *) "collector.cpp":255

1st Access
	Function hythread_suspend_enable "hythread_ext.h":370
	Function Java_java_lang_VMMemoryManager_runGC "java_lang_vmmemorymanager.cpp":138
	Function gc_force_gc "gc_for_vm.cpp":138
	Function void gc_reclaim_heap(struct GC *,unsigned int) "gc_common.cpp":304
	Function void gc_gen_reclaim_heap(struct GC_Gen *) "gen.cpp":439
	Function void fspace_collection(struct Blocked_Space *) "fspace.cpp":204
	Function void collector_execute_task(struct GC *,void (__cdecl*)(void *),struct Space *)
"collector.cpp":274
	Function assign_collector_with_task "collector.cpp":146
	Function collector_reset_thread "collector.cpp":99
	Function void collector_reset_weakref_sets(struct Collector *) "finalizer_weakref_metadata.cpp":206


	"204"	""	"   assert(collector->weakref_set == NULL);"
	"205"	""	"   assert(collector->phanref_set == NULL);"
	"206"	"*"	"   collector->softref_set = finref_get_free_block(gc);"
	"207"	"*"	"   collector->weakref_set = finref_get_free_block(gc);"



2nd Access
	Function hythread_create_with_group "thread_native_basic.c":136
	Function os_thread_create "os_thread.c":37
	Function _beginthreadex "threadex.c":145
	Function EntryPoint "dllcrt0.c":323
	Function threadstartex "threadex.c":241
	Function thread_start_proc "thread_native_basic.c":711
	Function collector_thread_func "collector.cpp":181
	Function void nongen_forward_pool(struct Collector *) "fspace_nongen_forward_pool.cpp":233
	Function void collector_identify_finref(struct Collector *) "finalizer_weakref.cpp":538
	Function void gc_set_weakref_sets(struct GC *) "finalizer_weakref_metadata.cpp":223


	"222"	"*"	"     pool_put_entry(metadata->phanref_pool, collector->phanref_set);"
	"223"	"*"	"     collector->softref_set = NULL;"
	"224"	"*"	"     collector->weakref_set= NULL;"



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