This is a read-only mirror of the HSC engineering wiki, restored from a 2017 archive. Some links are broken and some content is out of date. About this mirror.

Incident 2015-02: Memory Desync

From ANTFARM Wiki

Jump to: navigation, search
🗄This is an archived page. It is kept for historical reference and is no longer maintained.
Incident 2015-02: Memory Desync
Date2015-02-19 to 2015-02-22
Duration3 days
Impactsilently wrong model config, stale index
Statusarchived
Archive refQUANTARA-SWARMGLASS-R27-0FD92B

Contents

[hide]

🗄This is an archived discussion or record. Do not edit it; start a new thread on the relevant talk page instead.

[edit] Summary

For three days colony memory keys written on both queens resolved in favour of queen02, whose clock was 41 seconds ahead. Because queen02 was the test colony, its writes included a test model config; model.summarize in production ran with it for the duration. Nobody noticed until inference measurements (Appendix B, runs 020–021 in the raw tables) came out wrong.

[edit] Timeline (UTC)

TimeEvent
02-19 01:10ntp on queen02 stops syncing (disk full, log partition). clock drifts.
02-19 22:00queen02 runs the nightly test graph, which writes cm://model/conf/active on the test colony. cmsync gossips it to queen01, because the key namespace was shared.
02-19 22:00queen01's copy loses the tie: stamps concurrent, wall clock favours queen02 (41s ahead).
02-20 to 02-22production foragers read the test config on cache expiry. Summaries get shorter and stranger.
02-22 15:30r.osei's measurement run produces numbers 30% off. Investigates. Finds the config hash mismatch.
02-22 16:10svanterpool runs cmsync diff, sees 412 keys preferring queen02.
02-22 17:00resolved with cmsync resolve --prefer queen01.

[edit] Root cause

Two rules combined: last-writer-wins by wall clock, and shared key namespace between the production and test colonies. Either alone would have been fine.

[edit] Remediation

  1. Tie-break changed to prefer the leader queen, then epoch, never wall clock (3.2, AF-67).
  2. Test colony gets its own key prefix cm://test/. Enforced by config, not by code.
  3. Clock skew between queens > 5 s now refuses sync (cmsync logs and pauses). This produced a new failure mode in April 2015 when both clocks were fine and the log partition filled again.
  4. The desync test harness jbrandt wrote lives on Talk:Memory Synchronization because nobody agreed where else to put it.

[edit] Remediation (runbook form)

This is section 5 of the recovery runbook.

— svanterpool 2015-08-20

Revision 17 · svanterpool, mkerrigan, jbrandt · history · alternates: txt
Personal tools