RFR(S): 8010463: G1: Crashes with -UseTLAB and heap verification
Bengt Rutisson
bengt.rutisson at oracle.com
Tue Mar 26 15:09:38 UTC 2013
Hi John,
On 3/26/13 12:04 AM, John Cuthbertson wrote:
> 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.
Hm. I am not that good with JTReg, but I think I have heard that you can
get the different JTReg environment settings as system properties. Maybe
there is a system property for the vmoption parameter that you can pick
up and add to the spawned process? You probably want the system property
corresponding to TESTVMOPTS.
I'm not online right now, so I can't look at the JTReg documentation.
>
>>> 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).
Sounds good.
Thanks,
Bengt
>
> Thanks,
>
> JohnC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20130326/4bad9f87/attachment.htm>
More information about the hotspot-gc-dev
mailing list