You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ilya Leviev (JIRA)" <ji...@apache.org> on 2007/05/25 11:54:16 UTC

[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

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


[jira] Updated: (HARMONY-3976) [drlvm][gc_gen] Known/proven race conditions markup at finalizer_weakref_metadata.cpp :(206-223) at collector_reset_weakref_sets and gc_set_weakref_sets functions

Posted by "Ilya Leviev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Leviev updated HARMONY-3976:
---------------------------------

    Summary: [drlvm][gc_gen] Known/proven race conditions markup at finalizer_weakref_metadata.cpp :(206-223) at collector_reset_weakref_sets and gc_set_weakref_sets functions  (was: [drlvm][gc_gen] Race conditions at finalizer_weakref_metadata.cpp :(206-223) at collector_reset_weakref_sets and gc_set_weakref_sets functions)

> [drlvm][gc_gen] Known/proven race conditions markup 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
>            Assignee: Xiao-Feng Li
>         Attachments: HARMONY-3976_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> 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.


[jira] Closed: (HARMONY-3976) [drlvm][gc_gen][tc] Known/proven race conditions markup at finalizer_weakref_metadata.cpp :(206-223) at collector_reset_weakref_sets and gc_set_weakref_sets functions

Posted by "Ilya Leviev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Leviev closed HARMONY-3976.
--------------------------------

    Resolution: Fixed

patch verified 

> [drlvm][gc_gen][tc] Known/proven race conditions markup 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
>            Assignee: Xiao-Feng Li
>         Attachments: HARMONY-3976_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> 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.


[jira] Commented: (HARMONY-3976) [drlvm][gc_gen] Known/proven race conditions markup at finalizer_weakref_metadata.cpp :(206-223) at collector_reset_weakref_sets and gc_set_weakref_sets functions

Posted by "Ilya Leviev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499755 ] 

Ilya Leviev commented on HARMONY-3976:
--------------------------------------

Patch applied partially. 
Header file "port_threadunsafe.h" have not added! 


> [drlvm][gc_gen] Known/proven race conditions markup 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
>            Assignee: Xiao-Feng Li
>         Attachments: HARMONY-3976_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> 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.


[jira] Updated: (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

Posted by "Xiao-Feng Li (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xiao-Feng Li updated HARMONY-3976:
----------------------------------

    Assignee: Xiao-Feng Li

This is not a race, since the reset of a collector's weakref list is done by the mutator, and the set is done by the collector, while mutator and collector will never meet each other in a stop-the-world gc.

> [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
>         Assigned To: Xiao-Feng Li
>         Attachments: SourceViewScreenshot-1.jpg
>
>
> 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.


[jira] Updated: (HARMONY-3976) [drlvm][gc_gen][tc] Known/proven race conditions markup at finalizer_weakref_metadata.cpp :(206-223) at collector_reset_weakref_sets and gc_set_weakref_sets functions

Posted by "Ilya Leviev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Leviev updated HARMONY-3976:
---------------------------------

    Summary: [drlvm][gc_gen][tc] Known/proven race conditions markup at finalizer_weakref_metadata.cpp :(206-223) at collector_reset_weakref_sets and gc_set_weakref_sets functions  (was: [drlvm][gc_gen] Known/proven race conditions markup at finalizer_weakref_metadata.cpp :(206-223) at collector_reset_weakref_sets and gc_set_weakref_sets functions)

> [drlvm][gc_gen][tc] Known/proven race conditions markup 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
>            Assignee: Xiao-Feng Li
>         Attachments: HARMONY-3976_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> 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.


[jira] Updated: (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

Posted by "Ilya Leviev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Leviev updated HARMONY-3976:
---------------------------------

    Patch Info: [Patch Available]

> [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
>         Assigned To: Xiao-Feng Li
>         Attachments: HARMONY-3976_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> 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.


[jira] Closed: (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

Posted by "Xiao-Feng Li (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xiao-Feng Li closed HARMONY-3976.
---------------------------------

    Resolution: Fixed

> [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
>         Assigned To: Xiao-Feng Li
>         Attachments: HARMONY-3976_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> 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.


[jira] Reopened: (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

Posted by "Ilya Leviev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Leviev reopened HARMONY-3976:
----------------------------------


patch that mark race by special API for prevention of further alarms should be applied

> [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
>            Assignee: Xiao-Feng Li
>         Attachments: HARMONY-3976_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> 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.


[jira] Updated: (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

Posted by "Ilya Leviev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Leviev updated HARMONY-3976:
---------------------------------

    Attachment: SourceViewScreenshot-1.jpg

> [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
>         Attachments: SourceViewScreenshot-1.jpg
>
>
> 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.


[jira] Updated: (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

Posted by "Ilya Leviev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Leviev updated HARMONY-3976:
---------------------------------

    Attachment: HARMONY-3976_add_markup.patch

added patch that mark race by special API for prevention of further alarms



> [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
>         Assigned To: Xiao-Feng Li
>         Attachments: HARMONY-3976_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> 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.