2021-06-04 Gitaly file-10 version incompatibility
Current Status
File-10 had a mismatching Gitaly version for nearly ~1 hour following a deployment at ~09:15
, up until a manual hup was performed at 10:36
on the gitaly process. Root cause was determined to be
(from #4810 (comment 594199138)):
Gitaly has a sidecar to perform git operations with libgit2. These are mostly merges and simple object writes to the repository. These happen in C, and there might be memory leaks in that code. To prevent impact for production systems these were put into a sidecar, so for a merge we shell out, perform the merge, and have the OS reclaim memory.
Now what happened is that we leverage encoding/gob to send the required data to the sidecar. This protocol is unstable between revisions it appears. For better go.mod compliance we moved the import paths to include the next version:
v14
. Now on a deploy the binaries are replaced before the daemon is hupped. The interface is not compatible during that time.
A binary dependency was moved on disk while the Gitaly process was still running during deployment. Normally, files are not moved which allows Gitaly to operate while files are updated during upgrade. Due to this condition, there was errors across the entire Gitaly fleet until a HUP is issued after the package install. Errors persisted on file-10
due to a HUP failure.
There are additional discussions in gitlab-org/gitaly#3647 (comment 595114082) on how to prevent this scenario moving forward, and how to avoid downtime for self-managed customers when this change goes into an official release.
Investigation into why file-10
was not HUPd will take place in delivery#1810 (closed)
Timeline
View recent production deployment and configuration events (internal only)
All times UTC.
2021-06-04
-
08:39
- Gitaly deploy begins https://ops.gitlab.net/gitlab-com/gl-infra/deployer/-/jobs/4023581 -
08:53
- errors start increasing on Gitaly during deployment -
09:16
- most errors resolve, except forfile-10
which continued to error -
09:19
- Gitaly deploy finishes -
10:20
- @rehab declares incident in Slack. -
10:36
- performing ahup
onfile-10
fixed the version.
https://log.gprd.gitlab.net/goto/3cf16214e21acf4e860c14bb6116fe90
Corrective Actions
Corrective actions should be put here as soon as an incident is mitigated, ensure that all corrective actions mentioned in the notes below are included.
Note: In some cases we need to redact information from public view. We only do this in a limited number of documented cases. This might include the summary, timeline or any other bits of information, laid out in out handbook page. Any of this confidential data will be in a linked issue, only visible internally. By default, all information we can share, will be public, in accordance to our transparency value.
Click to expand or collapse the Incident Review section.
Incident Review
Summary
- Service(s) affected:
- Team attribution:
- Time to detection:
- Minutes downtime or degradation:
Metrics
Customer Impact
-
Who was impacted by this incident? (i.e. external customers, internal customers)
- ...
-
What was the customer experience during the incident? (i.e. preventing them from doing X, incorrect display of Y, ...)
- ...
-
How many customers were affected?
- ...
-
If a precise customer impact number is unknown, what is the estimated impact (number and ratio of failed requests, amount of traffic drop, ...)?
- ...
What were the root causes?
- ...
Incident Response Analysis
-
How was the incident detected?
- ...
-
How could detection time be improved?
- ...
-
How was the root cause diagnosed?
- ...
-
How could time to diagnosis be improved?
- ...
-
How did we reach the point where we knew how to mitigate the impact?
- ...
-
How could time to mitigation be improved?
- ...
-
What went well?
- ...
Post Incident Analysis
-
Did we have other events in the past with the same root cause?
- ...
-
Do we have existing backlog items that would've prevented or greatly reduced the impact of this incident?
- ...
-
Was this incident triggered by a change (deployment of code or change to infrastructure)? If yes, link the issue.
- ...
Lessons Learned
- ...
Guidelines
Resources
- If the Situation Zoom room was utilised, recording will be automatically uploaded to Incident room Google Drive folder (private)