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:23:16 UTC

[jira] Created: (HARMONY-3973) drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions

drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions
-------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-3973
                 URL: https://issues.apache.org/jira/browse/HARMONY-3973
             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 sync_stack_push() and sync_stack_pop() 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 "sync_stack.h":111 conflicts with a prior memory write at "sync_stack.h":124


Stack Trace: 

Context
	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":220
	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":102

1st Access
	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":220
	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":165
	Function void pool_put_entry(struct Sync_Stack *,void *) "sync_pool.h":44
	Function unsigned int sync_stack_push(struct Sync_Stack *,struct Node *) "sync_stack.h":124


	121"	""	" inline Boolean sync_stack_push(Sync_Stack* stack, Node* node)"
	"122"	""	" {"
	"123"	""	"   Stack_Top cur_top = stack->top;"
	"124"	"*"	"   node->next = stack_top_get_entry(cur_top);"
	"125"	""	"   POINTER_SIZE_INT new_version = stack_top_get_next_version(cur_top);"
	"126"	""	"   POINTER_SIZE_INT temp = stack_top_contruct(node, new_version);"



2nd Access
	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":220
	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":111


	"109"	""	"     temp = (POINTER_SIZE_INT)atomic_casptr((volatile void**)&stack->top, (void*)temp, (void*)cur_top);"
	"110"	""	"     if(temp == *(POINTER_SIZE_INT*)&cur_top){ // got it  "
	"111"	"*"	"       top_entry->next = NULL;"
	"112"	""	"       return top_entry;"
	"113"	""	"     }"



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-3973) [drlvm][gc_gen] Known/proven race conditions markup at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions

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

Ilya Leviev closed HARMONY-3973.
--------------------------------

    Resolution: Fixed

Xiao-Feng, patch verified at 542434 
Thank you for applying it. 

> [drlvm][gc_gen] Known/proven race conditions markup at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3973
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3973
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Ilya Leviev
>            Assignee: Xiao-Feng Li
>         Attachments: HARMONY-3973_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> TC report on thread unsafe access that result in race condition that occur during concurrent execution of sync_stack_push() and sync_stack_pop() 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 "sync_stack.h":111 conflicts with a prior memory write at "sync_stack.h":124
> Stack Trace: 
> Context
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":102
> 1st Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":165
> 	Function void pool_put_entry(struct Sync_Stack *,void *) "sync_pool.h":44
> 	Function unsigned int sync_stack_push(struct Sync_Stack *,struct Node *) "sync_stack.h":124
> 	121"	""	" inline Boolean sync_stack_push(Sync_Stack* stack, Node* node)"
> 	"122"	""	" {"
> 	"123"	""	"   Stack_Top cur_top = stack->top;"
> 	"124"	"*"	"   node->next = stack_top_get_entry(cur_top);"
> 	"125"	""	"   POINTER_SIZE_INT new_version = stack_top_get_next_version(cur_top);"
> 	"126"	""	"   POINTER_SIZE_INT temp = stack_top_contruct(node, new_version);"
> 2nd Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":111
> 	"109"	""	"     temp = (POINTER_SIZE_INT)atomic_casptr((volatile void**)&stack->top, (void*)temp, (void*)cur_top);"
> 	"110"	""	"     if(temp == *(POINTER_SIZE_INT*)&cur_top){ // got it  "
> 	"111"	"*"	"       top_entry->next = NULL;"
> 	"112"	""	"       return top_entry;"
> 	"113"	""	"     }"
> 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-3973) drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions

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

Ilya Leviev reopened HARMONY-3973:
----------------------------------


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

> drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3973
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3973
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Ilya Leviev
>            Assignee: Xiao-Feng Li
>         Attachments: HARMONY-3973_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> TC report on thread unsafe access that result in race condition that occur during concurrent execution of sync_stack_push() and sync_stack_pop() 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 "sync_stack.h":111 conflicts with a prior memory write at "sync_stack.h":124
> Stack Trace: 
> Context
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":102
> 1st Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":165
> 	Function void pool_put_entry(struct Sync_Stack *,void *) "sync_pool.h":44
> 	Function unsigned int sync_stack_push(struct Sync_Stack *,struct Node *) "sync_stack.h":124
> 	121"	""	" inline Boolean sync_stack_push(Sync_Stack* stack, Node* node)"
> 	"122"	""	" {"
> 	"123"	""	"   Stack_Top cur_top = stack->top;"
> 	"124"	"*"	"   node->next = stack_top_get_entry(cur_top);"
> 	"125"	""	"   POINTER_SIZE_INT new_version = stack_top_get_next_version(cur_top);"
> 	"126"	""	"   POINTER_SIZE_INT temp = stack_top_contruct(node, new_version);"
> 2nd Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":111
> 	"109"	""	"     temp = (POINTER_SIZE_INT)atomic_casptr((volatile void**)&stack->top, (void*)temp, (void*)cur_top);"
> 	"110"	""	"     if(temp == *(POINTER_SIZE_INT*)&cur_top){ // got it  "
> 	"111"	"*"	"       top_entry->next = NULL;"
> 	"112"	""	"       return top_entry;"
> 	"113"	""	"     }"
> 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-3973) drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions

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

Ilya Leviev updated HARMONY-3973:
---------------------------------

    Attachment: SourceViewScreenshot-1.jpg

> drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3973
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3973
>             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 sync_stack_push() and sync_stack_pop() 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 "sync_stack.h":111 conflicts with a prior memory write at "sync_stack.h":124
> Stack Trace: 
> Context
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":102
> 1st Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":165
> 	Function void pool_put_entry(struct Sync_Stack *,void *) "sync_pool.h":44
> 	Function unsigned int sync_stack_push(struct Sync_Stack *,struct Node *) "sync_stack.h":124
> 	121"	""	" inline Boolean sync_stack_push(Sync_Stack* stack, Node* node)"
> 	"122"	""	" {"
> 	"123"	""	"   Stack_Top cur_top = stack->top;"
> 	"124"	"*"	"   node->next = stack_top_get_entry(cur_top);"
> 	"125"	""	"   POINTER_SIZE_INT new_version = stack_top_get_next_version(cur_top);"
> 	"126"	""	"   POINTER_SIZE_INT temp = stack_top_contruct(node, new_version);"
> 2nd Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":111
> 	"109"	""	"     temp = (POINTER_SIZE_INT)atomic_casptr((volatile void**)&stack->top, (void*)temp, (void*)cur_top);"
> 	"110"	""	"     if(temp == *(POINTER_SIZE_INT*)&cur_top){ // got it  "
> 	"111"	"*"	"       top_entry->next = NULL;"
> 	"112"	""	"       return top_entry;"
> 	"113"	""	"     }"
> 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-3973) drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions

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

Ilya Leviev updated HARMONY-3973:
---------------------------------

    Attachment: HARMONY-3973_add_markup.patch

> drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3973
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3973
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Ilya Leviev
>            Assignee: Xiao-Feng Li
>         Attachments: HARMONY-3973_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> TC report on thread unsafe access that result in race condition that occur during concurrent execution of sync_stack_push() and sync_stack_pop() 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 "sync_stack.h":111 conflicts with a prior memory write at "sync_stack.h":124
> Stack Trace: 
> Context
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":102
> 1st Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":165
> 	Function void pool_put_entry(struct Sync_Stack *,void *) "sync_pool.h":44
> 	Function unsigned int sync_stack_push(struct Sync_Stack *,struct Node *) "sync_stack.h":124
> 	121"	""	" inline Boolean sync_stack_push(Sync_Stack* stack, Node* node)"
> 	"122"	""	" {"
> 	"123"	""	"   Stack_Top cur_top = stack->top;"
> 	"124"	"*"	"   node->next = stack_top_get_entry(cur_top);"
> 	"125"	""	"   POINTER_SIZE_INT new_version = stack_top_get_next_version(cur_top);"
> 	"126"	""	"   POINTER_SIZE_INT temp = stack_top_contruct(node, new_version);"
> 2nd Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":111
> 	"109"	""	"     temp = (POINTER_SIZE_INT)atomic_casptr((volatile void**)&stack->top, (void*)temp, (void*)cur_top);"
> 	"110"	""	"     if(temp == *(POINTER_SIZE_INT*)&cur_top){ // got it  "
> 	"111"	"*"	"       top_entry->next = NULL;"
> 	"112"	""	"       return top_entry;"
> 	"113"	""	"     }"
> 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-3973) [drlvm][gc_gen] Known/proven race conditions markup at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions

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

Ilya Leviev updated HARMONY-3973:
---------------------------------

    Patch Info: [Patch Available]
       Summary: [drlvm][gc_gen] Known/proven race conditions markup at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions  (was: drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions)

> [drlvm][gc_gen] Known/proven race conditions markup at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3973
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3973
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Ilya Leviev
>            Assignee: Xiao-Feng Li
>         Attachments: HARMONY-3973_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> TC report on thread unsafe access that result in race condition that occur during concurrent execution of sync_stack_push() and sync_stack_pop() 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 "sync_stack.h":111 conflicts with a prior memory write at "sync_stack.h":124
> Stack Trace: 
> Context
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":102
> 1st Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":165
> 	Function void pool_put_entry(struct Sync_Stack *,void *) "sync_pool.h":44
> 	Function unsigned int sync_stack_push(struct Sync_Stack *,struct Node *) "sync_stack.h":124
> 	121"	""	" inline Boolean sync_stack_push(Sync_Stack* stack, Node* node)"
> 	"122"	""	" {"
> 	"123"	""	"   Stack_Top cur_top = stack->top;"
> 	"124"	"*"	"   node->next = stack_top_get_entry(cur_top);"
> 	"125"	""	"   POINTER_SIZE_INT new_version = stack_top_get_next_version(cur_top);"
> 	"126"	""	"   POINTER_SIZE_INT temp = stack_top_contruct(node, new_version);"
> 2nd Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":111
> 	"109"	""	"     temp = (POINTER_SIZE_INT)atomic_casptr((volatile void**)&stack->top, (void*)temp, (void*)cur_top);"
> 	"110"	""	"     if(temp == *(POINTER_SIZE_INT*)&cur_top){ // got it  "
> 	"111"	"*"	"       top_entry->next = NULL;"
> 	"112"	""	"       return top_entry;"
> 	"113"	""	"     }"
> 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-3973) drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions

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

Xiao-Feng Li closed HARMONY-3973.
---------------------------------

    Resolution: Fixed

> drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3973
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3973
>             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 sync_stack_push() and sync_stack_pop() 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 "sync_stack.h":111 conflicts with a prior memory write at "sync_stack.h":124
> Stack Trace: 
> Context
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":102
> 1st Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":165
> 	Function void pool_put_entry(struct Sync_Stack *,void *) "sync_pool.h":44
> 	Function unsigned int sync_stack_push(struct Sync_Stack *,struct Node *) "sync_stack.h":124
> 	121"	""	" inline Boolean sync_stack_push(Sync_Stack* stack, Node* node)"
> 	"122"	""	" {"
> 	"123"	""	"   Stack_Top cur_top = stack->top;"
> 	"124"	"*"	"   node->next = stack_top_get_entry(cur_top);"
> 	"125"	""	"   POINTER_SIZE_INT new_version = stack_top_get_next_version(cur_top);"
> 	"126"	""	"   POINTER_SIZE_INT temp = stack_top_contruct(node, new_version);"
> 2nd Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":111
> 	"109"	""	"     temp = (POINTER_SIZE_INT)atomic_casptr((volatile void**)&stack->top, (void*)temp, (void*)cur_top);"
> 	"110"	""	"     if(temp == *(POINTER_SIZE_INT*)&cur_top){ // got it  "
> 	"111"	"*"	"       top_entry->next = NULL;"
> 	"112"	""	"       return top_entry;"
> 	"113"	""	"     }"
> 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-3973) drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions

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

