RFR: 8345970: pthread_getcpuclockid related crashes in shenandoah tests [v4]

William Kemper wkemper at openjdk.org
Thu Dec 12 23:42:10 UTC 2024


On Thu, 12 Dec 2024 17:28:23 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> Right now the disenroll is done a tad late, since the task is disenrolled in the task's destructor which doesn't happen until the heap is destructed. I think at least the disenroll should be done before we start shutting down GC worker threads etc.
>
> Good catch!

It wasn't actually the periodic task causing the crash (though that issue has been fixed here as well). The crash was caused by the control thread trying to `ShenandoahHeap::do_gc_threads` which included the regulator thread that had already been stopped by `ShenandoahHeap::stop`. The fix here was to stop the control thread before stopping the regulator thread, thereby preventing the control thread from trying to access stopped threads.

This was fairly easy to reproduce (and verify) once I had an Alpine Linux environment set up.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22693#discussion_r1883032058


More information about the shenandoah-dev mailing list