Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CryptoTests_0 FAILED in x86-32_windows, x86-64_windows, arm_linux and solaris platforms #4336

Open
smlambert opened this issue Feb 13, 2023 · 11 comments
Assignees

Comments

@smlambert
Copy link
Contributor

smlambert commented Feb 13, 2023

2 failures, 2 errors on Windows 32bit builds (and 2 failures on x86-64_windows see Test_openjdk11_hs_extended.functional_x86-64_windows/330

[2023-02-11T18:21:57.066Z] --------------------------------------------------
[2023-02-11T18:21:57.066Z] Test results: passed: 27; failed: 2; error: 2
[2023-02-11T18:21:57.066Z] Report written to E:\workspace\Test_openjdk11_hs_extended.functional_x86-32_windows\aqa-tests\TKG\output_16761382023597\CryptoTests_0\report\html\report.html
[2023-02-11T18:21:57.066Z] Results written to E:\workspace\Test_openjdk11_hs_extended.functional_x86-32_windows\aqa-tests\TKG\output_16761382023597\CryptoTests_0\work
[2023-02-11T18:21:57.066Z] Error: Some tests failed or other problems occurred.
[2023-02-11T18:21:57.066Z] -----------------------------------
[2023-02-11T18:21:57.066Z] CryptoTests_0_FAILED
[2023-02-11T18:21:57.066Z] -----------------------------------

2 errors on arm_linux

Test Info
Test Name: CryptoTests_0
Test Duration: 24 min 35 sec
Machine: test-ibmcloud-win2012r2-x64-1
TRSS link for the test output: https://trss.adoptium.net/output/test?id=63e8120aed0b30773bfa2876

Build Info
Build Name: Test_openjdk11_hs_extended.functional_x86-32_windows
Jenkins Build start time: Feb 11 2023, 12:52 pm
Jenkins Build URL: https://ci.adoptopenjdk.net/job/Test_openjdk11_hs_extended.functional_x86-32_windows/323/
TRSS link for the build: https://trss.adoptium.net/allTestsInfo?buildId=63e8110aed0b30773bfa233f

Java Version
openjdk version "11.0.18" 2023-01-17
OpenJDK Runtime Environment Temurin-11.0.19+1 (build 11.0.18+1)
OpenJDK Client VM Temurin-11.0.19+1 (build 11.0.18+1, mixed mode)

Rerun in Grinder

Console:

[2023-02-11T18:08:57.373Z] STDOUT:
[2023-02-11T18:08:57.373Z] running: cryptotest.tests.ConfigurationTests
[2023-02-11T18:08:57.373Z] 0)	SUN: 	JavaLoginConfig~JavaLoginConfig	 (Configuration)
[2023-02-11T18:08:57.373Z] cryptotest.utils.AlgorithmRunException: java.io.IOException: The system cannot find the path specified
[2023-02-11T18:08:57.373Z] failed to use: JavaLoginConfig from SUN version 11
[2023-02-11T18:08:57.373Z] Failed
[2023-02-11T18:08:57.373Z] Total checks: 1, failed: 1
[2023-02-11T18:08:57.373Z] 1 Configuration failed
[2023-02-11T18:08:57.373Z] ** failed runs: 1 **
[2023-02-11T18:08:57.373Z] java.lang.Exception: 0)	SUN: 	JavaLoginConfig~JavaLoginConfig	 (Configuration)
[2023-02-11T18:08:57.373Z] 	at cryptotest.utils.AlgorithmTest.mainLoop(AlgorithmTest.java:83)
[2023-02-11T18:08:57.373Z] 	at cryptotest.tests.ConfigurationTests.main(ConfigurationTests.java:58)
[2023-02-11T18:08:57.373Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-02-11T18:08:57.373Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2023-02-11T18:08:57.373Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-02-11T18:08:57.374Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2023-02-11T18:08:57.374Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-02-11T18:08:57.374Z] 	at java.base/java.lang.Thread.run(Thread.java:829)
[2023-02-11T18:08:57.374Z] Caused by: cryptotest.utils.AlgorithmRunException: java.io.IOException: The system cannot find the path specified
[2023-02-11T18:08:57.374Z] 	at cryptotest.tests.ConfigurationTests.checkAlgorithm(ConfigurationTests.java:86)
[2023-02-11T18:08:57.374Z] 	at cryptotest.utils.AlgorithmTest.mainLoop(AlgorithmTest.java:79)
[2023-02-11T18:08:57.374Z] 	... 7 more
[2023-02-11T18:08:57.374Z] Caused by: java.io.IOException: The system cannot find the path specified
[2023-02-11T18:08:57.374Z] 	at java.base/java.io.WinNTFileSystem.createFileExclusively(Native Method)
[2023-02-11T18:08:57.374Z] 	at java.base/java.io.File.createNewFile(File.java:1035)
[2023-02-11T18:08:57.374Z] 	at cryptotest.tests.ConfigurationTests.createConfigFile(ConfigurationTests.java:100)
[2023-02-11T18:08:57.374Z] 	at cryptotest.tests.ConfigurationTests.checkAlgorithm(ConfigurationTests.java:70)
[2023-02-11T18:08:57.374Z] 	... 8 more
[2023-02-11T18:08:57.374Z] ** failed inits: 0 **
[2023-02-11T18:08:57.374Z] ** error runs: 0 **
[2023-02-11T18:08:57.374Z] 
[2023-02-11T18:08:57.374Z] FAILED: cryptotest.tests.ConfigurationTests
[2023-02-11T18:08:57.374Z] STDERR:
[2023-02-11T18:08:57.374Z] java.lang.RuntimeException: cryptotest.tests.ConfigurationTests failed with explanantion of 1479 chars long
[2023-02-11T18:08:57.374Z] 	at cryptotest.utils.TestResult.assertItself(TestResult.java:31)
[2023-02-11T18:08:57.374Z] 	at cryptotest.tests.ConfigurationTests.main(ConfigurationTests.java:61)
[2023-02-11T18:08:57.374Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-02-11T18:08:57.374Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2023-02-11T18:08:57.374Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-02-11T18:08:57.374Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2023-02-11T18:08:57.374Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-02-11T18:08:57.374Z] 	at java.base/java.lang.Thread.run(Thread.java:829)
...

[2023-02-11T18:09:34.632Z] 10)	SunMSCAPI: 	Windows-MY-LOCALMACHINE~Windows-MY-LOCALMACHINE	 (KeyStore)
[2023-02-11T18:09:34.632Z] cryptotest.utils.AlgorithmRunException: java.io.IOException: java.security.KeyStoreException: Access is denied.
[2023-02-11T18:09:34.632Z] 
[2023-02-11T18:09:34.632Z] failed to use: Windows-MY-LOCALMACHINE from SunMSCAPI version 11
[2023-02-11T18:09:34.632Z] Failed
[2023-02-11T18:09:34.632Z] 11)	SunMSCAPI: 	Windows-ROOT~Windows-ROOT	 (KeyStore)
[2023-02-11T18:09:34.632Z] Passed
[2023-02-11T18:09:34.632Z] Total checks: 12, failed: 2
[2023-02-11T18:09:34.632Z] 2 KeyStore failed
[2023-02-11T18:09:34.633Z] ** failed runs: 2 **
[2023-02-11T18:09:34.633Z] java.lang.Exception: 6)	SunMSCAPI: 	Windows-ROOT-LOCALMACHINE~Windows-ROOT-LOCALMACHINE	 (KeyStore)
[2023-02-11T18:09:34.633Z] 	at cryptotest.utils.AlgorithmTest.mainLoop(AlgorithmTest.java:83)
[2023-02-11T18:09:34.633Z] 	at cryptotest.tests.KeyStoreTests.main(KeyStoreTests.java:58)
[2023-02-11T18:09:34.633Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-02-11T18:09:34.633Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2023-02-11T18:09:34.633Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-02-11T18:09:34.633Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2023-02-11T18:09:34.633Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-02-11T18:09:34.633Z] 	at java.base/java.lang.Thread.run(Thread.java:829)
[2023-02-11T18:09:34.633Z] Caused by: cryptotest.utils.AlgorithmRunException: java.io.IOException: java.security.KeyStoreException: Access is denied.

...

@smlambert smlambert changed the title CryptoTests_0 FAILED in Test_openjdk11_hs_extended.functional_x86-32_windows CryptoTests_0 FAILED in x86-32_windows, x86-64_windows and arm_linux Feb 13, 2023
@zzambers
Copy link
Contributor

@judovana Summary:

cryptotest/CryptoTest.java.CryptoTest

  • timeout
  • runs whole testsute (do we want this, when we also have separate tests?)

cryptotest/tests/SignatureTests.java.SignatureTests

  • timeout

Windows: (we currently do not run on win)

cryptotest.tests.ConfigurationTests

  • seems like this will need test fix ( tmp file created in non-portable way )

