Incident Library
Applied filters Root causeSoftware defectOrganisationGitHubClear allEvery case under the filters, with no sentence; newest first.
Suggested filters Search, and the values found in your words appear here.

Graph

  • Root cause
  • Component
  • Symptom
  • Contributing factor
  • Case

Cases4 cases

1 to 4 of 4

  1. 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
  2. Symptoms

    On Thursday 24 January 2013 GitHub's exception tracking and monitoring systems detected a large spike in exceptions. Most of them were timeouts in code search queries and in the background jobs that update the code search indexes with data from new pushes, and the outage of the newly launched Code Search lasted into Friday 25 January.

    Trigger

    On 17 January GitHub upgraded the code search cluster from Elasticsearch 0.19.9 to 0.20.2 before launching Code Search publicly; the outage began on 24 January, after the public launch.

    Root cause
    Component
    Contributing factor
    Detection

    GitHub's exception tracking and monitoring systems detected a large spike in exceptions, mostly timeouts from code search queries and from the indexing background jobs.

    Remediation
    • Stopped the whole cluster and brought it back in maintenance mode, with shard allocation and rebalancing disabled
    • Brought in engineers from elasticsearch, the company, to review the cluster and its unallocatable shards
    • Upgraded Java and Elasticsearch and applied the recommended configuration through a Puppet topic branch and environment
    Action items
    • Provision a staging environment for the code search cluster to test infrastructure changes
    • Have the elasticsearch team audit the code search cluster configuration again in future
    Lessons

    The Elasticsearch upgrade was not tested enough on GitHub's infrastructure before it reached the code search cluster, partly because the cluster had no proper staging environment. For large clusters the elasticsearch team recommended equal minimum and maximum JVM heap through ES_HEAP_SIZE, at 50% of system RAM, starting recovery immediately instead of after recover_after_time, and configuring minimum_master_nodes so that paused nodes do not form their own clusters.

  3. Symptoms

    On Friday, 30 November 2012, GitHub had sporadic bursts of slow responses and intermittent errors for the whole day and was completely unavailable for 18 minutes. One fileserver pair was offline for a large part of the day, which affected a small percentage of repositories; this was a side effect of the network problems on the high-availability clustering between the fileserver nodes.

    Trigger

    On the morning of 30 November GitHub moved the A switches in its server cabinets onto the new aggregation switches, the second half of a migration whose B-switch half had been done the day before.

    Root cause
    Component
    Contributing factor
    Detection

    Engineers saw the problems during the maintenance itself: connectivity to the B switch was lost as the last A switch was connected, and afterwards performance stayed low and the links between access and aggregation switches showed as completely saturated.

    Remediation
    • Fixed the bridge-loop problem and returned the affected B switch to service
    • Removed the partial link failure detection setting from the access switches
    • Escalated to the network vendor, which raised the case to its highest severity level
    • Restarted core processes on the aggregation switches in a Saturday 0600 Pacific maintenance window so they learned MAC addresses again
    Action items
    • Deploy the vendor's software update that fixes the MAC learning issue to the switches
    • Closely monitor aggregation-to-access capacity and keep a workaround process ready if the problem returns
    • Build a duplicate of the network stack, from the routers through the access switches, as a staging environment for testing such changes
    • Add automated network monitoring that alerts sooner on similar issues
    • Run scheduled incident response exercises with scenarios that counter tunnel vision
    • Contact the network vendor's support at the first sign of trouble in the network
    Lessons

    GitHub had designed the maintenance to have no impact on customers and clearly failed, so it plans to invest in a staging copy of its network to test such changes and catch bugs like this one. During the response the team fixated for a long time on a bridge loop, which kept it from considering other causes. GitHub had a very positive experience with the vendor's support staff, so it will contact that support team at the first sign of network trouble.

  4. 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.

Check your cluster for this

These 4 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