On Wed, 4 Jun 2025 08:14:11 GMT, Markus Grönlund <mgron...@openjdk.org> wrote:
>> I added another `_static_stop_signals` field which should prevent this. > > The _instance is only ever deleted in case a JFR startup attempt fails as > part of JfrRecorder::create(). The sampler must have a rate and become > enrolled to serve clients (by installing timers). The rate is set post > JfrRecorder::create() using the setting system, which implies that _instance > != nullptr should be invariant. Yes, you're right. I'll update the code and combine `_active_signal_handlers` and `_stop_signals` in one, so that a CAS loop prevents `_active_signal_handlers` from being incremented when `_stop_signals` is true. This should solve the other data race. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25302#discussion_r2125985412