Cases2 cases
1 to 2 of 2
IL-0385GitHub MySQL read replicas hit a semaphore deadlock during a schema migration's table rename and kept crash-recoveringGitHub2021- Symptoms
On 27 November 2021 at 20:40 UTC, a significant part of GitHub's MySQL read replicas entered a semaphore deadlock while a schema migration on a large MySQL table ran its final step, the rename that moves the updated table into place. Core GitHub services, including GitHub Actions, API Requests, Codespaces, Git Operations, Issues, GitHub Packages, GitHub Pages, Pull Requests and Webhooks, became degraded.
- Trigger
The final rename step of a schema migration on a large MySQL table. Schema migrations are a common task at GitHub and often take weeks to complete.
- Root cause
- Component
- Contributing factor
- Remediation
- Promoted every healthy internal replica into the production path to add read capacity
- Removed production traffic from the broken replicas until each had processed the table rename
- Moved the recovered replicas back into production to restore capacity
- Action items
- Continue functional partitioning so migrations can run in canary mode on a single shard
- Update internal procedures to increase how much each cluster is over-provisioned
- Pause schema migrations until it is known how to safeguard against this failure
- Keep investigating the specific failure scenario
- Test the migration tooling and classify ways to improve it for this kind of scenario
IL-0303GitHub's MySQL master failed over to a node with a cold buffer pool during a schema migration and GitHub.com went downGitHub2012- Symptoms
On Monday, September 10th, 2012, during a schema migration, the health checks on GitHub's MySQL master failed and Percona Replication Manager moved the 'active' role to another node of the new three-node cluster. That node's InnoDB buffer pool was cold and it performed poorly, its health checks failed in turn, and the role failed back to the original server. GitHub.com went down.
- Trigger
A schema migration on Monday, September 10th put more load on the master database than earlier migrations had, and Percona Replication Manager's health checks on the master failed.
- Root cause
- Component
- Contributing factor
- Detection
On the morning of September 11th, a developer told the operations team that the 'standby' node was returning incorrect query results.
- Remediation
- Enabled Pacemaker's maintenance-mode so no health checks or automatic failovers ran, and let the buffer pool warm
- Powered off the out-of-date node 'c' to end the partition
- Stopped Pacemaker and Heartbeat on nodes 'a' and 'b' and started them on node 'a' only
- Started MySQL on node 'a' in the active role
- Removed the events leaked to wrong dashboards and audited the wrongly routed repositories
- Contacted the owners of the exposed private repositories
- Action items
- Change the Pacemaker configuration so the active database role fails over only when an operations engineer starts it
- Find a way to warm the InnoDB buffer pool of slave databases so failovers do not hurt performance
- Audit the Pacemaker and Heartbeat stack, focusing on the code path behind the segfault
- Run hardware tests on the server where the segfault happened
- Lessons
GitHub concluded that automated failover is not the right strategy for its primary production database: for every failover in this incident, any member of the operations team would have said it should not happen. Failovers that must happen, in an emergency or during maintenance, should not hurt performance.
These 2 cases involve Database and Database replication. kubegap audits a Kubernetes cluster for gaps like these, read-only, from Claude Code or Codex; its checks cite public reports like the ones in this library.
By root cause1
Software defect2 cases
- Contributing factor
- Organisation