RFR(S): 8222103: [testbug] compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest may exceed VM limit

Igor Ignatyev igor.ignatyev at oracle.com
Fri May 31 17:09:26 UTC 2019


Hi Peter,

the patch looks good to me.

-- Igor

> On May 31, 2019, at 6:46 AM, Januschke, Peter <peter.januschke at sap.com> wrote:
> 
> Hi,
>  
> sorry for taking so long. Since I am a member of SAP´s work council, I have only very limited time for doing development.
>  
> So now here is a solution like proposed by Igor:
>  
> http://cr.openjdk.java.net/~mdoerr/8222103_testbug/webrev.02/ <http://cr.openjdk.java.net/~mdoerr/8222103_testbug/webrev.02/>
>  
> https://bugs.openjdk.java.net/browse/JDK-8222103 <https://bugs.openjdk.java.net/browse/JDK-8222103>
>  
> Please review, and I please need a sponsor.
>  
> Best regards
>  
> Peter
>  
> From: Igor Ignatyev <igor.ignatyev at oracle.com> 
> Sent: Dienstag, 9. April 2019 18:30
> To: Nils Eliasson <nils.eliasson at oracle.com>; Januschke, Peter <peter.januschke at sap.com>
> Cc: hotspot-compiler-dev at openjdk.java.net compiler <hotspot-compiler-dev at openjdk.java.net>
> Subject: Re: RFR(S): 8222103: [testbug] compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest may exceed VM limit
>  
> Nils, 
>  
> thanks for the clarification.
>  
> Peter, 
>  
> I haven't looked at these tests for quite a while, and, I guess, presence of 'jcmd' in the path got me confused, so I (now obviously) incorrectly assumed that the directives are added by jcmd. in this case, I agree that it is a test bug. I'd however prefer it to be fixed slightly different and instead of adding 'CompilerDirectivesLimit to command line I'd read its value using WhiteBox and limit ClearDirectivesFileStackTest::AMOUNT by it.
>  
> you'll also need to update year in the copyright notice.
>  
> Thanks,
> -- Igor
> On Apr 9, 2019, at 4:55 AM, Nils Eliasson <nils.eliasson at oracle.com <mailto:nils.eliasson at oracle.com>> wrote:
>  
> Hi,
> The design is that you add a number of directives together to get a desired behavior. Adding just some of them make no sense. 
> If you add directives by command line, and get an error (syntax or limit) - it will print the error stop the startup. This allows the user to correct the problem and retry. 
> If you add by jcmd, the error is printed on the jcmd console, but the VM continues on unaffected. The user can correct the problem and make another try.
> I think there is a separate test of the limit. And if that is already covered, testing it in this test too, seems unnecessary.
> Regards,
> // Nils
>  
> On 2019-04-09 11:34, Januschke, Peter wrote:
> 
> Hi Igor,
>  
> the current implementation prints a message and then stops:
>  
> bool DirectivesStack::check_capacity(int request_size, outputStream* st) {
>   if ((request_size + _depth) > CompilerDirectivesLimit) {
>     st->print_cr("Could not add %i more directives. Currently %i/%i directives.", request_size, _depth, CompilerDirectivesLimit);
>     return false;
>   }
>   return true;
> }
>  
> Best regards
>  
> Peter
>  
> From: Igor Ignatyev <igor.ignatyev at oracle.com> <mailto:igor.ignatyev at oracle.com> 
> Sent: Montag, 8. April 2019 19:25
> To: Januschke, Peter <peter.januschke at sap.com> <mailto:peter.januschke at sap.com>
> Cc: hotspot-compiler-dev at openjdk.java.net <mailto:hotspot-compiler-dev at openjdk.java.net>
> Subject: Re: RFR(S): 8222103: [testbug] compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest may exceed VM limit
>  
> Hi Peter,
>  
> I don't think it's a test bug, VM shouldn't stop execution if someone requests too many compiler directives, instead it should reject requests which will exceed its capacity.
>  
> -- Igor  
> 
> 
> 
> On Apr 8, 2019, at 1:18 AM, Januschke, Peter <peter.januschke at sap.com <mailto:peter.januschke at sap.com>> wrote:
>  
> Hi,
>  
> I propose the following fix to the test mentioned in the subject:
>  
> Problem:
> The test generates a random number of compiler directives, which might be greater than the value of CompilerDirectivesLimit. This causes the VM to stop execution upon the corresponding capacity check. 
> 
> Fix: set CompilerDirectivesLimit to the max random number used.
>  
> http://cr.openjdk.java.net/~goetz/wr19/peter/8222103-01 <http://cr.openjdk.java.net/~goetz/wr19/peter/8222103-01>
>  
> https://bugs.openjdk.java.net/browse/JDK-8222103 <https://bugs.openjdk.java.net/browse/JDK-8222103>
>  
> Please review, and I please need a sponsor.
>  
> Best regards
>  
> Peter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20190531/3869e34f/attachment-0001.html>


More information about the hotspot-compiler-dev mailing list