8243455: Many SA tests can fail due to trying to get the stack trace of an active method #2700
On 4/03/2021 6:09 am, Chris Plummer wrote:
Doesn't jstack force all threads to be walkable via a safepoint or
Nope. If it did it couldn't debug core files or a hung process. That's why SA has so much code to safe guard against walking off the deep end when doing things like stack walking and heap scanning.
BTW, you might be thinking of the Attach API version of
@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:
At the time when this comment was updated there had been 213 new commits pushed to the
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
It is better to rename
It is better to remove the second sleep as it is not really needed.
Another concern is that the stack trace of this thread is going to be trivial, not sure if it is useful.
I'll fix that.
You were looking at the first version. It was updated last night.
It's no less trivial than the main thread that tests used to look for, except that previously once in a great while the thread woke up from sleep (and that usually resulted in a test failure because the stack trace could not be produced). However, I also have a PR 2720 to add a stack trace stress test.
@plummercj Since your change was applied there have been 260 commits pushed to the
Your commit was automatically rebased without conflicts.
Pushed as commit 43524cc.
💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.