-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8263054: [testbug] SharedArchiveConsistency.java reuses jsa files #2839
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
8263054: [testbug] SharedArchiveConsistency.java reuses jsa files #2839
Conversation
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Ioi,
Seems reasonable. One comment below.
Thanks,
David
newJsaFile.createNewFile(); | ||
Files.copy(orgJsaFile.toPath(), newJsaFile.toPath(), REPLACE_EXISTING); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not clear why you need to create the file if you are going to immediately replace it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the call to createNewFile and it seems to work just fine. I don't remember why the call was there before. I'll do more testing before integrating.
@iklam 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:
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 no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks @dholmes-ora and @yminqi for the review. |
@iklam Since your change was applied there have been 3 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 75a5be8. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
SharedArchiveConsistency.java runs a child process with a JSA file. Then, it modifies the JSA file, and then reuses this same JSA file to run another child process.
However, on Windows, after first child process has exited, some sort of file lock is still held on the JSA file, so when we try to modify the JSA file for the second process, sometimes we get the "The requested operation cannot be performed on a file with a user-mapped section open" error.
The fix is to always create a new JSA file for every new test case, and never modify/reuse the JSA files. (We have been following this rule for other CDS tests).
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/2839/head:pull/2839
$ git checkout pull/2839