Repository navigation
state_exec: a coordinator acts only on its own node's control and migrate messages (CB-2) - #1186
Merged
Merged
Conversation
CB02_ControlAndMigrateReachOnlyTheirNode: a kill node-A sends to node-B must leave node-A's process with the same pid alone, and a migration from node-A to node-B must be ingested by node-B only. It fails before the next commit's fix.
…rate messages A coordinator subscribes to the whole __state_exec prefix, so on a bus that several nodes share it saw every node's control.<node> and migrate.<node> messages. handle_control posted each command to its own scheduler, so a kill meant for node-B's pid 1 also killed node-A's pid 1. handle_migrate ingested every migrate-request, the source's own request to another node included, so a migrated process ran on the source as well as the target, and every node counted every ack. Both handlers now return unless the message's path is their own node's (control.<self>, migrate.<self>). Migration to self is already refused, so nothing relied on the source ingesting its own request. Stage 0 found the bug (CB-2 in threaded-impl/S2.md, approved in S1-Q10 and S2-Q14).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A coordinator subscribes to the whole
__state_execprefix (exec_coordinator.cpp:289), so on a bus several nodes share it saw every node'scontrol.<node>andmigrate.<node>messages and acted on them:handle_controlposted every command to its own scheduler. A kill meant for node-B's pid 1 also killed node-A's pid 1, since each scheduler counts its own pids.handle_migrateingested everymigrate-request, including the source's own request to another node. A migrated process therefore ran on the source as well as the target, and every node counted every ack.Both handlers now return unless the message's path is their own node's (
control.<self>,migrate.<self>). Migration to self is already refused (MigrateToSelfFails), so nothing relied on a source ingesting its own request.Test.
TwoCoordinatorTest.CB02_ControlAndMigrateReachOnlyTheirNodeuses two coordinators on one bus, and comes first, in its own commit.Before the fix, the test failed on Windows (MSVC Release) with 2 completed migrations on each node instead of 1. With the fix,
state_exec_coordinator_testpasses 75 of 75, and CB02 passes 50 of 50.Stage 0 found this bug. It was approved in Stage 1's plan (S1-Q10) and is CB-2 in Stage 2's plan (
state-exec-perf/threaded-impl/S2.md, S2-Q14).