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-8293344: JDK-8242181 broke stack printing for non-attached threads #10158

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Sep 5, 2022

https://bugs.openjdk.org/browse/JDK-8242181 gave us source infos in call stacks on Linux, which is really nice, but it made stack printing more vulnerable. We now require Thread::current, which makes stack printing fail and crash in non-attached threads. Causes truncated or missing stacks in hs-err file resp. crashes if stack printing is used outside error reporting.

I tested the fix manually.

I also am working on a testing facility for cases like these, which I will introduce in a separate RFE (see https://bugs.openjdk.org/browse/JDK-8293346).


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-8293344: JDK-8242181 broke stack printing for non-attached threads

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10158

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

Using diff file

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

@tstuefe
Copy link
Member Author

tstuefe commented Sep 5, 2022

/label hotspot-runtime

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 5, 2022

👋 Welcome back stuefe! 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 hotspot-runtime hotspot-runtime-dev@openjdk.org label Sep 5, 2022
@openjdk
Copy link

openjdk bot commented Sep 5, 2022

@tstuefe
The hotspot-runtime label was successfully added.

@tstuefe tstuefe marked this pull request as ready for review September 5, 2022 07:31
@tstuefe
Copy link
Member Author

tstuefe commented Sep 5, 2022

pinging @chhagedorn

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 5, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 5, 2022

Webrevs

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for fixing this! I guess I've missed that behind the PPC ifdef.

@openjdk
Copy link

openjdk bot commented Sep 5, 2022

@tstuefe 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:

8293344: JDK-8242181 broke stack printing for non-attached threads

Reviewed-by: chagedorn, mdoerr

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 9 new commits pushed to the master branch:

  • e31c537: 8293224: Add link to openjdk.org/jtreg/ from doc/testing
  • 955baa3: 8267374: macOS: Option+Up/Down Arrow don't traverse to beginning/end of line in JTextArea
  • 8df671c: 8293355: JDK-8293167 included bad copyright header
  • 5bed9f7: 8293290: RISC-V: Explicitly pass a third temp register to MacroAssembler::store_heap_oop
  • 48b3ab0: 8293167: Memory leak in JfrThreadSampler if stackdepth is larger than default (64)
  • 4067321: 8291586: Broken links in JVMTI specification
  • 32f4dc8: 8293295: Add type check asserts to java_lang_ref_Reference accessors
  • e945619: 8293088: Fix compilation with the new Visual Studio preprocessor
  • 730ced9: 8292660: C2: blocks made unreachable by NeverBranch-to-Goto conversion are removed incorrectly

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 5, 2022
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for fixing!

@tstuefe
Copy link
Member Author

tstuefe commented Sep 5, 2022

Thanks @chhagedorn and @TheRealMDoerr !

/integrate

@openjdk
Copy link

openjdk bot commented Sep 5, 2022

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

  • 2c61efe: 8282648: Weaken the InflaterInputStream specification in order to allow faster Zip implementations
  • e31c537: 8293224: Add link to openjdk.org/jtreg/ from doc/testing
  • 955baa3: 8267374: macOS: Option+Up/Down Arrow don't traverse to beginning/end of line in JTextArea
  • 8df671c: 8293355: JDK-8293167 included bad copyright header
  • 5bed9f7: 8293290: RISC-V: Explicitly pass a third temp register to MacroAssembler::store_heap_oop
  • 48b3ab0: 8293167: Memory leak in JfrThreadSampler if stackdepth is larger than default (64)
  • 4067321: 8291586: Broken links in JVMTI specification
  • 32f4dc8: 8293295: Add type check asserts to java_lang_ref_Reference accessors
  • e945619: 8293088: Fix compilation with the new Visual Studio preprocessor
  • 730ced9: 8292660: C2: blocks made unreachable by NeverBranch-to-Goto conversion are removed incorrectly

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 5, 2022
@openjdk openjdk bot closed this Sep 5, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 5, 2022
@openjdk
Copy link

openjdk bot commented Sep 5, 2022

@tstuefe Pushed as commit d4e3e69.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
3 participants