-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Liveness: Replicas crash on receiving Command.reply
messages
#9
Comments
Ignoring diff --git a/src/vsr/replica.zig b/src/vsr/replica.zig
index b3d4b42..33fa0c4 100644
--- a/src/vsr/replica.zig
+++ b/src/vsr/replica.zig
@@ -456,6 +456,7 @@ pub fn Replica(
.request_headers => self.on_request_headers(message),
.headers => self.on_headers(message),
.nack_prepare => self.on_nack_prepare(message),
+ .reply => log.debug("got a mis-routed reply message, ignoring", .{}),
else => unreachable,
} |
Command.reply
messagesCommand.reply
messages
We now also ignore unexpected commands in the Replica's on_message() handler as we were doing for the Client. Reported-by: @ThreeFx Refs: tigerbeetle/viewstamped-replication-made-famous#9
Congrats @ThreeFx on finding hopefully the last of the misdirected packets! Loving the quality of your reports, and enjoying the track recommendations. Keep it coming! Just pushed a fix to use an exhaustive switch which would have caught this at compile time instead of at runtime. Please would you verify that the fix doesn't introduce any further issues? We have decided to award a $400 liveness bounty. |
It seems to work fine now, both this seed and a handful of random seeds (using |
Description and Impact
A replica receiving a
Command.reply
triggers an unreachable statement and crashes the replica. Replicas must be able to deal with this according to the "messages may be misrouted" specification in the network fault description.Steps to Reproduce the Bug
./vopr.sh 2669933095950905174
Suggested Fix
Either explicitly ignore
.reply
commands or ignore all unknown messages inon_message
.The Story Behind the Bug
Misdelivering packets was the next thing on my todo-list :) I was surprised that I triggered a bug this quickly.
Songs Enjoyed During the Production of This Issue
Liquicity Yearmix 2020
Another recommendation: "EYE HAVE YOU" from Maretu. Sounds like it could be from Undertale/an Undertale mashup.
Literature
No response
The Last Word
No response
The text was updated successfully, but these errors were encountered: