-
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
8267213: cpuinfo_segv is incorrectly triaged as execution protection violation on x86_32 #4044
Conversation
👋 Welcome back jiefu! A progress list of the required criteria for merging this PR into |
/test |
@DamonFool |
@DamonFool The |
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 Jie,
I'm not sure this is the right fix. It seems to me from the comments about having a sane addr and pc that the basic assumption/premise is that addr > pc as it is being checked when expected to be part of the current instruction. So if addr < pc I would think pc_is_near_addr should be false.
David
Thanks @dholmes-ora for your review. Okay, I think your suggestion is good since it just works as before and won't make things worse. But I'm not sure whether the basic assumption/premise that Let's consider the following case
In this case, I think Thanks. |
How about removing the
|
Good suggestion. |
Mailing list message from David Holmes on hotspot-dev: On 17/05/2021 5:54 pm, Jie Fu wrote:
I would expect pc to point to start of jmp instruction and addr to point David |
OK. |
Mailing list message from David Holmes on hotspot-dev: Hi Jie, On 18/05/2021 9:14 am, Jie Fu wrote:
I don't know how this "pc is near addr" check ends up affecting the Have you analysed the original crash to check what the actual pc and Thanks, |
1 similar comment
Mailing list message from David Holmes on hotspot-dev: Hi Jie, On 18/05/2021 9:14 am, Jie Fu wrote:
I don't know how this "pc is near addr" check ends up affecting the Have you analysed the original crash to check what the actual pc and Thanks, |
The crash case should not be considered "near" since addr = 0x0, pc = 0xe66095e6. And the stack is like this:
Thanks. [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp#L344 |
Hi @dholmes-ora , After more investigation, I believe this is a signal handling bug. In this case, cpuinfo_segv is incorrectly triaged as execution protection violation on Linux/x86_32. During VM initialization, cpuinfo_segv [1] will be triggered (by accessing addr=0) on purpose.
The VM can recognizes it as cpuinfo_segv [2] here and assigned the stub. To avoid this kind of false-positive, one more condition Note: we don't need to change windows since there is a special signal for this condition [3]. Thanks. [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/vm_version_x86.cpp#L466 |
/summary 8267213: cpuinfo_segv is incorrectly triaged as execution protection violation on x86_32 |
@DamonFool Setting summary to |
May I get reviews for this small fix? |
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.
Sorry for the delay.
The revised analysis and fix seems reasonable.
Thanks,
David
@DamonFool 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 103 new commits pushed to the
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. ➡️ To integrate this PR with the above commit message to the |
Thanks @dholmes-ora . |
/summary |
@DamonFool Removing existing summary |
/integrate |
@DamonFool Since your change was applied there have been 128 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit b403d39. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi all,
This is a follow-up of JDK-8260046.
And it can be reproduced by
java -XX:UnguardOnExecutionViolation=1
on x86_32.Let's fix it
Thanks.
Best regards,
Jie
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4044/head:pull/4044
$ git checkout pull/4044
Update a local copy of the PR:
$ git checkout pull/4044
$ git pull https://git.openjdk.java.net/jdk pull/4044/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4044
View PR using the GUI difftool:
$ git pr show -t 4044
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4044.diff