cryptotest/tests/KeyStoreTests.java.KeyStoreTests/ SunMSCAPI

  • would need more investigation

@zzambers
Copy link
Contributor

I have created PR, which should fix ConfigurationTests on Windows:
rh-openjdk/CryptoTest#32

@zzambers
Copy link
Contributor

These PRs should fix remaining issues on Windows:
rh-openjdk/CryptoTest#36
rh-openjdk/CryptoTest#37

@smlambert
Copy link
Contributor Author

thanks kindly @zzambers !

@zzambers
Copy link
Contributor

I re-tested this:

x86-64_windows: OK
https://ci.adoptium.net/job/Grinder/6751/

arm_linux: OK
https://ci.adoptium.net/job/Grinder/6752/
test-sxa-armv7l-ubuntu2004-odroid-1 (machine where it timeouted): OK
https://ci.adoptium.net/job/Grinder/6753/

Seems like there are no more windows issues after Cryptotest fixes.
When it comes to problems on arm, these were timeouts (based on name I guess is one of these small computers - probably not very fast). But it passed now, I think this timeout increase helped here: #4339

I think this issue can be closed. (I cannot close it myself)

@smlambert
Copy link
Contributor Author

I had assumed you already addressed these issues, thanks for confirming with Grinder @zzambers, closing this now.

@smlambert
Copy link
Contributor Author

There is still a failure on 32bit windows (deep history).

@zzambers
Copy link
Contributor

Problem is SignatureTests timeout (240s) on win32, with stacktrace such as (just to make sure, information is not lost):

[2023-04-12T02:36:48.369Z] "MainThread" #13 prio=5 os_prio=0 cpu=239796.88ms elapsed=240.22s tid=0x011b08b0 nid=0x2564 runnable  [0x13b1e000]
[2023-04-12T02:36:48.369Z]    java.lang.Thread.State: RUNNABLE
[2023-04-12T02:36:48.369Z] 	at java.math.BigInteger.implMulAdd(java.base@17.0.7-beta/BigInteger.java:3201)
[2023-04-12T02:36:48.369Z] 	at java.math.BigInteger.mulAdd(java.base@17.0.7-beta/BigInteger.java:3171)
[2023-04-12T02:36:48.369Z] 	at java.math.BigInteger.montReduce(java.base@17.0.7-beta/BigInteger.java:3120)
[2023-04-12T02:36:48.369Z] 	at java.math.BigInteger.implMontgomerySquare(java.base@17.0.7-beta/BigInteger.java:2867)
[2023-04-12T02:36:48.369Z] 	at java.math.BigInteger.montgomerySquare(java.base@17.0.7-beta/BigInteger.java:2823)
[2023-04-12T02:36:48.369Z] 	at java.math.BigInteger.oddModPow(java.base@17.0.7-beta/BigInteger.java:3093)
[2023-04-12T02:36:48.369Z] 	at java.math.BigInteger.modPow(java.base@17.0.7-beta/BigInteger.java:2754)
[2023-04-12T02:36:48.369Z] 	at java.math.BigInteger.passesMillerRabin(java.base@17.0.7-beta/BigInteger.java:1122)
[2023-04-12T02:36:48.369Z] 	at java.math.BigInteger.primeToCertainty(java.base@17.0.7-beta/BigInteger.java:978)
[2023-04-12T02:36:48.369Z] 	at java.math.BitSieve.retrieve(java.base@17.0.7-beta/BitSieve.java:203)
[2023-04-12T02:36:48.369Z] 	at java.math.BigInteger.largePrime(java.base@17.0.7-beta/BigInteger.java:847)
[2023-04-12T02:36:48.369Z] 	at java.math.BigInteger.probablePrime(java.base@17.0.7-beta/BigInteger.java:785)
[2023-04-12T02:36:48.369Z] 	at sun.security.rsa.RSAKeyPairGenerator.generateKeyPair(java.base@17.0.7-beta/RSAKeyPairGenerator.java:173)
[2023-04-12T02:36:48.369Z] 	at java.security.KeyPairGenerator$Delegate.generateKeyPair(java.base@17.0.7-beta/KeyPairGenerator.java:727)
[2023-04-12T02:36:48.369Z] 	at java.security.KeyPairGenerator.genKeyPair(java.base@17.0.7-beta/KeyPairGenerator.java:495)
[2023-04-12T02:36:48.369Z] 	at cryptotest.utils.KeysNaiveGenerator.getRsaKeyPair(KeysNaiveGenerator.java:165)
[2023-04-12T02:36:48.369Z] 	at cryptotest.utils.KeysNaiveGenerator.getRsaPrivateKey(KeysNaiveGenerator.java:169)
[2023-04-12T02:36:48.369Z] 	at cryptotest.tests.SignatureTests.checkAlgorithm(SignatureTests.java:87)
[2023-04-12T02:36:48.369Z] 	at cryptotest.utils.AlgorithmTest.mainLoop(AlgorithmTest.java:79)
[2023-04-12T02:36:48.369Z] 	at cryptotest.tests.SignatureTests.main(SignatureTests.java:70)
[2023-04-12T02:36:48.369Z] 	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@17.0.7-beta/Native Method)
[2023-04-12T02:36:48.369Z] 	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@17.0.7-beta/NativeMethodAccessorImpl.java:77)
[2023-04-12T02:36:48.369Z] 	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.7-beta/DelegatingMethodAccessorImpl.java:43)
[2023-04-12T02:36:48.369Z] 	at java.lang.reflect.Method.invoke(java.base@17.0.7-beta/Method.java:568)
[2023-04-12T02:36:48.369Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-04-12T02:36:48.369Z] 	at java.lang.Thread.run(java.base@17.0.7-beta/Thread.java:833)