Xiao-Feng Li commented on HARMONY-3973:
---------------------------------------

 Ilya, this is not a real race condition. It's designed concurrent access to stack (Sync_Stack), whose correctness is ensured by  the atomic_casptr() function call.

Thanks.

> drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3973
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3973
>             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 sync_stack_push() and sync_stack_pop() 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 "sync_stack.h":111 conflicts with a prior memory write at "sync_stack.h":124
> Stack Trace: 
> Context
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":102
> 1st Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":165
> 	Function void pool_put_entry(struct Sync_Stack *,void *) "sync_pool.h":44
> 	Function unsigned int sync_stack_push(struct Sync_Stack *,struct Node *) "sync_stack.h":124
> 	121"	""	" inline Boolean sync_stack_push(Sync_Stack* stack, Node* node)"
> 	"122"	""	" {"
> 	"123"	""	"   Stack_Top cur_top = stack->top;"
> 	"124"	"*"	"   node->next = stack_top_get_entry(cur_top);"
> 	"125"	""	"   POINTER_SIZE_INT new_version = stack_top_get_next_version(cur_top);"
> 	"126"	""	"   POINTER_SIZE_INT temp = stack_top_contruct(node, new_version);"
> 2nd Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":111
> 	"109"	""	"     temp = (POINTER_SIZE_INT)atomic_casptr((volatile void**)&stack->top, (void*)temp, (void*)cur_top);"
> 	"110"	""	"     if(temp == *(POINTER_SIZE_INT*)&cur_top){ // got it  "
> 	"111"	"*"	"       top_entry->next = NULL;"
> 	"112"	""	"       return top_entry;"
> 	"113"	""	"     }"
> 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] Assigned: (HARMONY-3973) drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions

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

Xiao-Feng Li reassigned HARMONY-3973:
-------------------------------------

    Assignee: Xiao-Feng Li

> drlvm][gc_gen] Race condition at "sync_stack.h"(124-111): at sync_stack_push() and sync_stack_pop() functions
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3973
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3973
>             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 sync_stack_push() and sync_stack_pop() 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 "sync_stack.h":111 conflicts with a prior memory write at "sync_stack.h":124
> Stack Trace: 
> Context
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":102
> 1st Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":165
> 	Function void pool_put_entry(struct Sync_Stack *,void *) "sync_pool.h":44
> 	Function unsigned int sync_stack_push(struct Sync_Stack *,struct Node *) "sync_stack.h":124
> 	121"	""	" inline Boolean sync_stack_push(Sync_Stack* stack, Node* node)"
> 	"122"	""	" {"
> 	"123"	""	"   Stack_Top cur_top = stack->top;"
> 	"124"	"*"	"   node->next = stack_top_get_entry(cur_top);"
> 	"125"	""	"   POINTER_SIZE_INT new_version = stack_top_get_next_version(cur_top);"
> 	"126"	""	"   POINTER_SIZE_INT temp = stack_top_contruct(node, new_version);"
> 2nd Access
> 	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":220
> 	Function collector_trace_rootsets "fspace_nongen_forward_pool.cpp":171
> 	Function struct Vector_Block * pool_get_entry(struct Sync_Stack *) "sync_pool.h":37
> 	Function struct Node * sync_stack_pop(struct Sync_Stack *) "sync_stack.h":111
> 	"109"	""	"     temp = (POINTER_SIZE_INT)atomic_casptr((volatile void**)&stack->top, (void*)temp, (void*)cur_top);"
> 	"110"	""	"     if(temp == *(POINTER_SIZE_INT*)&cur_top){ // got it  "
> 	"111"	"*"	"       top_entry->next = NULL;"
> 	"112"	""	"       return top_entry;"
> 	"113"	""	"     }"
> 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.