[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Integrated: 8330303: Crash: assert(_target_jt == nullptr || _target_jt->vthread() == target_h()) fai
From:       Serguei Spitsyn <sspitsyn () openjdk ! org>
Date:       2024-04-24 11:46:34
Message-ID: JyOdA_L_OAkfNaoEOvTSJ82XogF2n6JwNHbbzm7XHZE=.2249f6eb-69d1-49db-9c3e-32b7265ff455 () github ! com
[Download RAW message or body]

On Wed, 17 Apr 2024 00:29:52 GMT, Serguei Spitsyn <sspitsyn@openjdk.org> wrote:

> This is a simple fix of three similar asserts.
> The `_target_jt->jvmti_vthread()` has to be used instead of \
> `_target_jt->vthread()`.  The `_target_jt->vthread()` can be outdated in some \
> specific contexts as shown in the `hs_err` stack trace. 
> I've seen similar issue and already fixed it in this fragment of code:
> 
> class GetCurrentLocationClosure : public JvmtiUnitedHandshakeClosure {
> . . .
> void do_vthread(Handle target_h) {
> assert(_target_jt == nullptr || !_target_jt->is_exiting(), "sanity check");
> // use jvmti_vthread() as vthread() can be outdated
> assert(_target_jt == nullptr || _target_jt->jvmti_vthread() == target_h(), "sanity \
>                 check");
> . . .
> 
> The issue above was fixed by replacing `_target_jt->vthread()` with \
> `_target_jt->jvmti_vthread()`. 
> There are three places which need to be fixed the same way:
> - `GetSingleStackTraceClosure::do_vthread(Handle target_h)`
> - `SetForceEarlyReturn::do_vthread(Handle target_h)`
> - `UpdateForPopTopFrameClosure::do_vthread(Handle target_h)`
> 
> Testing:
> - Run mach5 tiers 1-6

This pull request has now been integrated.

Changeset: 15190816
Author:    Serguei Spitsyn <sspitsyn@openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/15190816f704f2e8681bc3e2d74832828a574106
                
Stats:     11 lines in 3 files changed: 7 ins; 0 del; 4 mod

8330303: Crash: assert(_target_jt == nullptr || _target_jt->vthread() == target_h()) \
failed

Reviewed-by: pchilanomate, cjplummer, lmesnik

-------------

PR: https://git.openjdk.org/jdk/pull/18806


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic