jdk
jdk copied to clipboard
8313235: TestClhsdbJstackLock.java failed with '^\s+- waiting to lock <0x[0-9a-f]+> \(a java\.lang\.Class for LingeredAppWithLock\)$' missing from stdout/stderr
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
- [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] 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
- Kevin Walls (@kevinjwalls - Reviewer)
- Serguei Spitsyn (@sspitsyn - Reviewer)
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