You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* FIXME: Still, an extremely low chance exists that the */
STATIC int GC_restart_all(void)
{
int n_live_threads = 0;
...
if (GC_retry_signals
&& AO_load(&(p -> last_stop_count)) == GC_stop_count) {
/* The thread has been restarted. */
if (!in_resend_restart_signals) {
/* ... */
} else {
continue;
/* FIXME: Still, an extremely low chance exists that the */
/* user signal restarts the thread after the restart */
/* signal has been lost (causing sem_timedwait() to fail) */
/* while retrying, causing finally a mismatch between */
/* GC_suspend_ack_sem and n_live_threads. */
}
}
n_live_threads++;
...
The probability of this is extremely low (probably never observed in practice).
The text was updated successfully, but these errors were encountered:
I think to fix this properly we should replace n_live_threads counter with a flag in GC_thread indicating that sem_[timed]wait() should be called to "compensate" sem_post() call done in the given thread.
Source: master (02c9d85)
This is follow up of #630, #633.
As mentioned in the code
bdwgc/pthread_stop_world.c
Line 1257 in d07d2ff
The probability of this is extremely low (probably never observed in practice).
The text was updated successfully, but these errors were encountered: