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

Bengt Rutisson bengt.rutisson at oracle.com
Fri Feb 15 06:54:00 UTC 2013

On 2/14/13 7:50 PM, John Cuthbertson wrote:
> Hi Bengt, Leonid,
> On 2/14/2013 4:47 AM, Bengt Rutisson wrote:
>> Leonid,
>> 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?
> As Mikael Gerdin has pointed out there are already a bunch of NMT 
> regression tests that call jcmd on themselves and I just followed the 
> guidelines given in Christian Tornqvist's wiki. If this is an issue 
> then all of these NMT tests should be removed and this mechanism 
> should also be removed.

I don't think we should remove the tests. Let's use this technique for 
now. When we figure out a better way (Mikael suggested piping to a file 
and reading that after the jcmd call has returned) we can go through and 
fix all test that have these issues.
> Also the output of the jcmd is not that important - it's the fact that 
> the test didn't crash. So if there's a way avoid the potential 
> deadlock by disregarding the output - so be it.

Well, it may be ok for your test, but I'm sure there are tests that need 
to verify the output.

>> 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/
> OK. Sure.
>> * You don't need -XX:+IgnoreUnrecognizedVMOptions in the @run command
> Why not? What about running on a platform where UseG1GC is not 
> currently supported and the flag gives an error?

OK. Good point. I keep forgetting that we have no control over how and 
where the tests are run. This is really annoying.

>> * 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.
> OK. But IMO the bug ID is meaningful. Is it any more meaningful than 
> TestJcmdG1AndZeroPGCT? I'm not sure. Suggest a name that you find more 
> meaningful.

My point is that if you use "@bug 8005875" then naming the directory 
after the bug id does not add any information. Instead we can use the 
directory name to help someone who sees a failure or who wants to run a 
set of related tests. I would prefer to name the directory something 
that would help group tests together.

So, my suggestion would be to either place the test directly in the gc 
folder or to place it in folder where we could later place related 
tests. Maybe call it "g1", "parallel_threads" or "jcmd"? Maybe none of 
them are perfect but at least they add new information.


> JohnC

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

More information about the hotspot-gc-dev mailing list