RFR(S): 8010463: G1: Crashes with -UseTLAB and heap verification
John Cuthbertson
john.cuthbertson at oracle.com
Mon Mar 25 23:04:07 UTC 2013
Hi Bengt,
Thanks for looking again. A question inline...
On 3/25/2013 12:11 AM, Bengt Rutisson wrote:
>
>>
>>>
>>> About the test. Great that you write a regression test for this! :)
>>>
>>> The @summary says that the test uses -XX:+VerifyDuringGC but the
>>> command line is actually using -XX:+VerifyBeforeGC (which is
>>> correct, I think). Also, would it make sense to have a separate test
>>> that specifies -XX:+UseG1GC and checks the output that we expect to see?
>>
>> Yeah. Good catch. It should be with VerifyBeforeGC. Must have had
>> marking on the brain.
>>
>> As for the test. I think we can check the output for "VerifyBefore"
>> for all the collectors. I'll change the test.
>
> Great!
I may have spoken too soon. Using ProcessBuilder, is there any way to
pass the GC flags to the spawned java process? The spawned process is
not being passed any additional flags that are passed to jtreg. For example:
> /home/jcuthber/jtreg/jtreg/solaris/bin/jtreg \
> -jdk:/java/re/jdk/8/latest/binaries/solaris-i586/fastdebug \
> -vmoption:-XX:+UseG1GC \
> gc/TestVerifyBeforeGCDuringStartup.java
does not pass -XX:+UseG1GC to the java process spawned by the test:
> /* @test TestVerifyBeforeGCDuringStartup.java
> * @key gc
> * @bug 8010463
> * @summary Simple test run with -XX:+VerifyBeforeGC -XX:-UseTLAB to
> verify 8010463
> * @library /testlibrary
> */
>
> import com.oracle.java.testlibrary.OutputAnalyzer;
> import com.oracle.java.testlibrary.ProcessTools;
>
> public class TestVerifyBeforeGCDuringStartup {
> public static void main(String args[]) throws Exception {
> ProcessBuilder pb =
> ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC",
> "-XX:-UseTLAB",
> "-XX:+UnlockDiagnosticVMOptions",
> "-XX:+VerifyBeforeGC",
> "-version");
> OutputAnalyzer output = new OutputAnalyzer(pb.start());
> output.shouldContain("[Verifying");
> output.shouldHaveExitValue(0);
> }
> }
If I don't specify G1 in the argument list to ProcessBuilder, the test
does not fail.
>> 2. Use (VerifyBeforeGC && VerifyGCStartAt == 0)
>
> Right. I would prefer 1. but I'm fine with 2. Maybe 2. is more
> reasonable change to do for this fix. Perhaps 1. should be its own change.
I went with 2. I'll submit a new CR to use a new flag (and use a
VMOperation).
Thanks,
JohnC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20130325/ec4da761/attachment.htm>
More information about the hotspot-gc-dev
mailing list