Skip to content

Investigate flaky parallel/test-crypto-binary-default on linux-fips #8455

Closed

Description

@Trott
  • Version: v7.0.0-pre
  • Platform: ubuntu1404-64
  • Subsystem: test crypto

Example failure at https://ci.nodejs.org/job/node-test-commit-linux-fips/3569/nodes=ubuntu1404-64/console:

not ok 374 parallel/test-crypto-binary-default
# TIMEOUT

@mhdawson

Activity

  1. added
    cryptoIssues and PRs related to the crypto subsystem.
    testIssues and PRs related to Node.js core tests and test infrastructure.
    on Sep 8, 2016
  2. bnoordhuis commented on Sep 9, 2016

    @bnoordhuis
    Member

    No surprise. The test normally generates 256 bits DH primes but in FIPS mode it switches to 1024 bits, which is hugely slow and variable:

    $ perf stat -r 10 ./out/Release/node -e 'crypto.createDiffieHellman(1024)'
           # ...
           5440.264700 task-clock (msec) # 0.999 CPUs utilized ( +- 30.04% )
           # ...
           5.443948026 seconds time elapsed ( +- 30.03% )
    

    The percentages are the standard deviation from the mean over 10 runs. For 256 bits primes it's much lower, as is the total running time:

    $ perf stat -r 10 ./out/Release/node -e 'crypto.createDiffieHellman(256)'
           # ...
            178.755007 task-clock (msec) # 0.994 CPUs utilized ( +-  6.88% )
           # ...
           0.179777933 seconds time elapsed ( +-  6.82% )
    

    Which is to be expected because 'generating primes' is really just searching for primes in an n-bit range, testing candidates for primality and other properties (because not all primes are created equal.)

    There is an upper bound but it's very large so for practical purposes the total running time of the test is indeterminate. There are always going to be outliers that hit the timeout.

    (That also applies to 256 bits primes, just much less frequent.)

  3. Trott commented on Sep 9, 2016

    @Trott
    MemberAuthor

    @nodejs/build Is it possible to run a node-stress-single-test task on CI that forces FIPS mode? If so, how can I do that?

  4. Trott commented on Sep 9, 2016

    @Trott
    MemberAuthor
  5. joaocgreis commented on Sep 14, 2016

    @joaocgreis
    Member

    @Trott the node-stress-single-test-fips should be good again. Here is a run with the same parameters: https://ci.nodejs.org/view/Node.js/job/node-stress-single-test-fips/10/nodes=ubuntu1404-64/console

  6. Trott commented on Sep 14, 2016

    @Trott
    MemberAuthor

    0 failures in 9999 runs on FIPS and non-FIPS. I'm going to close this. If it crops up again, we can look at it more, I suppose.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.testIssues and PRs related to Node.js core tests and test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions