JDK-8137255 : sun/security/provider/NSASuiteB/TestDSAGenParameterSpec.java timeouts intermittently
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-09-28
  • Updated: 2018-03-21
  • Resolved: 2016-05-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9 Other
8u161Fixed 9 b121Fixed openjdk7uFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
PATH='C:\\cygwin\\usr\\local\\bin;C:\\cygwin\\bin;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Program Files\\Puppet Labs\\Puppet\\bin' \\
SystemDrive=C: \\
SystemRoot='C:\\Windows' \\
TEMP='C:\\cygwin\\tmp' \\
TMP='C:\\cygwin\\tmp' \\
windir='C:\\Windows' \\
    'C:\\users\\aurora\\CommonData\\jdk\\bin\\java' \\
        -Dtest.class.path.prefix='C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_security3\\JTwork\\classes\\sun\\security\\provider\\NSASuiteB;C:\\Users\\aurora\\sandbox\\testbase\\jdk\\test\\sun\\security\\provider\\NSASuiteB' \\
        -Dtest.src='C:\\Users\\aurora\\sandbox\\testbase\\jdk\\test\\sun\\security\\provider\\NSASuiteB' \\
        -Dtest.src.path='C:\\Users\\aurora\\sandbox\\testbase\\jdk\\test\\sun\\security\\provider\\NSASuiteB' \\
        -Dtest.classes='C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_security3\\JTwork\\classes\\sun\\security\\provider\\NSASuiteB' \\
        -Dtest.class.path='C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_security3\\JTwork\\classes\\sun\\security\\provider\\NSASuiteB' \\
        -Dtest.vm.opts='-ea -esa -DCompatibilityTest.disableNetwork=true -Xmx512m' \\
        -Dtest.tool.vm.opts='-J-ea -J-esa -J-DCompatibilityTest.disableNetwork=true -J-Xmx512m' \\
        -Dtest.compiler.opts= \\
        -Dtest.java.opts= \\
        -Dtest.jdk='C:\\users\\aurora\\CommonData\\jdk' \\
        -Dcompile.jdk='C:\\users\\aurora\\CommonData\\jdk' \\
        -Dtest.timeout.factor=4.0 \\
        -classpath 'C:\\Users\\aurora\\CommonData\\jtreg\\lib\\javatest.jar;C:\\Users\\aurora\\CommonData\\jtreg\\lib\\jtreg.jar;C:\\Users\\aurora\\sandbox\\gresults\\testoutput\\jdk_security3\\JTwork\\classes\\sun\\security\\provider\\NSASuiteB;C:\\Users\\aurora\\sandbox\\testbase\\jdk\\test\\sun\\security\\provider\\NSASuiteB' \\
        TestDSAGenParameterSpec
result: Error. Agent error: java.lang.Exception: Agent timed out with a timeout of 480 seconds; check console log for any additional details

Comments
It looks that the algorithm parameter generation [1] also takes a long time. [1] http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/647431dccd71/test/sun/security/provider/NSASuiteB/TestDSAGenParameterSpec.java#l82
18-05-2016

You need analyze this test to find out where most of the time is spent. My guess is, http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/647431dccd71/test/sun/security/provider/NSASuiteB/TestDSAGenParameterSpec.java#l134. Keys generated at line 134 are not used anywhere in test. To validate spec, it is enough to call initialize(AlgorithmParameterSpec params) which would raise exception if given parameters are inappropriate for this key pair generator.
13-05-2016

In test issue JDK-8137231, which is similar to this one, Joe Darcy commented: Note that setting large timeouts for a single test can degrade the overall running time of the test suite and should be used with caution. And maybe it's hard to determine the reasonable value.
08-04-2016

I think we need to override the default timeout 480 to a larger value as the time for crypto operation may vary a lot between different OS. However, need to observe the reasonable value across OS and set accordingly.
06-04-2016

My 2 cents. Whenever I see "Agent error", I suspect it is something not related to the test itself. Either jtreg goes wrong or another test crashes the VM and brings down more tests. I've just conducted an experiment: If you set a timeout smaller than necessary, a test fails with "TEST RESULT: Error. test was interrupted! (timeout?)". Note this is different from the message in this report.
02-10-2015

Probably need more time to generate some of the larger keypairs on slower systems. Try increasing the timeout with /timeout.
01-10-2015