<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 1, 2015 at 10:31 AM, Renato Golin <span dir="ltr"><<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Folks,<br>
<br>
David has been particularly militant with broken buildbots recently,<br>
so to make sure we don't throw the baby with the bath water, I'd like<br>
to propose some changes on how we deal with the emails on our<br>
*current* buildmaster, since there's no concrete plans to move it to<br>
anything else at the moment.<br>
<br>
The main issue is that managing the buildbots is not a simple task. It<br>
requires build owners to disable on the slave side, or specific people<br>
on the master side. The former can take as long as the owner wants<br>
(which is not nice), and the latter refreshes all active bots<br>
(triggering exceptions) and are harder to revert.<br>
<br>
We need to be pragmatic without re-writing the BuildBot product.<br>
<br>
Grab some popcorn...<br>
<br>
There are two main fronts that we need to discuss the noise: Bot and<br>
test stability.<br>
<br>
<br>
   1. Bot stability issues<br>
<br>
We need to distinguish between four classes of buildbots:<br>
<br>
  1.1. Fast && stable && green<br>
<br>
These buildbots normally finish under one hour, but most of the time<br>
under 1/2 hour and should be kept green as much as possible.<br>
Therefore, any reasonable noise </blockquote><div><br></div><div>Not sure what kind of noise you're referring to here. Flaky fast builders would be a bad thing, still - so that sort of noise should still be questioned.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">in these bots are welcomed, since we<br>
want them to go back to green as soon as possible.<br>
<br>
They're normally the front-line, and usually catch most of the silly<br>
bugs. But we need some kind of policy that allows us to revert patches<br>
that break them for more than a few hours.</blockquote><div><br></div><div>I'm not sure if we need extra policy here - but I don't mind documenting the common community behavior here to make it more clear.<br><br>Essentially: if you've provided a contributor with a way to reproduce the issue, and it seems to clearly be a valid issue, revert to green & let them look at the reproduction when they have time. We do this pretty regularly (especially outside office hours when we don't expect someone will be around to revert it themselves - but honestly, I don't see that as a requirement - if you've provided the evidence for them to investigate, revert first & they can investigate whenever they get to it, sooner or later)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> We have an agreement<br>
already, and for me that's good enough. People might think<br>
differently.<br>
<br>
With the items 2.x below taken care of, we should keep the current<br>
state of our bots for this group.<br>
<br>
  1.2. One of: Slow || Unstable || Often Red<br>
