Skip to content

Conversation

@wks
Copy link
Collaborator

@wks wks commented Feb 16, 2023

This PR fixes two race conditions.

  1. If a GC worker spuriously wakes up after the Finish coordinator message is sent, the coordinator may deactivate work packets while the GC worker is trying to schedule sentinels or open new buckets.

  2. If Plan::schedule_collection runs too slowly due to OS scheduling, workers may open subsequent work buckets while Plan::schedule_collection still has pending packets to be added in prior buckets.

Fixes: #758

wks added 3 commits February 16, 2023 13:59
If a worker spuriously wakes up while the coordinator closes all
buckets, it may read inconsistent states.
@wks wks requested a review from qinsoon February 16, 2023 07:12
@qinsoon qinsoon added the PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead) label Feb 16, 2023
Copy link
Member

@qinsoon qinsoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

wks and others added 2 commits February 17, 2023 11:31
Added methods to initiate and execute coordinator work packets.  This
will unify the handling of all coordinator work.
@qinsoon qinsoon removed the PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead) label Feb 22, 2023
@qinsoon qinsoon merged commit 9824cee into mmtk:master Feb 22, 2023
wenyuzhao added a commit to wenyuzhao/mmtk-core that referenced this pull request Mar 7, 2023
wenyuzhao pushed a commit to wenyuzhao/mmtk-core that referenced this pull request Mar 20, 2023
This PR fixes two race conditions.

1.  If a GC worker spuriously wakes up after the `Finish` coordinator message is sent, the coordinator may deactivate work packets while the GC worker is trying to schedule sentinels or open new buckets.

2.  If `Plan::schedule_collection` runs too slowly due to OS scheduling, workers may open subsequent work buckets while `Plan::schedule_collection` still has pending packets to be added in prior buckets.

Fixes: mmtk#758
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attempted to schedule sentinel work while bucket is not open

2 participants