RFR: 8340401: DcmdMBeanPermissionsTest.java and SystemDumpMapTest.java fail with assert(_stack_base != nullptr) failed: Sanity check [v2]
Thomas Stüfe
thomas.stuefe at gmail.com
Fri Sep 20 10:56:25 UTC 2024
On Fri, Sep 20, 2024 at 12:44 PM David Holmes <dholmes at openjdk.org> wrote:
> On Fri, 20 Sep 2024 08:05:20 GMT, Simon Tooke <stooke at openjdk.org> wrote:
>
> >> I would prefer it here, or in HANDLE_THREAD macro, to make sure we do
> this for all threads printed.
> >
> > I will put it in HANDLE_THREAD to cover the other tests.
>
> It is not needed for the other tests - those threads can't be new.
>
> This is an issue with using the JavaThread iterator so should be visibly
> seen in the itertation loop IMO.
>
>
I don't think this is limited to JavaThread
Eg in G1:
- parent thread calls WorkerThreads::set_active_workers
- WorkerThreads::set_active_workers creates thread (A), starts thread (B),
sets them into the workers array (C)
- from point (C) on they are observable and WorkerThreads::threads_do will
iterate them
- Child thread starts running at (B), but I don't see any way to guarantee
that initialization is finished before another thread can observe it via
WorkerThreads::threads_do.
Admittedly, this is improbable. But why risk it? We don't lose anything by
just testing printing for every thread.
-------------
>
> PR Review Comment:
> https://git.openjdk.org/jdk/pull/21091#discussion_r1768387573
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-runtime-dev/attachments/20240920/cf7d4dbc/attachment.htm>
More information about the hotspot-runtime-dev
mailing list