<br>
These bots are special. They're normally *very* important, but have<br>
some issues, like slow hardware, not too many available boards, or<br>
they take long times to bisect and fix the bugs.<br></blockquote><div><br></div><div>Long bisection is a function of not enough boards (producing large revision ranges for each run), generally - no? (or is there some other reason?)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These bots catch the *serious* bugs, </blockquote><div><br>Generally all bots catch serious bugs - it's just a long tail: fast easy to find bugs, then longer tests find the harder to find bugs, and so on and so forth. (until we get below the value/bug thershold where it's not worth expending the CPU cycles to find the next bug)<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">like self-hosted Clang<br>
mis-compiling a long-running test which sometimes fails. They can<br>
produce noise, but when the noise is correct, we really need to listen<br>
to it. Writing software to understand that is non-trivial.<br></blockquote><div><br></div><div>Again, not sure which kind of noise you're referring to here - it'd be helpful to clarify/disambiguate. Flaky or often-red results on slow buildbots without enough resources (long blame lists) are pretty easily ignored ("oh, it could be any of those 20 other people's patches, I'll just ignore it - someone else will do the work & tell me if it's my fault").</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So, the idea here is to have a few special treatments for each type of<br>
problem. </blockquote><div><br></div><div>But they are problems that need to be addressed, is the key - and arguably, until they are addressed, these bots should only report to the owner, not to contributors. (as above - if people generally ignore them because they're not accurate enough to believe that it's 'your' fault, then they essentially are already leaving it to the owner to do the investigation - they just have extra email they have to ignore too, let's remove the email so that we can make those we send more valuable by not getting lost in the noise)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For example, slow bots need more hardware to reduce the blame<br>
list. </blockquote><div><br></div><div>Definitely ^.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Unstable bot need more work to reduce spurious noise to a<br>
minimum (see 2.x below), and red bots *must* remain *silent* until<br>
they come back to green (see 2.x below).<br></blockquote><div><br></div><div>As I mentioned on IRC/other threads - having red bots, even if they don't send email, does come at some cost. It makes dashboards hard to read. So for those trying to get a sense of the overall state of the project (what's on fire/what needs to be investigated) this can be problematic. Having issues XFAILed (with a bug filed, or someone otherwise owning the issue until the XFAIL is removed) or reverted aggressively or having bots moved into a separate group so that there's a clear "this is the stuff we should expect to be green all the time" group that can be eyeballed quickly, is nice.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What we *don't* want is to disable or silence them after they're<br>
green. Most of the bugs they find are hard to debug, so the longer we<br>
take to fix it the harder it is to find out what happened. We need to<br>
know as soon as possible when they break.<br></blockquote><div><br></div><div>I still question whether these bots provide value to the community as a whole when they send email. If the investigation usually falls to the owners rather than the contributors, then the emails they send (& their presence on a broader dashboard) may not be beneficial.<br><br>So to be actionable they need to have small blame lists and be reliable (low false positive rate). If either of those is compromised, investigation will fall to the owner and ideally they should not be present in email/core dashboard groups.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
  1.3. Two of: Slow || Unstable || Often Red<br>
<br>
These bots are normally only important to their owners, and they are<br>
on the verge of being disabled.</blockquote><div><br></div><div>I don't think they have to be on the verge of being disabled - so long as they don't send email and are in a separate group, I don't see any problem with them being on the main llvm buildbot. (no particular benefit either, I suppose - other than saving the owner the hassle of running their own master, which is fine)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> The only way to cope with those bots<br>
is to completely disable their emails / IRC messages, so that no one<br>
gets flooded with noise from broken bots.<br></blockquote><div><br></div><div>Yep</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">However, some bots on the 1.2 category fall into this one for short<br>
periods of time (~1 week), so we need to be careful with what we<br>
disable here. That's the key baby/bathwater issue.<br>
<br>
Any hard policy here will be wrong for some bots some of the time, so<br>
I'd love if we could all just trust the bot owners a bit when they say<br>
they're fixing the issue.</blockquote><div><br></div><div>It's not a question of trust, from my perspective - regardless of whether they will address the issue or not, the emails add noise and decrease the overall trust developers have in the signal (via email, dashboards and IRC) from the buildbots.<br><br>If an issue is being investigated we have tools to deal with that: XFAIL, revert, and buildbot reconfig (we could/should check if the reconfig for email configuration can be done without a restart - yes, it still relies on a buildbot admin to be available (perhaps we should have more people empowered to reconfig the buildmaster to make this cheaper/easier) but without the interruption to all builds).<br><br>If there's enough hardware that blame lists are small and the bot is reliable, then reverts can happen aggressively. If not, XFAIL is always an option too.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> However, bots that fall here for more than a<br>
month, or more often that a few times during a few months (I'm being<br>
vague on purpose), then we collectively decide to disable the bot.<br>
<br>
What I *don't* want is any two or three guys deciding to disable the<br>
buildbot of someone else because they can't stand the noise. Remember,<br>
people do take holidays once in a while, and they may be in the Amazon<br>
or the Sahara having well deserved rest. Returning to work and<br>
learning that all your bots are disabled for a week is not nice.<br></blockquote><div><br></div><div>I disagree here - if the bots remain red, they should be addressed. This is akin to committing a problematic patch before you leave - you should expect/hope it is reverted quickly so that you're not interrupting everyone's work for a week.<br><br>If your bot is not flakey and has short blame lists, I think it's possibly reasonable to expect that people should revert their patches rather than disable the bot or XFAIL the test on that platform. But without access to hardware it may be hard for them to investigate the failure - XFAIL is probably the right tool, then when the owner is back they can provide a reproduction, extra logs, help remote-debug it, etc.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So far, we have coped with noise, and the result is that people tend<br>
to ignore those bots, which means more work to the bot owner.</blockquote><div><br></div><div>The problem is, that work doesn't only fall on the owners of the bots which produce the noise. It falls on all bot owners because developers become immune/numb to bot failure mail to a large degree.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> This is<br>
not a good situation, and we want to move away from it, but we<br>
shouldn't flip all switches off by default. We can still be pragmatic<br>
about this as long as we improve the quality overall (see 2.x below)<br>
with time.<br>
<br>
In summary, bots that fall here for too long will have their emails<br>
disabled and candidates for removal in the next spring clean-up, but<br>
not immediately.<br>
<br>
  1.4. Slow && Unstable && Red<br>
