[crac] Integrated: Wake up all TIMED_WAITING threads after restore

Radim Vansa rvansa at openjdk.org
Fri Jun 30 15:38:28 UTC 2023

On Mon, 19 Jun 2023 14:46:35 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

> This is a fix for an issue found by @jankratochvil when testing #53: Threads that enter sleep or timed parking use absolute monotonic time for pthread_cond_timedwait(). When the monotonic time changes during C/R we need to wake all threads to readjust the timeout to the new absolute time.
> This introduces effectively a spurious wakeup; this is permitted for all the uses of pthread_cond_timedwait. Implementation either handles that transparently or propagates the wakeup to Java.
> This commit does not handle timed waiting in non-Java threads other than WatcherThread.

This pull request has now been integrated.

Changeset: 7d3e7bfe
Author:    Radim Vansa <rvansa at openjdk.org>
URL:       https://git.openjdk.org/crac/commit/7d3e7bfe63ed07f533923805e0bfccbb20325348
Stats:     249 lines in 4 files changed: 249 ins; 0 del; 0 mod

Wake up all TIMED_WAITING threads after restore

Reviewed-by: akozlov


PR: https://git.openjdk.org/crac/pull/85

More information about the crac-dev mailing list