-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8309698: [S390X] Test hotspot/jtreg/runtime/NMT/VirtualAllocCommitMerge.java fails after JDK-8299089 #20096
Conversation
…interpreted.
👋 Welcome back mmatti-sw! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@mmatti-sw 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. |
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.
I see the comment saying this is in alternative but we will need to test it again in our CI.
Given this test specifically chooses the compilation mode it should also exclude being run under other modes, or even specify @requires vm.flagless
- as it makes no sense to have the -Xint
overridden.
Testing in our CI was good. |
Did anyone actually analyze this problem? What is the root cause? Switching the JIT on and off at random should have no bearing on how NMT functions. I see, looking at the test output, that it fails with
But the output is there, in the virtual mapping printout:
But I guess the callstack is missing? So I would like to understand why, and whats preventing the callstack from being shown, and why switching on the JIT helps? NMT is an important component. Just disabling tests that indicate problems is not a good practice. |
The existing comment in the test indicates the test either needs nothing compiled, or everything, else it can't do what it intended. I agree there is some utility in understanding why S390 interpreter behaviour doesn't meet the test's expectations. |
But that's not the reason the test fails. And it should have worked with -Xint. Here, we don't have a stack at all. That is a different error. And when did it start failing? I see that some stacks are printed. Is stack printing broken for some cases on s390? |
I also like Xint more, since stacks are more stable - we take the JIT out of the equation. Compile decisions could be different between different runs. If not today, it is not guaranteed never to happen - nobody guarantees exactly how the JIT optimizes and that it is bound to repeat the same decisions on every run. |
Let me have a look at this. |
It would be interesting to know if this is something that started to happen recently, and if yes, which patch broke it. |
According to the issue https://bugs.openjdk.org/browse/JDK-8309698, the commit c705673 broke this! |
I can reproduce it on |
Huh that's weird. Is this a particular hardware configuration that is new, or a new compiler? Because I am sure we do s390 tests. I think Adoptium does too. What happens: We use NativeCallStack to get a stack at the point os::commit_memory is called: jdk/src/hotspot/share/runtime/os.cpp Line 2117 in 2928753
CALLER_PC resolves to NativeCallStack(1), which walks the stack starting one frame above. If that fails, the stack will have 0 in its first slot (
jdk/src/hotspot/share/nmt/memReporter.cpp Lines 427 to 432 in 2928753
But according to the printout, there is no general problem with stack printing, since I see call stacks ending in os::commit_memory (see the many "committed xxx from"). In this case, the stack should show the whitebox function jdk/src/hotspot/share/prims/whitebox.cpp Lines 715 to 718 in 62cbf70
So, the task would be to find out whats so special about this function that it does not show up in the callstack. |
I think the os::current_stack_pointer() implementation for s390 needs to be looked into along with NativeCallStack::NativeCallStack(int toSkip). |
I've been thinking of looking at and possibly improving the implementations of os::current_stack_pointer for each platform recently, let me know if you plan on changing the implementation of s390x |
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 still disagree with the patch as it is now. The error should be analyzed, understood, and fixed. E.g. I don't get the relationship to JDK-8299089. What in JDK-8299089 can have caused stack walking on s390 to fail?
This fix is not terribly urgent, since the error just affects stacks in NMT virtual allocation printouts, and only some stacks at that. So, if you want to get the s390 CI clean, it would be absolutely fine to problem-list the test for s390. That is usually how we mute problems that we cannot fix immediately.
Thanks, Thomas
@mmatti-sw This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@mmatti-sw This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
On s390 the testcase "VirtualAllocCommitMerge.java" when run under Interpreter with option -Xint fails. But when run as compiled with option -Xcomp -Xbatch it Passes.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20096/head:pull/20096
$ git checkout pull/20096
Update a local copy of the PR:
$ git checkout pull/20096
$ git pull https://git.openjdk.org/jdk.git pull/20096/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20096
View PR using the GUI difftool:
$ git pr show -t 20096
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20096.diff
Webrev
Link to Webrev Comment