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

JDK-8296631 NSS tests failing on OL9 linux-aarch64 hosts #15644

Closed
wants to merge 6 commits into from

Conversation

mcpowers
Copy link
Contributor

@mcpowers mcpowers commented Sep 8, 2023

https://bugs.openjdk.org/browse/JDK-8296631


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8296631: NSS tests failing on OL9 linux-aarch64 hosts (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15644/head:pull/15644
$ git checkout pull/15644

Update a local copy of the PR:
$ git checkout pull/15644
$ git pull https://git.openjdk.org/jdk.git pull/15644/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15644

View PR using the GUI difftool:
$ git pr show -t 15644

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15644.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 8, 2023

👋 Welcome back mpowers! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 8, 2023
@openjdk
Copy link

openjdk bot commented Sep 8, 2023

@mcpowers The following label will be automatically applied to this pull request:

  • security

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the security security-dev@openjdk.org label Sep 8, 2023
@mlbridge
Copy link

mlbridge bot commented Sep 8, 2023

Webrevs

@valeriepeng
Copy link

I will take a look. Thanks!

Comment on lines 71 to 74
double version = getNSSVersion();
if (version == 0.0 || version >= 3.55) {
useSqlite(true);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of updating various tests with this block, how about doing this inside SecmodTest.initSecmod()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a change would apply NSS version number checks to TestNssDbSqlite which currently doesn't have them. But wait! If TestNssDbSqlite has been running for years on all NSS versions, then it should be safe to make sqlite the default for all tests.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for new NSS releases, it should be safe to set sqlite to true by default. The tests which relies on sqlite like TestNssDbSqlite can always call useSqlite(true) regardless of default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valeriepeng Thanks for the review! I'll set sqlite to true by default and retest.

@valeriepeng
Copy link

Just curious, there are already test/jdk/sun/security/pkcs11/Secmod/cert9.db and test/jdk/sun/security/pkcs11/Secmod/key4.db, what are the reasons for updating them? Since it's binary file, I can't tell what changes they are for...
In addition, do we need to check all PKCS11 tests which have key3.db and cert8.db and add corresponding key4.db/cert9.db?

@mcpowers
Copy link
Contributor Author

Without updating Secmod/cert9.db and Secmod/key4.db, both Secmod/JksSetPrivateKey and Secmod/GetPrivateKey will fail. The old values must have been incorrect. This was not noticed because cert8.db and key3.db were used if there were a libnssdbm3 on the machine. In OL9, there is no libnssdbm3, so the failures appeared.

Regarding your second question, every cert8/key3 pair has a cert9/key4 pair except for pkcs11/tls tests which only have cert8/key3.

@valeriepeng
Copy link

Without updating Secmod/cert9.db and Secmod/key4.db, both Secmod/JksSetPrivateKey and Secmod/GetPrivateKey will fail. The old values must have been incorrect. This was not noticed because cert8.db and key3.db were used if there were a libnssdbm3 on the machine. In OL9, there is no libnssdbm3, so the failures appeared.

Regarding your second question, every cert8/key3 pair has a cert9/key4 pair except for pkcs11/tls tests which only have cert8/key3.

Thanks for the explanation~
Then what happens to the pkcs11/tls/tls12 test which does not have cert9.db/key4.db? Will they continue to work against newer NSS releases with default sqlite=true?

@mcpowers
Copy link
Contributor Author

Good point. No it does not work. The test failed to initialize the NSS module, printed "skipping", and returned pass. I converted the cert8/key3 pair to cert9/key4 and created a pkcs11.txt file. Now it works.

@valeriepeng
Copy link

Thanks, changes look good to me.

@openjdk
Copy link

openjdk bot commented Sep 28, 2023

@mcpowers This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8296631: NSS tests failing on OL9 linux-aarch64 hosts

Reviewed-by: valeriep

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 158 new commits pushed to the master branch:

  • 878d27d: 8317273: compiler/codecache/OverflowCodeCacheTest.java fails transiently on Graal
  • 2637e8d: 8317314: Remove unimplemented ObjArrayKlass::oop_oop_iterate_elements_bounded
  • 8093563: 8317295: ResponseSubscribers.SubscriberAdapter should call the finisher function asynchronously
  • 516cfb1: 8316907: Fix nonnull-compare warnings
  • 5984792: 8316415: Parallelize sun/security/rsa/SignedObjectChain.java subtests
  • eeb63cd: 8316361: C2: assert(!failure) failed: Missed optimization opportunity in PhaseIterGVN with -XX:VerifyIterativeGVN=10
  • 6948942: 8317327: Remove JT_JAVA dead code in jib-profiles.js
  • 795e5dc: 8315503: G1: Code root scan causes long GC pauses due to imbalanced iteration
  • 207819a: 8315604: IGV: dump and visualize node bottom and phase types
  • 8fcf70e: 5066247: Refine the spec of equals() and hashCode() for j.text.Format classes
  • ... and 148 more: https://git.openjdk.org/jdk/compare/a021dbcb9e58ab60abfc8c46ff25f3aa8ce3cc9f...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@valeriepeng) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 28, 2023
@mcpowers
Copy link
Contributor Author

mcpowers commented Oct 2, 2023

@valeriepeng Thanks for the review!

@mcpowers
Copy link
Contributor Author

mcpowers commented Oct 2, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Oct 2, 2023
@openjdk
Copy link

openjdk bot commented Oct 2, 2023

@mcpowers
Your change (at version 2c6fb4a) is now ready to be sponsored by a Committer.

@valeriepeng
Copy link

/sponsor

@openjdk
Copy link

openjdk bot commented Oct 2, 2023

Going to push as commit 6e1aacd.
Since your change was applied there have been 165 commits pushed to the master branch:

  • d2e2c4c: 8309667: TLS handshake fails because of ConcurrentModificationException in PKCS12KeyStore.engineGetEntry
  • e25121d: 8316929: Shenandoah: Shenandoah degenerated GC and full GC need to cleanup old OopMapCache entries
  • 5c8366e: 8268622: Performance issues in javac Name class
  • ad81abd: 8317034: Remove redundant type cast in the java.util.stream package
  • d7d1d42: 8316771: Krb5.java has not defined messages for all error codes
  • f985006: 8309356: Read files in includedir in alphanumeric order
  • a564d43: 8315692: Parallelize gc/stress/TestStressRSetCoarsening.java test
  • 878d27d: 8317273: compiler/codecache/OverflowCodeCacheTest.java fails transiently on Graal
  • 2637e8d: 8317314: Remove unimplemented ObjArrayKlass::oop_oop_iterate_elements_bounded
  • 8093563: 8317295: ResponseSubscribers.SubscriberAdapter should call the finisher function asynchronously
  • ... and 155 more: https://git.openjdk.org/jdk/compare/a021dbcb9e58ab60abfc8c46ff25f3aa8ce3cc9f...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 2, 2023
@openjdk openjdk bot closed this Oct 2, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Oct 2, 2023
@openjdk
Copy link

openjdk bot commented Oct 2, 2023

@valeriepeng @mcpowers Pushed as commit 6e1aacd.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@mcpowers mcpowers deleted the JDK-8296631 branch October 3, 2023 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated security security-dev@openjdk.org
2 participants