We're updating the issue view to help you get more done. 

Assertion failure in Conversions.bytesToPages

Description

The assertion in the code shown below fails on PPC64.

Conversions.java

1 2 3 4 5 6 7 8 9 public static int bytesToPagesUp(Extent bytes) { return bytes.plus(BYTES_IN_PAGE-1).toWord().rshl(LOG_BYTES_IN_PAGE).toInt(); } public static int bytesToPages(Extent bytes) { int pages = bytesToPagesUp(bytes); if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(pagesToAddress(pages).toWord().toExtent().EQ(bytes)); return pages; }

The following part of the stack trace contains the same method calls for all failures:

– Stack –
(0x00000000420a69a8 3142) at [0x00000000420a69a8, 0x000000003542dff0] Lorg/jikesrvm/VM; sysFail(Ljava/lang/StringV at line 2327
(0x00000000420a69d8 2868) at [0x00000000420a69d8, 0x000000003542e190] Lorg/jikesrvm/VM; _assertionFailure(Ljava/lang/String;Ljava/lang/StringV at line 626
(0x00000000420a6a30 2866) at [0x00000000420a6a30, 0x000000003542e290] Lorg/jikesrvm/VM; _assert(ZLjava/lang/String;Ljava/lang/StringV at line 609
(0x00000000420a6a88 2864) at [0x00000000420a6a88, 0x00000000352794ec] Lorg/jikesrvm/VM; _assert(Z)V at line 584
(0x00000000420a6ac8 8951) at [0x00000000420a6ac8, 0x000000003538c500] Lorg/jikesrvm/mm/mmtk/Assert; _assert(Z)V at line 54
(0x00000000420a6b08 2853) at [0x00000000420a6b08, 0x00000000351f6568] Lorg/mmtk/utility/Conversions; bytesToPages(Lorg/vmmagic/unboxed/ExtentI at line 129
(0x00000000420a6b58 9016) at [0x00000000420a6b58, 0x00000000351f6a00] Lorg/mmtk/utility/heap/MonotonePageResource; releasePages(Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/ExtentV at line 302
(0x00000000420a6bd0 9010) at [0x00000000420a6bd0, 0x00000000351f6d54] Lorg/mmtk/utility/heap/MonotonePageResource; releasePages()V at line 268
(0x00000000420a6c20 9005) at [0x00000000420a6c20, 0x00000000351cb6a8] Lorg/mmtk/utility/heap/MonotonePageResource; reset()V at line 218
(0x00000000420a6c58 4321) at [0x00000000420a6c58, 0x00000000351cb184] Lorg/mmtk/policy/CopySpace; release()V at line 129

According to my notes, the failure can occur at least in the following configurations

  • ExtremeAssertionsOptAdaptiveUsePrimitiveWriteBarries

  • BaseBaseSemiSpace

  • BaseBaseGenCopy

in different benchmarks (e.g. fop, xalan, JByteMark, _213_javac and _201_compress).

Environment

PPC64, x64

Status

Assignee

Robin Garner

Reporter

Erik Brangs

Labels

None

External issue ID

None

Fix versions

Affects versions

3.1.3

Priority

Medium