8176565: G1 Does not perform heap verification after remark with VerifyAfterGC

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

8176565: G1 Does not perform heap verification after remark with VerifyAfterGC

Mikael Gerdin
Hi all,

Please review this small change to when G1 performs heap verification.

Background to this change is that it is fairly common knowledge that in
order to rule out GC bugs you should run with -XX:+VerifyBeforeGC
-XX:+VerifyAfterGC.
In order to make it easier for people to get the kind of heap
verification they expect we should have G1 perform a verification at the
end of the remark phase similar to what CMS does.
Previously this verification has only been enabled with
-XX:+VerifyDuringGC for G1 but that is a lesser known flag and I think
we should try to make it easier for our users to get the verification
passes they expect.

This is a low-risk fix and it will be good to have in 9.0 for debugging
purposes.

Webrev: http://cr.openjdk.java.net/~mgerdin/8176565/webrev.0/
Bug: https://bugs.openjdk.java.net/browse/JDK-8176565
Testing: JPRT, local testing with -XX:+VerifyAfterGC

/Mikael
Reply | Threaded
Open this post in threaded view
|

Re: 8176565: G1 Does not perform heap verification after remark with VerifyAfterGC

Aleksey Shipilev-4
On 03/13/2017 03:58 PM, Mikael Gerdin wrote:

> Hi all,
>
> Please review this small change to when G1 performs heap verification.
>
> Background to this change is that it is fairly common knowledge that in order to
> rule out GC bugs you should run with -XX:+VerifyBeforeGC -XX:+VerifyAfterGC.
> In order to make it easier for people to get the kind of heap verification they
> expect we should have G1 perform a verification at the end of the remark phase
> similar to what CMS does.
> Previously this verification has only been enabled with -XX:+VerifyDuringGC for
> G1 but that is a lesser known flag and I think we should try to make it easier
> for our users to get the verification passes they expect.
>
> This is a low-risk fix and it will be good to have in 9.0 for debugging purposes.
>
> Webrev: http://cr.openjdk.java.net/~mgerdin/8176565/webrev.0/
While I agree this is good change, I wonder if you want a global verification
option that does not mention any particular GC phase, e.g. -XX:+VerifyGC. Then,
external users can rely on GC developers to put the verification points within
the GC, where they think verification is needed. (We do this in Shenandoah with
-XX:+ShenandoahVerify).

That flag may just ergonomically enable all three verification options:
-XX:+Verify{Before,After,During}GC.

Thanks,
-Aleksey.


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 8176565: G1 Does not perform heap verification after remark with VerifyAfterGC

Mikael Gerdin
Hi Aleksey,

On 2017-03-13 16:27, Aleksey Shipilev wrote:

> On 03/13/2017 03:58 PM, Mikael Gerdin wrote:
>> Hi all,
>>
>> Please review this small change to when G1 performs heap verification.
>>
>> Background to this change is that it is fairly common knowledge that in order to
>> rule out GC bugs you should run with -XX:+VerifyBeforeGC -XX:+VerifyAfterGC.
>> In order to make it easier for people to get the kind of heap verification they
>> expect we should have G1 perform a verification at the end of the remark phase
>> similar to what CMS does.
>> Previously this verification has only been enabled with -XX:+VerifyDuringGC for
>> G1 but that is a lesser known flag and I think we should try to make it easier
>> for our users to get the verification passes they expect.
>>
>> This is a low-risk fix and it will be good to have in 9.0 for debugging purposes.
>>
>> Webrev: http://cr.openjdk.java.net/~mgerdin/8176565/webrev.0/
>
> While I agree this is good change, I wonder if you want a global verification
> option that does not mention any particular GC phase, e.g. -XX:+VerifyGC. Then,
> external users can rely on GC developers to put the verification points within
> the GC, where they think verification is needed. (We do this in Shenandoah with
> -XX:+ShenandoahVerify).
>
> That flag may just ergonomically enable all three verification options:
> -XX:+Verify{Before,After,During}GC.

That might make sense but in trying to get this in to 9 I'd prefer to
keep the change as simple as possible.

We should look into how we handle verification as a future RFE. There
are also the VerifySubSet and VerifyRememberedSets flags to consider.

Thanks
/Mikael

>
> Thanks,
> -Aleksey.
>
Reply | Threaded
Open this post in threaded view
|

Re: 8176565: G1 Does not perform heap verification after remark with VerifyAfterGC

Aleksey Shipilev-4
On 03/13/2017 04:37 PM, Mikael Gerdin wrote:

>>> Webrev: http://cr.openjdk.java.net/~mgerdin/8176565/webrev.0/
>>
>> While I agree this is good change, I wonder if you want a global verification
>> option that does not mention any particular GC phase, e.g. -XX:+VerifyGC. Then,
>> external users can rely on GC developers to put the verification points within
>> the GC, where they think verification is needed. (We do this in Shenandoah with
>> -XX:+ShenandoahVerify).
>>
>> That flag may just ergonomically enable all three verification options:
>> -XX:+Verify{Before,After,During}GC.
>
> That might make sense but in trying to get this in to 9 I'd prefer to keep the
> change as simple as possible.
That sounds fine to me. Please consider this all-in verification option in a
long term :) Perhaps 9u?

-Aleksey


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 8176565: G1 Does not perform heap verification after remark with VerifyAfterGC

Thomas Schatzl
In reply to this post by Mikael Gerdin
Hi,

On Mon, 2017-03-13 at 15:58 +0100, Mikael Gerdin wrote:

> Hi all,
>
> Please review this small change to when G1 performs heap
> verification.
>
> Background to this change is that it is fairly common knowledge that
> in 
> order to rule out GC bugs you should run with -XX:+VerifyBeforeGC 
> -XX:+VerifyAfterGC.
> In order to make it easier for people to get the kind of heap 
> verification they expect we should have G1 perform a verification at
> the 
> end of the remark phase similar to what CMS does.
> Previously this verification has only been enabled with 
> -XX:+VerifyDuringGC for G1 but that is a lesser known flag and I
> think 
> we should try to make it easier for our users to get the
> verification 
> passes they expect.
>
> This is a low-risk fix and it will be good to have in 9.0 for
> debugging 
> purposes.

  looks good to me.

Thomas