Skip to content
This repository has been archived by the owner. It is now read-only.

8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails #76

Closed
wants to merge 5 commits into from

Conversation

JornVernee
Copy link
Member

@JornVernee JornVernee commented Jun 16, 2021

Upstream a critical fix from the panama-foreign repo.

See the prior review thread here: openjdk/panama-foreign#558

Testing: tier 1-2, local run of run-test-jdk_foreign.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk17 pull/76/head:pull/76
$ git checkout pull/76

Update a local copy of the PR:
$ git checkout pull/76
$ git pull https://git.openjdk.java.net/jdk17 pull/76/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 76

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk17/pull/76.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jun 16, 2021

👋 Welcome back jvernee! 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 rfr label Jun 16, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jun 16, 2021

@JornVernee The following labels will be automatically applied to this pull request:

  • build
  • core-libs
  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added build hotspot core-libs labels Jun 16, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 16, 2021

Webrevs

Copy link
Contributor

@mcimadamore mcimadamore left a comment

I've approved a similar changeset on panama-dev. Looks still good :-)

@openjdk
Copy link

@openjdk openjdk bot commented Jun 16, 2021

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

8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails

Reviewed-by: mcimadamore, erikj

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

  • 7d7bdbe: 8268776: Test ADatagramSocket.java missing /othervm from @run tag
  • 344e3ed: 8268080: java/util/concurrent/forkjoin/AsyncShutdownNow.java fails with java.util.concurrent.RejectedExecutionException
  • 4c9aefd: 8268739: AArch64: Build failure after JDK-8267663
  • 112ddb7: 8268641: [foreign] assert(allocates2(pc)) failed: not in CodeBuffer memory with ShenandoahGC
  • 9f7851b: 8260194: Update the documentation for -Xcheck:jni
  • ee03bc6: 8268863: ProblemList serviceability/sa/TestJmapCoreMetaspace.java on linux-x64 with ZGC
  • f0f2178: 8268909: ProblemList jdk/jfr/api/consumer/streaming/TestLatestEvent.java on win-x64
  • 54f5ffe: 8259338: Add expiry exception for identrustdstx3 alias to VerifyCACerts.java test
  • 2c7e47e: 8268774: Residual logging output written to STDOUT, not STDERR
  • 8ea0606: 8268714: [macos-aarch64] 7 java/net/httpclient/websocket tests failed
  • ... and 21 more: https://git.openjdk.java.net/jdk17/compare/c088d093e2e73fd0739d9e96f9f5ea67a01ae06c...master

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 label Jun 16, 2021
Copy link
Member

@erikj79 erikj79 left a comment

Build changes look good.

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Hi Jorn,

Seems okay but I have one query below.

Thanks,
David

src/hotspot/share/runtime/frame.inline.hpp Outdated Show resolved Hide resolved
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 17, 2021

Mailing list message from David Holmes on build-dev:

Hi Jorn,

On 17/06/2021 9:28 pm, Jorn Vernee wrote:

On Thu, 17 Jun 2021 00:23:19 GMT, David Holmes <dholmes at openjdk.org> wrote:

Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:

Add comment about optimized entry frames only being generated on x86_64

src/hotspot/share/runtime/frame.inline.hpp line 54:

52: inline bool frame::is_first_frame() const {
53: return (is_entry_frame() && entry_frame_is_first())
54: || (is_optimized_entry_frame() && optimized_entry_frame_is_first());

Given `optimized_entry_frame_is_first` is only defined on a couple of platforms, it is far from obvious that this call can never happen on the other platforms. A comment explaining this would be useful.

Thanks, I've added the following comment:

```C++
inline bool frame::is_first_frame() const {
return (is_entry_frame() && entry_frame_is_first())
// optimized_entry_frame_is_first is currently only implemented on x86_64.
// This is okay since optimized entry frames are only generated on x86_64
// as well (see ProgrammableUpcallHandler::generate_optimized_upcall_stub
// in universalUpcallHandler_x86_64.cpp), so is_optimized_entry_frame will
// always return false on platforms where optimized_entry_frame_is_first
// is not implemented.
|| (is_optimized_entry_frame() && optimized_entry_frame_is_first());
}

Now that you have explained it I think a much simpler comment will
suffice :)

return (is_entry_frame() && entry_frame_is_first()) ||
// Optimized entry frames are only present on certain platforms
(is_optimized_entry_frame() && optimized_entry_frame_is_first());

Cheers,
David

@JornVernee
Copy link
Member Author

@JornVernee JornVernee commented Jun 17, 2021

Now that you have explained it I think a much simpler comment will suffice :)

Ok, I've shortened the comment. Thanks :)

@openjdk openjdk bot removed ready rfr labels Jun 17, 2021
@openjdk openjdk bot added ready rfr labels Jun 17, 2021
@JornVernee
Copy link
Member Author

@JornVernee JornVernee commented Jun 21, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Jun 21, 2021

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

  • 22ebd19: 8268362: [REDO] C2 crash when compile negative Arrays.copyOf length after loop
  • f8df953: 8268702: JFR diagnostic commands lack argument descriptors when viewed using Platform MBean Server
  • c294ae4: 8267042: bug in monitor locking/unlocking on ARM32 C1 due to uninitialized BasicObjectLock::_displaced_header
  • b358b54: 8269063: Build failure due to VerifyReceiverTypes was not declared after JDK-8268405
  • b8f073b: 8268316: Typo in JFR jdk.Deserialization event
  • b9d7337: 8268638: semaphores of AsyncLogWriter may be broken when JVM is exiting.
  • 8caeca0: 8264775: ClhsdbFindPC still fails with java.lang.RuntimeException: 'In java stack' missing from stdout/stderr
  • 7e03cf2: 8265073: XML transformation and indentation when using xml:space
  • 60389ee: 8269025: jsig/Testjsig.java doesn't check exit code
  • dab00ee: 8266518: Refactor and expand scatter/gather tests
  • ... and 55 more: https://git.openjdk.java.net/jdk17/compare/c088d093e2e73fd0739d9e96f9f5ea67a01ae06c...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jun 21, 2021
@openjdk openjdk bot added integrated and removed ready labels Jun 21, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jun 21, 2021

@JornVernee Pushed as commit f25e719.

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

@openjdk openjdk bot removed the rfr label Jun 21, 2021
@JornVernee JornVernee deleted the Aync_Stack_Walk branch Jun 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build core-libs hotspot integrated
4 participants