RFR (XS): JDK-8025728: Missing volatile specifier for field G1AllocRegion::_alloc_region

Thomas Schatzl thomas.schatzl at oracle.com
Wed Oct 2 10:11:53 UTC 2013


Hi again,

On Wed, 2013-10-02 at 10:42 +0200, Thomas Schatzl wrote:
> Hi Axel,
> 
> On Wed, 2013-10-02 at 07:16 +0000, Siebenborn, Axel wrote:
> > Hi
> > 
> > We investigated some crashes on AIX using the G1 collector. We
> > compiled the HotSpot with IBM XLC12. The reason for the crashes is,
> > that XLC creates code which loads _alloc_region's value and compares
> > it against NULL. Later on, it reloads _alloc_region from memory and
> > uses that new value without another null-check. The problem is that
> > meanwhile another thread has set the _alloc_region's value to NULL.
> 
> Could you give some context to the problem, what particular code is
> involved in this problem?

Just to give background to my question: all code that sets _alloc_region
to NULL, seems to be running serialized in the VM thread. There are also
not that many places where _alloc_region is first stored in a local
variable, then checked against NULL (i.e. assert'ed) and then used
again.

(From a brief code inspection, may be wrong)

Thanks,
Thomas




More information about the hotspot-gc-dev mailing list