<br>
These bots don't belong here. They should be moved elsewhere,<br>
preferably to a local buildmaster that you can control and that will<br>
never email people or upset our master if you need changes. I have<br>
such a local master myself and it's very easy to setup and maintain.<br></blockquote><div><br></div><div>Yep - bots that are only useful to the owner (some of the situations above I think constitute this situation, but anyway) shouldn't email/show up in the main buildbot group. But I wouldn't mind if we had a separate grouping in the dashboards for these bots (I think we have an experimental group which is somewhat like this). No big deal either way to me. If they're not sending mail/IRC messages, and they're not in the main group on the dashboard, I'm OK with it.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">They *do* have value to *you*, for example to show the progress of<br>
your features cleaning up the failures, or generating some benchmark<br>
numbers, but that's something that is very specific to your project<br>
and should remain separated.<br>
<br>
Any of these bots in LLVM Lab should be moved away / removed, but on<br>
consensus, including the bot owner if he/she is still available in the<br>
list.<br>
<br>
<br>
   2. Test stability issues<br>
<br>
These issues, as you may have noticed from the links above, apply to<br>
*all* bots. The less noise we have overall, the lower will be our<br>
threshold for kicking bots out of the critical pool, and the higher<br>
the value of the not-so-perfect buildbots to the rest of the<br>
community.<br></blockquote><div><br></div><div>I'm not quite sure I follow this comment. The less noise we have, the /more/ problematic any remaining noise will be (because it'll be costing us more relative to no-noise - when we have lots of noise, any one specific source of noise isn't critical, we can remove it but it won't change much - when there's a little noise, removing any one source substantially decreases our false positive rate, etc)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
  2.1 Failed vs Exception<br>
<br>
The most critical issue we have to fix is the "red -> exception -><br>
red" issue. Basically, a bot is red (because you're still<br>
investigating the problem), then someone restarts the master, so you<br>
get an exception. The next build will be a failure, and the<br>
buildmaster recognises the status change and emails everyone. That's<br>
just wrong.<br>
<br>
We need to add an extra check to that logic where it searches down for<br>
the next non-exceptional status and compares to that, not just the<br>
immediately previous result.<br>
<br>
This is a no-brainer and I don't think anyone would be against it. I<br>
just don't know where this is done, I welcome the knowledge of more<br>
experienced folks.<br></blockquote><div><br></div><div>Yep, sounds like we might be able to have Galina look into that. I have no context there about where that particular behavior might be (whether it's in the buildbot code itself, or in the user-provided buildbot configuration, etc).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
  2.2 Failure types<br>
<br>
The next obvious thing is to detect what the error is. If it's an SVN<br>
error, we *really* don't need to get an email.</blockquote><div><br></div><div>Depends on the error - if it's transient, then this is flakiness as always & should be addressed as such (by trying to remove/address the flakes). Though, yes, this sort of failure should, ideally, probably, go to the buildbot owner but not to users.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> But this raises the<br>
problem that an SVN failure followed by a genuine failure will not be<br>
reported. So, the reporting mechanism also has to know what's the<br>
previously *reported* failure, not just the previous failure.<br>
<br>
Other failures, like timeout, can be either flaky hardware or broken<br>
codegen. A way to be conservative and low noise would be to only warn<br>
on timeouts IFF it's the *second* in a row.<br></blockquote><div><br></div><div>I don't think this helps - this reduces the incidence, but isn't a real solution. We should reduce the flakiness of hardware. If hardware is this unreliable, why would we be building a compiler for it? No user could rely on it to produce the right answer. (& again, if the flakiness is bad enough - I think that goes back to an owner-triaged bot, one that doesn't send mail, etc)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For all these adjustments, we'll need some form of walk-back on the<br>
history to find the previous genuine result, and we'll need to mark<br>
results with some metadata. This may involve some patches to buildbot.<br></blockquote><div><br></div><div>Yeah, having temporally related buildbot results seems dubious/something I'd be really cautious about.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">  2.3 Detecting fixed bots<br>
<br>
Another interesting feature, that is present in the "GreenBot" is a<br>
warning when a bot you broke was fixed. That, per se, is not a good<br>
idea if the noise levels are high, since this will probably double it.<br>
<br>
So, this feature can only be introduced *after* we've done the clean<br>
ups above. But once it's clean, having a "green" email will put the<br>
minds of everyone that haven't seen the "red" email yet to rest, as<br>
they now know they don't even need to look at it at all, just delete<br>
the email.<br>
<br>
For those using fetchmail, I'm sure you could create a rule to do that<br>
automatically, but that's optional. :)<br></blockquote><div><br></div><div>Yeah, I don't know what the right solution is here at all - but it certainly would be handy if there were an easier way to tell if an issue has been resolved since your commit.<br><br>I imagine one of the better options would be some live embedded HTML that would just show a green square/some indicator that the bot has been green at least once since this commit.<br><br>(that doesn't help if you introduced a flaky test, though... - that's harder to deal with/convey to users, repeated test execution may be necessary in that case - that's when temporal information may be useful)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
  2.4 Detecting new failures<br>
<br>
This is a wish-list that I have, for the case where the bots are slow<br>
and hard to debug and are still red. Assuming everything above is<br>
fixed, they will emit no noise until they go green again, however,<br>
while I'm debugging the first problem, others can appear. If that<br>
happens, *I* want to know, but not necessarily everyone else.<br></blockquote><div><br></div><div>This seems like the place where XFAIL would help you and everyone else. If the original test failure was XFAILed immediately, the bot would go green, then red again if a new failure was introduced. Not only would you know, but so would the auhtor of the change.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
So, a list of problems reported could be added to the failure report,<br>
and if the failure is different, the bot owner gets an email. This<br>
would have to play nice with exception statuses, as well as spurious<br>
failures like SVN or timeouts, so it's not an easy patch.<br>
<br>
The community at large would be already happy with all the changes<br>
minus this one, but folks that have to maintain slow hardware like me<br>
would appreciate this feature. :)<br>
<br>
<br>
<br>
Does any one have more concerns?<br>
<br>
AFAICS, we should figure out where the walk-back code needs to be<br>
inserted and that would get us 90% of the way. The other 10% will be<br>
to list all the buildbots, check their statuses, owners, and map into<br>
those categories, and take the appropriate action.<br>
<br>
Maybe we should also reduce the noise in the IRC channel further (like<br>
only first red, first green), but that's not my primary concern right<br>
now. Feel free to look into it if it is for you.<br>
<br>
cheers,<br>
--renato<br>
</blockquote></div><br></div></div>