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

8313235: TestClhsdbJstackLock.java failed with '^\s+- waiting to lock <0x[0-9a-f]+> \(a java\.lang\.Class for LingeredAppWithLock\)$' missing from stdout/stderr #19953

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

plummercj
Copy link
Contributor

@plummercj plummercj commented Jun 28, 2024

Once the main thread has detected that the spawned thread is in the BLOCKED state, the spawned thread's LingeredAppWithLock.lockMethod() should be visible on the top of the stack, but it is not, so the "waiting to lock" message is missing from the stack trace.

I think the explanations mentioned in JDK-8335124 and JDK-8269881 apply here also. The state of the thread has moved to BLOCKED, but the thread still needs to finish making an OS call to actually become blocked and the thread become idle. During that time we may not be able to get an accurate stack trace. In this case probably SP has not been flushed, so we are not seeing the lockMethod() frame, which should appear at the top of the stack.

A short delay has been added after all threads have entered the desired state to make sure they have fully reached the desired state and are now idle.

Tested with Tier1 CI and all svc test tasks for tier2 and tier5.


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-8313235: TestClhsdbJstackLock.java failed with '^\s+- waiting to lock <0x[0-9a-f]+> (a java.lang.Class for LingeredAppWithLock)$' missing from stdout/stderr (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19953

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

Using diff file

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

Webrev

Link to Webrev Comment

@plummercj plummercj marked this pull request as ready for review June 28, 2024 22:31
@bridgekeeper
Copy link

bridgekeeper bot commented Jun 28, 2024

👋 Welcome back cjplummer! 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 Jun 28, 2024

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

8313235: TestClhsdbJstackLock.java failed with  '^\s+- waiting to lock <0x[0-9a-f]+> \(a java\.lang\.Class for LingeredAppWithLock\)$' missing from stdout/stderr

Reviewed-by: kevinw, sspitsyn, lmesnik

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

  • 21a6cf8: 8336587: failure_handler lldb command times out on macosx-aarch64 core file
  • 78cc0f9: 8336091: Fix HTML warnings in the generated HTML files
  • bcb5e69: 8335921: Fix HotSpot VM build without JVMTI
  • 10186ff: 8336300: DateFormatSymbols#getInstanceRef returns non-cached instance
  • 7ec55df: 8336638: Parallel: Remove redundant mangle in PSScavenge::invoke
  • 6df7acb: 8299080: Wrong default value of snippet lang attribute
  • 8713628: 8334217: [AIX] Misleading error messages after JDK-8320005
  • 67979eb: 8334781: JFR crash: assert(((((JfrTraceIdBits::load(klass)) & ((JfrTraceIdEpoch::this_epoch_method_and_class_bits()))) != 0))) failed: invariant
  • d41d2a7: 8334502: gtest/GTestWrapper.java fails on armhf due to LogDecorations.iso8601_utctime_test
  • 59843f4: 8336040: Missing closing anchor element in Docs.gmk
  • ... and 229 more: https://git.openjdk.org/jdk/compare/b5d589623c174757e946011495f771718318f1cc...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 changed the title 8313235 8313235: Jun 28, 2024
@openjdk
Copy link

openjdk bot commented Jun 28, 2024

@plummercj The following label will be automatically applied to this pull request:

  • serviceability

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.

@plummercj plummercj changed the title 8313235: 8313235 Jun 28, 2024
@openjdk openjdk bot changed the title 8313235 8313235: Jun 28, 2024
@plummercj plummercj changed the title 8313235: 8313235 Jun 28, 2024
@openjdk openjdk bot changed the title 8313235 8313235: Jun 28, 2024
@plummercj plummercj changed the title 8313235: 8313235: TestClhsdbJstackLock.java failed with '^\s+- waiting to lock <0x[0-9a-f]+> \(a java\.lang\.Class for LingeredAppWithLock\)$' missing from stdout/stderr Jun 28, 2024
@plummercj plummercj changed the title 8313235: TestClhsdbJstackLock.java failed with '^\s+- waiting to lock <0x[0-9a-f]+> \(a java\.lang\.Class for LingeredAppWithLock\)$' missing from stdout/stderr 8313235 Jul 1, 2024
@openjdk openjdk bot changed the title 8313235 8313235: TestClhsdbJstackLock.java failed with '^\s+- waiting to lock <0x[0-9a-f]+> \(a java\.lang\.Class for LingeredAppWithLock\)$' missing from stdout/stderr Jul 1, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 1, 2024
@mlbridge
Copy link

mlbridge bot commented Jul 1, 2024

Webrevs

Copy link
Contributor

@kevinjwalls kevinjwalls 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.

I think its more productive to make these harmless test updates than to count nanoseconds and try to reason about some of these failures.

Reading LingeredApp I notice waitAppReadyOrCrashed() is really "wait until alive, or crashed", it has no idea if LingeredApp is "ready". TestClhsdbJstackLock does not waiting, just relies on LingeredApp.startApp(), so this delay should help.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 1, 2024
Copy link
Contributor

@sspitsyn sspitsyn 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.

Copy link
Member

@lmesnik lmesnik left a comment

Choose a reason for hiding this comment

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

Although I don't like using Thread.sleep(), seems there are no any other way to fir the problem.

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 15, 2024

@plummercj 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Pull request is ready to be integrated rfr Pull request is ready for review serviceability [email protected]
4 participants