See also:
eclipse-openj9/openj9#16711

I went through several results, all timeout, while performing BigInteger arithmetic (so not on blocking method like e.g. reading from random). Probably BigInteger arithmetic is just slow on some platforms.. :/

@smlambert smlambert changed the title CryptoTests_0 FAILED in x86-32_windows, x86-64_windows and arm_linux CryptoTests_0 FAILED in x86-32_windows, x86-64_windows, arm_linux and solaris platforms Apr 25, 2023
@smlambert
Copy link
Contributor Author

Will also exclude on Solaris platforms until they can be fixed there. (See #4518 (comment) and #4518 (comment)).

@zzambers
Copy link
Contributor

zzambers commented May 9, 2023

I think reason of slowness on 32-bit Intel (and possibly other platforms) may be due to absence of intrinsics on these platforms.

Method from stacktrace and some other BigInteger methods are marked @IntrinsicCandidate:
https://github.com/openjdk/jdk/blob/f5a6b7f7c03c00c96d0055f9be31057675205e13/src/java.base/share/classes/java/math/BigInteger.java#L3318

but intrinsics seem to be only available for x86_64 (64-bit):
https://github.com/openjdk/jdk/blob/f5a6b7f7c03c00c96d0055f9be31057675205e13/src/hotspot/cpu/x86/macroAssembler_x86.cpp#LL7218C22-L7218C29
https://github.com/openjdk/jdk/blob/f5a6b7f7c03c00c96d0055f9be31057675205e13/src/hotspot/cpu/x86/macroAssembler_x86.hpp#L1863

which could explain this... (as platforms without intrinsics would fall back to java code, which is slower)

I have made PR to increase timeout for SignatureTests:
rh-openjdk/CryptoTest#48

@smlambert
Copy link
Contributor Author

smlambert commented Jul 17, 2023

On arm_linux appears that the error is intermittent, one of the 31 testcases are timing out:

From https://ci.adoptium.net/job/Test_openjdk20_hs_extended.functional_arm_linux/121/testReport/cryptotest_CryptoTest/java/CryptoTest/

[2023-07-16T00:45:37.558Z] TEST RESULT: Error. Program `/home/jenkins/workspace/Test_openjdk20_hs_extended.functional_arm_linux/openjdkbinary/j2sdk-image/bin/java' timed out (timeout set to 1200000ms, elapsed time including timeout handling was 1200330ms).
[2023-07-16T00:45:37.558Z] --------------------------------------------------
[2023-07-16T00:45:37.558Z] Test results: passed: 31; error: 1
[2023-07-16T00:45:37.558Z] Report written to /home/jenkins/workspace/Test_openjdk20_hs_extended.functional_arm_linux/aqa-tests/TKG/output_16894653571077/CryptoTests_0/report/html/report.html
[2023-07-16T00:45:37.558Z] Results written to /home/jenkins/workspace/Test_openjdk20_hs_extended.functional_arm_linux/aqa-tests/TKG/output_16894653571077/CryptoTests_0/work
[2023-07-16T00:45:37.558Z] Error: Some tests failed or other problems occurred.

Deep history shows that it 'sometimes' passes:
Screenshot 2023-07-17 at 8 28 25 AM

Possible cause for intermittency is described in: eclipse-openj9/openj9#16712 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants