2022-05-25: Gitaly is leaking git-cat-file processes
Incident Roles
The DRI for this incident is the incident issue assignee, see roles and responsibilities.
Roles when the incident was declared:
- Incident Manager (IMOC): @kwanyangu, @wortschi
- Engineer on-call (EOC): @anganga, @steveazz
Current Status
Gitaly is leaking git-cat-file(1) processes which aren't getting cleaned up as expected. This leads to hundreds of Git processes sticking around until Gitaly is restarted, and each of these processes can easily consume a few gigabytes of memory. Ultimately, this may lead to resource exhaustion when too many processes have built up. This incident seems to have been ongoing for several weeks already, but was first discovered as part of #7107 (closed). Until now, we haven't seen major issues mostly because Gitaly is frequently restarted during deployments, which cleans up the Git processes.
The Gitaly issue is tracked via gitlab-org/gitaly#4253 (closed). An initial investigation surfaced a deadlock in Gitaly, which was fixed via gitlab-org/gitaly!4581 (merged). Unfortunately, this fix didn't seem to affect the leaking processes as observed in production.
More information will be added as we investigate the issue. For customers believed to be affected by this incident, please subscribe to this issue or monitor our status page for further updates.
Summary for CMOC notice / Exec summary:
- Customer Impact: Machines become increasingly more starved on resources, most importantly memory. Ultimately, this can lead to an increase an Git spawn failures and thus general increase in errors on Gitaly nodes.
- Service Impact: ServiceGitaly
- Impact Duration: unclear, has been ongoing for more than a week - end time UTC ( duration in minutes )
- Root cause: TBD
Timeline
Recent Events (available internally only):
- Deployments
- Feature Flag Changes
- Infrastructure Configurations
- GCP Events (e.g. host failure)
- Gitlab.com Latest Updates
All times UTC.
2022-05-23
-
03:40
- #7107 (closed) is declared, which is the first time this has knowingly caused problems. -
03:48
- Incident resolves because Gitaly nodes have been restarted. -
06:49
- It is discovered that we have gradual build-up of Git commands. #7107 (comment 956011382)
2022-05-24
-
01:52
- gitlab-org/gitaly!4581 (merged) is merged, which fixes a deadlock in catfile processes.
2022-05-25
-
09:47
- gitlab-org/gitaly!4581 (merged) is deployed to production. The symptoms still exist. -
10:00
- @pks-t declares incident in Slack.
Create related issues
Use the following links to create related issues to this incident if additional work needs to be completed after it is resolved:
Takeaways
- ...
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
-
Ensure that the exec summary is completed at the top of the incident issue, the timeline is updated and relevant graphs are included in the summary -
If there are any corrective action items mentioned in the notes on the incident, ensure they are listed in the "Corrective Action" section -
Fill out relevant sections below or link to the meeting review notes that cover these topics
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.
- ...
What went well?
- ...
Guidelines
Resources
- If the Situation Zoom room was utilised, recording will be automatically uploaded to Incident room Google Drive folder (private)