-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8309475: Test java/foreign/TestByteBuffer.java fails: a problem with msync (aix) #14964
8309475: Test java/foreign/TestByteBuffer.java fails: a problem with msync (aix) #14964
Conversation
👋 Welcome back tsteele! A progress list of the required criteria for merging this PR into |
@backwaterred The following label will be automatically applied to this pull request:
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. |
e7b8bc8
to
bdb461a
Compare
Webrevs
|
It's good that this doesn't clutter the Unix implementation of these methods with a lot of AIX-specific code. However, part of me wonders if force should special case the read-only or private mapping cases so that it's just a no-op, need to think about that one as the MBB implementation doesn't know if the mapping is read-write or private. |
I agree with the sentiment. It would be nice to have this information available without so much heavy lifting. |
FYI: We are excluding the failing test for the time being in #15055. The exclusion will need to be removed with the final commit for this. |
Thanks for mentioning it @RealCLanger. I'll remove the exception from the ProblemList before I merge. This PR and #14963 are ready for reviews if anyone has a chance to take a look. |
|
fa876e5
to
7d40837
Compare
3d94099
to
b435874
Compare
7d40837
to
3565791
Compare
Fixing chaos brought on by merging with upstream/master branch. |
Code seems reasonable: on msync error EINVAL retrieves info about flags of mapped region and reacts accordingly. |
Thanks Thomas 😄 |
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.
Code seems reasonable: on msync error EINVAL retrieves info about flags of mapped region and reacts accordingly.
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.
This is a reasonable solution for the problem.
The compile error above mentioned by Martin is observed with xlC 17.1.1 (build with xlc16 still works). |
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.
Otherwise looks okay but please fix the xlc17 build before pushing.
There are some issues with the integration tests apparently. Those failures do not appear related to my changes:
|
|
I thought it might complain about that as well. Thanks for testing. I made this change. |
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.
The removal of the AIX specific code from the Unix version of MappedMemoryUtils.c look fine. At some point I think we should re-visit this as the force method should be a no-op for the read-only or private mapping cases so this code should not be needed.
The build now works as well with xlc17. |
The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork: git checkout aix/TestByteBuffer-alternate
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push |
I think you need to remove "java/foreign/TestByteBuffer.java 8309475 aix-ppc64" from test/jdk/ProblemList.txt. |
Good point. I did that after the last merge too :-) |
@backwaterred 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.
Thanks for the updates!
/integrate |
Going to push as commit 395fc78.
Your commit was automatically rebased without conflicts. |
@backwaterred Pushed as commit 395fc78. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This change adds additional support to MappedByteBuffer::force which delegates to msync on AIX. Specifically, it checks whether and error with errno set to EINVAL is the cause of a msync call to an address mmapped with the MAP_PRIVATE flag set. If this flag is set, then the msync call EINVAL is expected, and can be ignored as per the Java documentation of the force method.
Separated into separate file as per recommendation by @AlanBateman.
[1] https://download.java.net/java/early_access/jdk21/docs/api/java.base/java/nio/MappedByteBuffer.html#force()
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14964/head:pull/14964
$ git checkout pull/14964
Update a local copy of the PR:
$ git checkout pull/14964
$ git pull https://git.openjdk.org/jdk.git pull/14964/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14964
View PR using the GUI difftool:
$ git pr show -t 14964
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14964.diff
Webrev
Link to Webrev Comment