You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Xiao-Feng Li (JIRA)" <ji...@apache.org> on 2007/05/26 07:59:17 UTC

[jira] Closed: (HARMONY-3974) [drlvm][gc_gen] Race conditions at mspace_alloc.cpp":39: at mspace_alloc_block() function

     [ https://issues.apache.org/jira/browse/HARMONY-3974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xiao-Feng Li closed HARMONY-3974.
---------------------------------

    Resolution: Fixed

> [drlvm][gc_gen] Race conditions at mspace_alloc.cpp":39: at mspace_alloc_block() function
> -----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3974
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3974
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Ilya Leviev
>         Assigned To: Xiao-Feng Li
>         Attachments: HARMONY-3974_add_markup.patch, SourceViewScreenshot-1.jpg
>
>
> TC report on thread unsafe access that result in race condition that occur during concurrent execution of mspace_alloc_block() function
> 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 "mspace_alloc.cpp":39 conflicts with a prior memory write at "mspace_alloc.cpp":39
> Stack Trace: 
> Context
> 	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":178
> 	Function trace_object "fspace_nongen_forward_pool.cpp":123
> 	Function forward_object "fspace_nongen_forward_pool.cpp":94
> 	Function struct Partial_Reveal_Object * collector_forward_object(struct Collector *,struct Partial_Reveal_Object *) "collector_alloc.h":51
> 	Function void * mos_alloc(unsigned int,struct Allocator *) "gen.cpp":273
> 	Function void * mspace_alloc(unsigned int,struct Allocator *) "mspace_alloc.cpp":69
> 	Function mspace_alloc_block "mspace_alloc.cpp":24
> 1st Access
> 	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":178
> 	Function trace_object "fspace_nongen_forward_pool.cpp":123
> 	Function forward_object "fspace_nongen_forward_pool.cpp":94
> 	Function struct Partial_Reveal_Object * collector_forward_object(struct Collector *,struct Partial_Reveal_Object *) "collector_alloc.h":51
> 	Function void * mos_alloc(unsigned int,struct Allocator *) "gen.cpp":273
> 	Function void * mspace_alloc(unsigned int,struct Allocator *) "mspace_alloc.cpp":69
> 	Function mspace_alloc_block "mspace_alloc.cpp":39
> 	"36"	""	"     }"
> 	"37"	""	"     /* ok, got one */"
> 	"38"	""	"     Block_Header* alloc_block = (Block_Header*)&(mspace->blocks[allocated_idx - mspace->first_block_idx]);"
> 	"39"	"*"	"     mspace->alloced_size += GC_BLOCK_SIZE_BYTES;"
> 	"40"	""	" "
> 	"41"	""	"     allocator_init_free_block(allocator, alloc_block);"
> 2nd Access
> 	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":178
> 	Function trace_object "fspace_nongen_forward_pool.cpp":123
> 	Function forward_object "fspace_nongen_forward_pool.cpp":94
> 	Function struct Partial_Reveal_Object * collector_forward_object(struct Collector *,struct Partial_Reveal_Object *) "collector_alloc.h":51
> 	Function void * mos_alloc(unsigned int,struct Allocator *) "gen.cpp":273
> 	Function void * mspace_alloc(unsigned int,struct Allocator *) "mspace_alloc.cpp":69
> 	Function mspace_alloc_block "mspace_alloc.cpp":39
> 	"36"	""	"     }"
> 	"37"	""	"     /* ok, got one */"
> 	"38"	""	"     Block_Header* alloc_block = (Block_Header*)&(mspace->blocks[allocated_idx - mspace->first_block_idx]);"
> 	"39"	"*"	"     mspace->alloced_size += GC_BLOCK_SIZE_BYTES;"
> 	"40"	""	" "
> 	"41"	""	"     allocator_init_free_block(allocator, alloc_block);"
> 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.