Skip to content

CryptoTests cryptotest/tests/SignatureTests.java timeout in java.math.BigInteger.implSquareToLen #16711

Open

Description

@pshipton

https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_x86-64_linux_Nightly_testList_0/394/ - ub16x64j96
CryptoTests_0
cryptotest/tests/SignatureTests.java

timeout, no diagnostic files.

133)	SunEC: 	SHA1withECDSA~SHA1withECDSA	 (Signature)

"MainThread" prio=5 Id=22 RUNNABLE
	at java.base@17.0.6-internal/java.math.BigInteger.implSquareToLen(BigInteger.java:2212)
	at java.base@17.0.6-internal/java.math.BigInteger.squareToLen(BigInteger.java:2124)
	at java.base@17.0.6-internal/java.math.BigInteger.implMontgomerySquare(BigInteger.java:2866)
	at java.base@17.0.6-internal/java.math.BigInteger.montgomerySquare(BigInteger.java:2823)
	at java.base@17.0.6-internal/java.math.BigInteger.oddModPow(BigInteger.java:3093)
	at java.base@17.0.6-internal/java.math.BigInteger.modPow(BigInteger.java:2754)
	at java.base@17.0.6-internal/java.math.BigInteger.passesMillerRabin(BigInteger.java:1122)
	at java.base@17.0.6-internal/java.math.BigInteger.primeToCertainty(BigInteger.java:978)
	at java.base@17.0.6-internal/java.math.BitSieve.retrieve(BitSieve.java:203)
	at java.base@17.0.6-internal/java.math.BigInteger.largePrime(BigInteger.java:847)
	at java.base@17.0.6-internal/java.math.BigInteger.probablePrime(BigInteger.java:785)
	at java.base@17.0.6-internal/sun.security.rsa.RSAKeyPairGenerator.generateKeyPair(RSAKeyPairGenerator.java:173)
	at java.base@17.0.6-internal/java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:727)
	at java.base@17.0.6-internal/java.security.KeyPairGenerator.genKeyPair(KeyPairGenerator.java:495)
	at app//cryptotest.utils.KeysNaiveGenerator.getRsaKeyPair(KeysNaiveGenerator.java:165)
	at app//cryptotest.utils.KeysNaiveGenerator.getRsaPrivateKey(KeysNaiveGenerator.java:169)
	at app//cryptotest.tests.SignatureTests.checkAlgorithm(SignatureTests.java:85)
	at app//cryptotest.utils.AlgorithmTest.mainLoop(AlgorithmTest.java:79)
	at app//cryptotest.tests.SignatureTests.main(SignatureTests.java:68)

Activity

  1. pshipton commented on Feb 13, 2023

    @pshipton
    MemberAuthor

    https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_extended.functional_s390x_linux_Nightly_testList_1/415 - ub20-390-3
    CryptoTests_0
    cryptotest/tests/SignatureTests.java

    72)	SunRsaSign: 	SHA384withRSA~OID.1.2.840.113549.1.1.12	 (Signature)
    
    "MainThread" prio=5 Id=22 RUNNABLE
    	at java.base@17.0.6-internal/java.math.BigInteger.implSquareToLen(BigInteger.java:2202)
    	at java.base@17.0.6-internal/java.math.BigInteger.squareToLen(BigInteger.java:2124)
    	at java.base@17.0.6-internal/java.math.BigInteger.square(BigInteger.java:2093)
    	at java.base@17.0.6-internal/java.math.BigInteger.square(BigInteger.java:2076)
    	at java.base@17.0.6-internal/java.math.BigInteger.lucasLehmerSequence(BigInteger.java:1070)
    	at java.base@17.0.6-internal/java.math.BigInteger.passesLucasLehmer(BigInteger.java:998)
    	at java.base@17.0.6-internal/java.math.BigInteger.primeToCertainty(BigInteger.java:978)
    	at java.base@17.0.6-internal/java.math.BitSieve.retrieve(BitSieve.java:203)
    	at java.base@17.0.6-internal/java.math.BigInteger.largePrime(BigInteger.java:847)
    	at java.base@17.0.6-internal/java.math.BigInteger.probablePrime(BigInteger.java:785)
    	at java.base@17.0.6-internal/sun.security.rsa.RSAKeyPairGenerator.generateKeyPair(RSAKeyPairGenerator.java:187)
    	at java.base@17.0.6-internal/java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:721)
    	at java.base@17.0.6-internal/java.security.KeyPairGenerator.genKeyPair(KeyPairGenerator.java:495)
    	at app//cryptotest.utils.KeysNaiveGenerator.getRsaKeyPair(KeysNaiveGenerator.java:165)
    	at app//cryptotest.utils.KeysNaiveGenerator.getRsaPrivateKey(KeysNaiveGenerator.java:169)
    	at app//cryptotest.tests.SignatureTests.checkAlgorithm(SignatureTests.java:85)
    	at app//cryptotest.utils.AlgorithmTest.mainLoop(AlgorithmTest.java:79)
    	at app//cryptotest.tests.SignatureTests.main(SignatureTests.java:68)
    
  2. pshipton commented on Feb 13, 2023

    @pshipton
    MemberAuthor

    @0xdaryl it seems OpenJ9 is too slow to complete this newly added test. I notice jdk17 implSquareToLen() has an @IntrinsicCandidate annotation, while in jdk11 it's @HotSpotIntrinsicCandidate.

    @llxia can we increase the timeout setting for this test?
    timeout set to 120000ms

  3. pshipton commented on Feb 13, 2023

    @pshipton
    MemberAuthor

    https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_aarch64_linux_Nightly_testList_0/99 - cent8-aarch64-1
    CryptoTests_0
    cryptotest/tests/SignatureTests.java

    34)	SUN: 	SHA3-256withDSA~OID.2.16.840.1.101.3.4.3.6	 (Signature)
    
    "MainThread" prio=5 Id=27 RUNNABLE
    	at java.base@19.0.2-internal/java.math.BigInteger.implMulAdd(BigInteger.java:3320)
    

    https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_aarch64_mac_Nightly_testList_0/103

    90)	SunRsaSign: 	SHA512withRSA~OID.1.2.840.113549.1.1.13	 (Signature)
    

    https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_ppc64_aix_Nightly_testList_1/100

    40)	SUN: 	SHA256withDSA~OID.2.16.840.1.101.3.4.3.2	 (Signature)
    
    "MainThread" prio=5 Id=35 RUNNABLE
    	at java.base@19.0.2-internal/java.math.BigInteger.implSquareToLen(BigInteger.java:2316)
    

    https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_ppc64le_linux_Nightly_testList_1/101

    46)	SUN: 	NONEwithDSA~RawDSA	 (Signature)
    
    "MainThread" prio=5 Id=35 RUNNABLE
    	at java.base@19.0.2-internal/java.math.BigInteger.implMulAddCheck(BigInteger.java:3296)
    

    https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_s390x_linux_Nightly_testList_1/102

    29)	SUN: 	SHA512withDSA~2.16.840.1.101.3.4.3.4	 (Signature)
    
    "MainThread" prio=5 Id=23 RUNNABLE
    	at java.base@19.0.2-internal/java.math.BigInteger.montReduce(BigInteger.java:3241)
    

    https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_x86-64_linux_Nightly_testList_1/100

    25)	SUN: 	SHA3-512withDSA~OID.2.16.840.1.101.3.4.3.8	 (Signature)
    
    "MainThread" prio=5 Id=23 RUNNABLE
    	at java.base@19.0.2-internal/java.math.BigInteger.implSquareToLen(BigInteger.java:2316)
    

    https://openj9-jenkins.osuosl.org/job/Test_openjdk19_j9_extended.functional_x86-64_mac_Nightly_testList_0/99

    91)	SunRsaSign: 	SHA512withRSA~1.2.840.113549.1.1.13	 (Signature)
    
  4. pshipton commented on Feb 13, 2023

    @pshipton
    MemberAuthor
  5. pshipton commented on Feb 13, 2023

    @pshipton
    MemberAuthor

    The jdk19 timeouts are also happening on Adoptium builds.

  6. llxia commented on Feb 13, 2023

    @llxia
    Contributor

    I can set -timeoutFactor:2 (instead of 1). But I am not sure if it is the best way to do it.
    https://openj9-jenkins.osuosl.org/job/Grinder/2022/

  7. llxia commented on Feb 14, 2023

    @llxia
    Contributor

    Increase timeout for CryptoTests: adoptium/aqa-tests#4339

  8. 0xdaryl commented on Mar 14, 2023

    @0xdaryl
    Contributor

    I notice jdk17 implSquareToLen() has an @IntrinsicCandidate annotation, while in jdk11 it's @HotSpotIntrinsicCandidate.

    Interesting. I believe our intrinsics matching code is only looking for the former, not the latter. But it is the former that might be the issue in this case. We'll investigate the slowness, but not for 0.38.

  9. 0xdaryl commented on Mar 14, 2023

    @0xdaryl
    Contributor

    @BradleyWood : please investigate the slowdown here. I moved this to 0.40.

  10. 5 remaining items

  11. BradleyWood commented on Jul 12, 2023

    @BradleyWood
    Member

    @0xdaryl it seems OpenJ9 is too slow to complete this newly added test. I notice jdk17 implSquareToLen() has an @IntrinsicCandidate annotation, while in jdk11 it's @HotSpotIntrinsicCandidate.

    I don't think implSquareToLen intrinsic was ever implemented in OpenJ9 on any platform. I think we should open an issue to implement it, and any other unimplemented intrinsics.

  12. hzongaro commented on Aug 14, 2023

    @hzongaro
    Member

    Reassigning to @jmesyou, as he's working on issue #17778.

    I'm not sure whether we need both issues, or if #17778 will act as an epic issue with this as a subtask. I'll leave it for him to decide.

  13. hzongaro commented on Aug 22, 2023

    @hzongaro
    Member

    I'm assuming this won't be ready for the 0.41 code split, so I'll move it out to 0.43.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions