Skip to content

8265148: StackWatermarkSet being updated during AsyncGetCallTrace#4217

Closed
lmesnik wants to merge 2 commits intoopenjdk:masterfrom
lmesnik:8265148
Closed

8265148: StackWatermarkSet being updated during AsyncGetCallTrace#4217
lmesnik wants to merge 2 commits intoopenjdk:masterfrom
lmesnik:8265148

Conversation

@lmesnik
Copy link
Member

@lmesnik lmesnik commented May 27, 2021


Progress

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

Issue

  • JDK-8265148: StackWatermarkSet being updated during AsyncGetCallTrace

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4217

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented May 27, 2021

👋 Welcome back lmesnik! 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
Copy link

openjdk bot commented May 27, 2021

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

  • hotspot
  • serviceability

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 serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels May 27, 2021
@lmesnik
Copy link
Member Author

lmesnik commented May 27, 2021

I verified that running sunflow with async-profiler crashed VM before the fix and finished successfully after the fix. I compared data for G1GC for older JDK before https://bugs.openjdk.java.net/browse/JDK-8253180 is implemented. The results look pretty similar.

@lmesnik lmesnik marked this pull request as ready for review May 27, 2021 20:15
@openjdk openjdk bot added the rfr Pull request is ready for review label May 27, 2021
@mlbridge
Copy link

mlbridge bot commented May 27, 2021

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Hi Leonid,

Someone familiar with Stackwatermarks will need to comment about the validity of doing this, my only comment is to document why it is being turned off.

Thanks,
David

int loop_count;
int loop_max = MaxJavaStackTraceDepth * 2;
RegisterMap map(thread, false);
RegisterMap map(thread, false, false);
Copy link
Member

Choose a reason for hiding this comment

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

Can we add some comments as to what the false parameters mean please.

RegisterMap map(thread, false /* no update */, false /*no stackwatermark frame processing */);

Though it may be that a more elaborate block comment is needed to explain why we don't want stackwatermark frame processing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me check with Erik if it makes sense to put more generic comments about the usage of stackwatermark frame processing in RegisterMap, frames etc. They can't be updated in an arbitrary thread state. It makes sense describe this info in stackwatermarking.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let me check with Erik if it makes sense to put more generic comments about the usage of stackwatermark frame processing in RegisterMap, frames etc. They can't be updated in an arbitrary thread state. It makes sense describe this info in stackwatermarking.

You could say something generic like "StackWatermark can only be used when at points where the stack can be parsed by the GC", or something like that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for your prompt response. I meant that it makes sense to update comments for RegisterMap to mention this. Currently, the doc says how to use it and how to disable update:
"Updating of the RegisterMap can be turned off by instantiating the
// register map as: RegisterMap map(thread, false);"
But it says nothing about why and how process_frames should be set.
It might make sense to put this info there so anyone could easily find and read it. I think it is better to put it there rather than in forte.cpp.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for your prompt response. I meant that it makes sense to update comments for RegisterMap to mention this. Currently, the doc says how to use it and how to disable update:

"Updating of the RegisterMap can be turned off by instantiating the

// register map as: RegisterMap map(thread, false);"

But it says nothing about why and how process_frames should be set.

It might make sense to put this info there so anyone could easily find and read it. I think it is better to put it there rather than in forte.cpp.

Yes I agree - that does make sense.

Copy link
Member

@stefank stefank 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. Could you verify the fix with ZGC? G1 doesn't use it, so testing with G1 will only show that we don't hit the failing assert anymore.

@openjdk
Copy link

openjdk bot commented May 28, 2021

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

8265148: StackWatermarkSet being updated during AsyncGetCallTrace

Reviewed-by: stefank, eosterlund

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

  • 0c0ff7f: 8265309: com/sun/jndi/dns/ConfigTests/Timeout.java fails with "Address already in use" BindException
  • 24bf35f: 8265367: [macos-aarch64] 3 java/net/httpclient/websocket tests fail with "IOException: No buffer space available"
  • 1413f9e: 8241423: NUMA APIs fail to work in dockers due to dependent syscalls are disabled by default
  • 1d2c7ac: 8267555: Fix class file version during redefinition after 8238048
  • 97ec5ad: 8265753: Remove manual JavaThread transitions to blocked
  • 6eb9114: 8266877: Missing local debug information when debugging JEP-330
  • 0c9daa7: 8265029: Preserve SIZED characteristics on slice operations (skip, limit)
  • 95b1fa7: 8267529: StringJoiner can create a String that breaks String::equals
  • 7f52c50: 8182043: Access to Windows Large Icons
  • 8a31c07: 8267886: ProblemList javax/management/remote/mandatory/connection/RMIConnector_NPETest.java
  • ... and 14 more: https://git.openjdk.java.net/jdk/compare/6ffa3e66db55774673ce17be4f8f2d510abf8a84...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 Pull request is ready to be integrated label May 28, 2021
Copy link
Contributor

@fisk fisk 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, but please test with ZGC before integrating.

@lmesnik
Copy link
Member Author

lmesnik commented Jun 1, 2021

I verified that async-profiles works with ZGC and data look reasonable.

@lmesnik
Copy link
Member Author

lmesnik commented Jun 1, 2021

/integrate

@openjdk openjdk bot closed this Jun 1, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 1, 2021
@openjdk
Copy link

openjdk bot commented Jun 1, 2021

@lmesnik Since your change was applied there have been 56 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit 2b33835.

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

@lmesnik lmesnik deleted the 8265148 branch June 26, 2021 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

4 participants