<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><br>
      Hi Jon,<br>
      <br>
      On 4/28/14 11:17 PM, Jon Masamitsu wrote:<br>
    </div>
    <blockquote cite="mid:535EC568.7060207@oracle.com" type="cite">The
      requirement that an evacuation failure not happen during this
      <br>
      test is based on the expected behavior of the GC and is not a
      <br>
      required behavior.  In some instance the evacuation failure will
      <br>
      happen, but it is a not a  GC failure if it does and is only an
      <br>
      unexpected path being followed.
      <br>
      <br>
      The test is not reliable but before removing it, I've made
      <br>
      some changes to try and save it.  I've modified the
      <br>
      test to slow down the allocations and changed the allocation to
      <br>
      allocate smaller objects (which also has a side effect of slowing
      <br>
      allocations).   The goal is to detect gross breakages of
      <br>
      evacuation failure while risking only very, very rare spurious
      <br>
      failures.
      <br>
      <br>
      I had reproduced the failure with the unmodified test and it
      <br>
      would fail within 30 minutes.  With the modifications, I haven't
      <br>
      seen the failure in a day of testing.
      <br>
      <br>
      If the modifications don't work, I'll remove the test.
      <br>
      <br>
      <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~jmasa/8038928/webrev.00/">http://cr.openjdk.java.net/~jmasa/8038928/webrev.00/</a>
      <br>
      <br>
      <a class="moz-txt-link-freetext" href="https://bugs.openjdk.java.net/browse/JDK-8038928">https://bugs.openjdk.java.net/browse/JDK-8038928</a>
      <br>
    </blockquote>
    <br>
    Slowing down the test does not seem like a stable solution. Just
    like you point out.<br>
    <br>
    What do you think about this instead?<br>
    <br>
    The original code does:<br>
    <br>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    // create 128MB of garbage. This should result in at least one GC<br>
    for (int i = 0; i < 1024; i++) {<br>
      garbage = new byte[128 * 1024];<br>
    }<br>
    <br>
    We run with
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    -Xmx10M but no -Xmn set. We should only ever promote one object each
    GC, so I assume that what happens when we get an evacuation failure
    is that we get too many GCs that it fills up the old space.<br>
    <br>
    How about specifying -Xmn and only allocate enough to fill the young
    gen a few times. Instead of allocating 128MB we could maybe run with
    -Xmn2M and allocate 8MB worth of objects. That should be enough to
    get a few GCs but not enough to fill the old gen up. If you want to
    be really safe you could also increase -Xmx to something like 128M.<br>
    <br>
    Thanks,<br>
    Bengt<br>
    <br>
    <blockquote cite="mid:535EC568.7060207@oracle.com" type="cite">
      <br>
      Thanks.
      <br>
      <br>
      Jon
      <br>
    </blockquote>
    <br>
  </body>
</html>