Skip to content

Commit

Permalink
Fix task suspension in GC for JL_TIMING (JuliaLang#52005)
Browse files Browse the repository at this point in the history
The timing system does not currently support nesting task suspensions,
so this `JL_TIMING_SUSPEND_TASK` added in JuliaLang#51489 is not permitted since
it is called from within the GC suspension.

This was causing Tracy to crash upon recording with "zone ended twice"
  • Loading branch information
topolarity authored Nov 3, 2023
1 parent b3fe970 commit 1a4a3a0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/safepoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ void jl_safepoint_wait_thread_resume(void)
// will observe the change to the safepoint, even though the other thread
// might have already observed our gc_state.
// if (!jl_atomic_load_relaxed(&ct->ptls->suspend_count)) return;
JL_TIMING_SUSPEND_TASK(USER, ct);
int8_t state = jl_atomic_load_relaxed(&ct->ptls->gc_state);
jl_atomic_store_release(&ct->ptls->gc_state, JL_GC_STATE_WAITING);
uv_mutex_lock(&ct->ptls->sleep_lock);
Expand Down

0 comments on commit 1a4a3a0

Please sign in to comment.