RFR(XS): 8008188: Add regression test for 8005875

Bengt Rutisson bengt.rutisson at oracle.com
Thu Feb 14 12:47:29 UTC 2013


Leonid,

On 2/14/13 1:27 PM, Leonid Mesnik wrote:
> John
>
> This test should start failing in non-G1 baseline. Even 
> "IgnoreUnrecognizedVMOptions" is added I think it should fail because 
> of incompatible GC combinations.

Actually it won't fail. The test checks that the output "G1 Parallel 
Marking Threads" is *not* present, which it won't be for any other 
collectors.

It is kind of a waste to run this test for other collectors but it won't 
fail. However, since the testing framework is limited and can't handle 
that we need to write tests for specific GCs I think this is how we have 
to write our tests.

> Also I think that investigation parent process from child is not safe 
> and make analysis harder if something going wrong.
>
> Also there was a bug  15947151 - JDK6 JMAP -HEAP LOCKS post 6u29.
> Here are comments from Kevin:
>
> /@ Using Runtime.exec to launch a child process which then attaches 
> back to the/
> /@ parent to run diagnostics just sounds risky.  Diagnostics may need 
> to suspend/
> /@ the parent JVM.  The child needs the parent to read buffers such 
> that the /
> /@ child may write.  Buffering usually lets this succeed, but there 
> could/
> /@ be some risk./
>
>
> So I would prefer to avoid such schemes if we don't want to test them.

Yes, this is an interesting problem. If the buffer for the 
OutputAnalyzer gets full before the jmap call returns we will have a 
deadlock.

Would you suggest that the test should spawn two processes? How do they 
do the handshaking to find out when it is safe to do a jmap call from 
one to the other?

Looking at this test again reminded me of a few more minor things:

* It would be good if the test had the "@key gc" tag that I am just 
about to add. See:
http://cr.openjdk.java.net/~brutisso/8006398/webrev.01/

* You don't need -XX:+IgnoreUnrecognizedVMOptions in the @run command

* The test is in a directory called 8005875/. I again think this is 
obsolete if we use the @bug tag. I would prefer to name the folder 
something meaningful.

Thanks,
Bengt

>
> Leonid
>
> On 02/14/2013 04:51 AM, John Cuthbertson wrote:
>> Hi Everyone,
>>
>> Can I have a couple of volunteers review the regression test for 
>> 8005875 - the webrev can be found at: 
>> http://cr.openjdk.java.net/~johnc/8008188/webrev.0/
>>
>> The test is very simple and issues "jcmd <pid> Thread.print" against 
>> itself. With G1 and PGCT=0, and before the fix for 8005875, this 
>> command crashes the VM.
>>
>> Testing:
>> jdk8 build (b76) with fix for 8005875; jdk8 build (b71) without fix 
>> for 8005875; Changed the test options to run the test with the 
>> invalid flag -XX:+UseG2GC.
>>
>> Thanks,
>>
>> JohnC
>
>
> -- 
> Leonid Mesnik
> JVM SQE

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20130214/00fa9660/attachment.htm>


More information about the hotspot-gc-dev mailing list