frequent 400 BAD REQUESTS in the GCP balrogworkers
Categories
(Release Engineering :: Release Automation, defect)
Tracking
(Not tracked)
People
(Reporter: mtabara, Unassigned)
References
Details
(Whiteboard: [releaseduty])
Attachments
(3 files)
We started seeing this on central and then on beta too, ever since we switched to GCP balrogworkers in the past two weeks.
See some of these samples on beta here.
Recent changes in Balrog included:
- add more beefy resources handling uwsgi on server side to avoid getting the 502 gateway errors
- sleep less between retries (from bug 1579067)
- increase the number of balrogworkers to 40 (up from 10 which we used to have on AWS)
Given that jitter is not too big and the sleep time dropped significantly, combined with the fact that we have way more workers talking to Balrog all at once, I suspect the number of race conditions (which are normal in a balrog job, hence the generous number of retries that we've always had on these) skyrocketed. We need to understand where the culprit is:
a) we either reduce the number of workers to 25-30 or so
b) we sleep a bit more in between retries in balrogworkers
c) we bump the jitter to help with b)
d) something else?
Comment 1•6 years ago
|
||
What problems are they causing? The 400s are expected to some degree with the current architecture of Balrog submissions.
| Reporter | ||
Comment 2•6 years ago
|
||
(In reply to bhearsum@mozilla.com (:bhearsum) from comment #1)
What problems are they causing? The 400s are expected to some degree with the current architecture of Balrog submissions.
They are retrying until exhaustion causing the jobs to be red, triggering Sheriffs to rerun and escalate to RelEng.
| Reporter | ||
Comment 3•6 years ago
|
||
Sheriffs pinging us a lot about nightlies failing the same way https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&selectedJob=273247938&resultStatus=testfailed%2Cbusted%2Cexception&searchStr=c-up&fromchange=91756881b7abd409a7350d6880118f0141427b66
| Reporter | ||
Comment 10•6 years ago
|
||
Met with Ben today to talk about this. Conclusions are as follow:
- Hard to get this solution right, rather than empirically, as there are lots of variables in the equiation (level of business of the balrog server at that time of submission, number of workers, number of jobs, etc)
- In a given release, we see about 10-12 locales per platform maybe. The sleep time is is computed based on sleeptime, jitter and sleepscale (being capped at 30seconds) for now, and it varies from 10-30 seconds. Within this configuration, among 40 existing GCP workers, we're hitting this in less than 2% of the jobs which isn't that bad. Sure, depends on Balrog server business, but we can make some adjustments right away:
a) we can double the number of attempts. Currently set to 10, we're bumping that to 20.
b) if above doesn't work, we can increase the jitter so that we get them out of sync even more, in the hope of preventing these.
c) worst-case scenario, we can downgrade the number of GCP pods but this is our last resort, for emergencies only.
The long-term fix is to change the way we do the blob upload mechanism in Balrog. Likely we'll see some activity around that in 2020/H1.
On the same page though, Ben thinks we may still have a bug in Balrog so he added more logging server-side to try to catch more data.
For now, we'll proceed with a) and wait to see what's going on.
Sheriffs agreed to help us track all future intermittents against this bug. Thanks again for that!
| Reporter | ||
Comment 11•6 years ago
|
||
| Reporter | ||
Comment 12•6 years ago
|
||
We landed the fix in GCP workers. I asked the Sheriffs to pin the potential new intermittent failures against this bug, going further to better track these issues.
| Reporter | ||
Comment 13•6 years ago
|
||
Seems like the fix is working so far on nightlies \o/
Leaving this open until beta6 paves its way to the door, before declaring victoryt and potentially bumping balrogworkers pools.
| Reporter | ||
Comment 14•6 years ago
|
||
Not a single balrog failure since we deployed this, that's good.
Naturally, we're going to be greedy now and bump from 40 workers to 60 workers to withhold the future load.
Tracking that in bug 1591994.
| Comment hidden (Intermittent Failures Robot) |
Comment 16•6 years ago
|
||
@mtabara - not sure if it's related:
"we should have another look at balrog workers in GCP - https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta&revision=271f87528b864c091e90fee8f4cc8cbcdb36cef9&searchStr=c-Up"
"to clarify my last comment - there’s a lot of blue jobs there, and ones which ended in a -9 which might be OOm"
we are unblocked. Seems intermittent which reminded me of this bug.
Comment 17•6 years ago
|
||
~4 so far today
e.g. https://firefoxci.taskcluster-artifacts.net/HcjPO_uMTmCk3CAyuMjzPg/0/public/logs/live_backing.log
| Reporter | ||
Comment 18•6 years ago
|
||
See bug 1594720 for more details. We're seeing different issues than this.
| Comment hidden (Intermittent Failures Robot) |
Comment 20•6 years ago
|
||
Comment 21•6 years ago
|
||
@mtabara proof it happened last week: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=275686131&repo=mozilla-beta&lineNumber=49
4 replies
jlund 19 minutes ago
some of these have the same log here, most have less. see comment 16
jlund 18 minutes ago
https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta&revision=271f87528b864c091e90fee8f4cc8cbcdb36cef9&searchStr=c-Up
jlund 18 minutes ago
https://firefoxci.taskcluster-artifacts.net/Hx0gxWw5Qzaf11KNz304DQ/4/public/logs/live_backing.log
jlund 17 minutes ago
https://firefoxci.taskcluster-artifacts.net/fr_YxAinS9irZW6JLskyxA/0/public/logs/live_backing.log
| Reporter | ||
Comment 22•6 years ago
|
||
| Reporter | ||
Comment 23•6 years ago
|
||
| Reporter | ||
Comment 24•6 years ago
|
||
If this fails again, we should really look into using https://docs.python.org/3/library/tracemalloc.html to trace those memory allocations.
| Reporter | ||
Comment 26•6 years ago
|
||
(In reply to Alexandru Michis [:malexandru] from comment #25)
Hm, the 400 are expected to some extent. It exhausted all 10 atttempts and then failed because of that. It's different than what we had the last couple of days when the memory allocation was causing the worker to die.
:bhearsum - it's been a while since we had 10 attempts, given that I've reduced the no of workers to 25 as well - so less chances of concurency - is there anything that stands out when glancing at this log?
Comment 27•6 years ago
|
||
(In reply to Mihai Tabara [:mtabara]⌚️GMT from comment #26)
(In reply to Alexandru Michis [:malexandru] from comment #25)
Hm, the 400 are expected to some extent. It exhausted all 10 atttempts and then failed because of that. It's different than what we had the last couple of days when the memory allocation was causing the worker to die.
:bhearsum - it's been a while since we had 10 attempts, given that I've reduced the no of workers to 25 as well - so less chances of concurency - is there anything that stands out when glancing at this log?
Looks like the usual to me. The server logs might be more revealing, but I don't have time to go through them at the moment. I'll try to dig into that later this week or next.
| Reporter | ||
Comment 29•6 years ago
|
||
(In reply to Alexandru Michis [:malexandru] from comment #28)
Can we reopen this in the meantime?
Sure.
| Reporter | ||
Comment 30•6 years ago
|
||
It'd be good to track these 400 over the next weeks to see where we are. Thanks for raising this!
Updated•6 years ago
|
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Reporter | ||
Comment 37•6 years ago
|
||
I'm not actively working on this. We're going to change the way we do blob uploads in Balrog in 2020 so likely this bug will be outlived at some point. However, it's still useful to Sheriffs to track how many 400 BAD REQUEST they're still seeing in our infrastructure. For that reason, let's leave this open.
| Comment hidden (Intermittent Failures Robot) |
| Reporter | ||
Comment 39•6 years ago
|
||
Number of balrogworkers has been downgraded to 15 so we should stop seeing even these BAD REQUESTs coming in the following weeks/months. The real fix is underway in H1 where we'll likely replace the blob upload gear altogether.
| Comment hidden (Intermittent Failures Robot) |
Comment 41•5 years ago
|
||
This is mostly fixed now. We've rolled out a new API for balrog releases to nightly, so we should see none of these errors there anymore.
It will ride to beta/release with 83.0, and we should backport to esr78 as well. Once we're using it everywhere, we should crank up the pool size again.
| Reporter | ||
Updated•4 years ago
|
Updated•1 year ago
|
Description
•