harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao-Feng Li (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5395) [drlvm] vm.classloading.ClassCastTest hangs
Date Mon, 21 Jan 2008 02:32:34 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560914#action_12560914
] 

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

||- 1) Change from APR CAS* operations to PORT atomics.
||- Now APR atomics are not atomics at all. APR sources contain several implementations for
CAS*, and in our environment worse case is compiled.
||- However, replacing APR atomics with (corrected) PORT atomics does not fix the problem.
So I guess the problem is not in APR.

In this case, you can have a separate JIRA with a patch, suggesting to remove APR atomics
in Harmony at all. Any occurrence could lead to problem if not cleaned up completely. 

||- 2) When I've simply replaced APR atomics with current PORT atomics, GC started to hang
right in gc_metadata_initialize (specifically in sync_stack_push).
||- I've carefully inspected disassembly for these functions and found that PORT atomics are
inlined incorrectly because of some problems in PORT atomics implementation.
||- That's why I've corrected PORT atomics.

In this case, please do as what I suggested above, and with correct PORT atomics implementations
in your patch. But please comment accurately in your patch if the issue comes from gcc 64bit
bug or it is really PORT implementation bug. If it's gcc bug, better to keep the original
version as well, but use #ifdef for workaround version for gcc. At least we should put some
comments there to explain.

||- 3) The changes in GC were made to ensure that 'new' value read from memory _after_ CAS*
operation is actually new.
||- Using the value returned by CAS* function garantees that, while second simple read from
the same address is less reliable.
||- All the changes in GC are in this direction.

You should check if all the variables are defined as volatile. If the variable is defined
as volatile, then it should be always read from memory. If gcc 64bit can't compile into correct
version, that's a serious problem of gcc, so I really doubt it. 


> [drlvm] vm.classloading.ClassCastTest hangs
> -------------------------------------------
>
>                 Key: HARMONY-5395
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5395
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: revision 612006 release mode
> Linux x86_64
>            Reporter: Andrey Yakushev
>         Attachments: atomics.patch
>
>
> [drlvm] vm.classloading.ClassCastTest stably hangs on first iteration

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


Mime
View raw message