Yocto Build Failure Swat Team: Difference between revisions

From Yocto Project
Jump to navigationJump to search
No edit summary
 
(114 intermediate revisions by 22 users not shown)
Line 1: Line 1:
{| style="color:black; background-color:#b8ddff" width="100%" cellpadding="10" class="wikitable"
== Overview ==
|'''Note''': The SWAT process has changed. Please read the new process information (up to, and including, section 6). If you're already au-fait with the new process you may want the [[#Process_summary|summary bullets]].
|}


== Overview ==
All builds that are run on the public autobuilder are important for the Yocto Project, whether they be routine validation runs or pre-integration test builds. Random failures if ignored accumulate and can result in a significant number of builds failing.
 
The role of the Bug Swat Team is to monitor the autobuilder and do preliminary investigation of failures, to ensure that they are logged and brought to the attention of the appropriate owner.
 
Importantly, the Swat Team '''isn't responsible for resolving issues''' encountered on the autobuilder, simply just enough analysis so that it can be logged for later analysis and ideally make the right people aware of them.
 
Each week a different member of the team is on call. Every build that fails on the autobuilder should be monitored unless stated otherwise.  The rotation happens at the end of Friday (deliberately vague), any failures over the weekend should be triaged by the incoming member on Monday.
 
The Swat Chairs are the primary contact for the Swat Team. The current Swat Chairs are [[User:RossBurton | Ross Burton]] and [[User:Rpurdie | Richard Purdie]]. The Chairs are assisted by Stephen K. Jolley who handles the rotation process.  If the person currently on call, or about to be on call, can no longer perform their duty then they should contact Stephen to arrange a replacement.
 
== Process ==
 
The SWAT process is now using a specific tool, [https://swatbot.yoctoproject.org/ swatbot]. Swatbot has a filter which will list all the pending issues that need to be triaged using [https://swatbot.yoctoproject.org/mainindex/swat/  this link ] or the "SWAT Pending Builds" link on the left hand menu. Each issue has links to the autobuilder logs for the failing step (e.g. usually stdio and warning/error logs).
 
The builds are shown in a tree like structure with the parent build and any child builds under it. The builds are edited as a group under the parent as quite often a failure might be common to the child builds. Each failure does need to be triaged individually although multiple builds can be changed at once to a given resolution.
 
Swatbot can filter pending issues to be triaged using the [https://swatbot.yoctoproject.org/mainindex/swat/ SWAT Pending Builds] link. Once you have selected an issue to triage, you will have to take the correct reporting action and finally edit the entry to indicate what was done.
 
You can also be notified when a build fails by subscribing to the [https://lists.yoctoproject.org/g/yocto-builds yocto-builds] mailing list.  This is sending a mail when a build fails, including direct links to the [https://autobuilder.yoctoproject.org/ autobuilder job summary] and the [https://errors.yoctoproject.org/Errors/Latest/Autobuilder/ Error Reporting Service].  The mail will also state if it is expected that the build is triaged by Swat, so check this to see if the build can be ignored as the owner is taking full responsibility. Currently, swatbot will not give you this information so you have to get it from the autobuilder build entry (the <tt>Build properties</tt> tab should have: <tt>swat_monitor true</tt>), the autobuilder API, or the notification email.
 
Another tool that can be used to monitor builds is the [https://autobuilder.yoctoproject.org/typhoon/#/console Autobuilder 'Yocto Console View'] which is an overview of the top-level builds (''a-full'' and ''a-quick'') and the sub-builds they trigger.
 
Both the top-level build entry and the mail notification will include notes from the build owner, so check this for any useful context.  For example, it may request that failures are reported directly to a specific person instead of bugs created, or that particular failures that are expected.
 
=== Report ===
 
There are two categories of builds that Swat will be monitoring: official branches and staging branches.  The official branches are the primary top-level branches in Poky, that is master and all of the release branches (gatesgarth, dunfell, etc).  The staging branches are where patches are held for testing, such as master-next, stable/dunfell-nut, or ross/mut.


The role of the SWAT team is to monitor the autobuilder and investigate all failures to ensure they are logged and brought to the attention of a suitable owner.
Communication is important: if the build owner is on IRC then it's always worth discussing issues with them first as they may have further context and directions.  Also, if the build owner triages the build failures then they must update the swatbot entries so that Swat doesn't duplicate the work.


== Scope ==
When reporting an issue, be it in a mailing list post or a new bug, the following information should be included:
* Relevant details about the build configuration. For example: did the failure happen just once, or in all PowerPC builds? Was it specific to multilib configurations?  Look across the entire build run and identify any patterns.
* The error itself. Trim the log down to just the error and any relevant context in the bug description.
* A link to the build failure.  Either a link to the [http://errors.yoctoproject.org/ error reports] page (such as http://errors.yoctoproject.org/Errors/Details/199667/) or a link to the autobuilder build log (such as https://autobuilder.yoctoproject.org/typhoon/#/builders/34/builds/168).


All builds run on the public autobuilder are important for the Yocto Project, whether they be a post-merge validation run (for master or a release branch) or a pre-merge test build (for master-next, ross/mut and others). Any build should be monitored by the SWAT team unless the [[BuildLog]] entry for that build indicates otherwise. That is; SWAT is opt-out by whomever triggers a build on the Autobuilder, not opt-in.
When filing bugs, always search Bugzilla first to see if the issue is already known.  For example, there are some bugs that occur intermittently and are already filed with ''AB-INT'' in the whiteboard field. They are listed here: [https://bugzilla.yoctoproject.org/buglist.cgi?quicksearch=whiteboard%3AAB-INT&list_id=640327 Autobuilder issues]


== Pre-triage ==
The exact progress depends on whether the branch is an official branch or a staging branch.


SWAT isn't responsible for resolving issues encountered on the Autobuilder. Their focus is on performing minimal analysis of a failure in order to ensure that it is logged and brought to the attention of a suitable owner, a process we'll refer to as pre-triage.
==== Staging Branches ====


== Rotation Process ==
For builds against staging branches which contain patches under test for integration (such as master-next, stable/dunfell-nut, ross/mut, etc), first attempt to identify if there is a patch in the branch that is likely to be responsible for the failure. For example, if <tt>wget</tt> fails with <tt>libgnutls</tt> errors and there is a GnuTLS upgrade in the branch, then that is a likely candidate.  If a patch can be identified that hasn't yet been merged into an official branch, then reply to the patch on the mailing list with the details.  If it isn't obvious which patch is responsible for the failure, or a patch can be identified but it has already been merged to the release branch, then file a bug and ensure the branch maintainer (see the [[Releases]] page for names) is on the CC list.


The active member rotation takes place weekly at the end of Friday. Usually, this will take a simple round robin order through the members list. In case the next person cannot take the role due to tight schedule, vacation or some other reasons, the role will be passed to the next person.
Most of the failures will be for staging branches as master-next is the branch that is tested the most. However, it is rebased quite frequently so it is not always easy to find which patchs were included. In that case, you have to get the actual commit hash, for example in the build properties, the variable is <tt>yp_build_revision</tt> or in the build configuration at the beginning of the stdio log. For example, this qemux86 build [https://autobuilder.yoctoproject.org/typhoon/#/builders/59/builds/3120] was master-next at revision 47482eff9897ccde946e9247724babc3a586d318.
With that information, you can then clone poky (or any other layer of interest) and fetch the proper commit and see the git log:


=== Roles ===
<pre>
'''Active member''': the currently active member of the SWAT team is expected to monitor the Autobuilder and pre-triage failures in a timely fashion. Team members are active for one week at a time.
$ git clone git://git.yoctoproject.org/poky
$ cd poky
$ git fetch origin 47482eff9897ccde946e9247724babc3a586d318
$ git log FETCH_HEAD
</pre>


'''SWAT Chair''': the SWAT chair provides backup cover for the active member and is a first point of contact for SWAT. [[User:Tracy_Graydon| Tracy Graydon]] is the current SWAT Chair.


'''SWAT Facilitator''': the SWAT facilitator is responsible for managing the rotation process. [[User:Stephano| Stephano]] is the current SWAT Facilitator.
'''If in doubt, file a bug'''. All errors must be taken care of.


== Process ==
If the issue is in the infrastructure or autobuilder itself then file a bug against "Infrastructure: Autobuilder", infrastructure bugs should be assigned to [[User:Halstead| Michael Halstead]] and autobuilder logic bugs to [[User:Rpurdie | Richard Purdie]].


The [[BuildLog]] wiki page is automatically updated by the autobuilder when a new build is triggered. An entry should include a reason for triggering the build (as entered in the "Reason" field of the autobuilder "Force build" page when triggering a build) and may also include detail on what the expectations for the build are.
==== Official Branches ====
For each build failure that occurs the active SWAT member is responsible for pre-triaging the failure.


The pre-triage of failures takes two forms:
For builds of official branches, that is master or a release branch, '''all failures or warnings are critical''' and must be [[#Filing_bugs | filed in Bugzilla]]. Remember to check that the issue isn't already filed. Where an issue is already filed, please do add a comment so we can assess how frequently different issues are occurring.


* for builds against a master or release branch of the poky repo any issues observed should be [[#Filing_bugs | filed in bugzilla]].
=== Update ===
* for builds against other branches (master-next, ross/mut, -next branches for stable releases, etc.), where an issue is caused by a patch not in the master branch, the relevant unmerged patch causing the problem should be replied to on the mailing list.
** When it isn't obvious which patch caused the failure file an issue in bugzilla and alert the branch owner (CC or assignment on the bug should suffice).
** '''If in doubt file a bug''', ''all'' observed errors must be actioned unless a patch has already been sent for the issue (in which case please make note of this in the [[BuildLog]]).
** Infrastructure issues can be filed in bugzilla, where they will be assigned to [[User:Halstead| Michael Halstead]] (''halstead'' on irc) by default.
** Autobuilder logic bugs also go into bugzilla, where they will be assigned to [[User:Stephano| Stephano]] by default.


The results of pre-triage for an issue should be added to the corresponding entry in the [[BuildLog]], including a link to the pre-triage outcome (bugzilla entry, mailing list post in the archive, etc) and a brief summary of the issue.
Finally the swatbot build entry must be updated with a summary of the outcome.  Three different resolutions are available:
* Mail sent: used when you replied to the problematic patch directly on the mailing list.
* Bug Opened: used when a new bug has been opened or a new comment has been added to a bug. Please add the bug number in the notes.
* Handled (other): used when the maintainer is already aware of the issue and is working on it resolution or a patch has already been sent to solve the issue.


Every build failure should be addressed in the [[BuildLog]]. If it is a known issue, an entry with a single line containing "Known Issue" is sufficient (a link to further detail is, of course, much better). This assures others that the failure has been looked at and is being worked on.
You need an account for this step. If it hasn't been provided, please ask on the swat mailling list.


=== Filing bugs ===
'''Every issue that is dealt with must be annotated''', so it is easy to see which issues have been handled.  This includes filing new bugs, finding existing bugs, contacting the mailing list, contacting the maintainer directly on IRC, or identifying that a patch has already been sent to fix the issue.


When filing the bug, please:
== Tips ==
* cut and paste the relevant error in the bug comment, and include the log file as an attachment
* include the log from the ''CreateAutoConf'' step as an attachment (this ensures the assignee and triage team can quickly asses this issue)
* include a pointer to the [http://errors.yoctoproject.org ErrorLog] page associated with the failure (as ErrorLog)


{| style="color:black; background-color:#b8ddff" width="100%" cellpadding="10" class="wikitable"
An issue will quite often repeat itself across multiple builds. It is worth looking for those repetitions as swatbot will allow you to select many builds and update them all at once.
|'''Note''': Autobuilder logs are non-persistent, feel free to include a link to the log in a bug report but be sure to ''also'' attach a copy of the log and include relevant sections copy/pasted into the bug.
|}
{| style="color:black; background-color:#b8ddff" width="100%" cellpadding="10" class="wikitable"
|'''Note''': Sometimes, failures occur on autobuilders on private company networks. Do not post links into the bugzilla for these failures as nobody else can access them.
|}


=== Process summary ===
In the stdio logs window, clicking on the looking glass icon will load the full log in the browser, allowing you to use the search feature of the browser. Quite often, you'll start by looking for "error:".


* Monitor builds via one (or more) of:
Be sure to check all log files, especially the testimage logs that are available for qemu_boot_log (for example in: /tmp/work/qemux86_64-poky-linux/core-image-sato-sdk/1.0-r0/testimage/qemu_boot_log.20210902120413)
** the autobuilder [https://autobuilder.yocto.io/tgrid tgrid], [https://autobuilder.yocto.io/grid grid], [https://autobuilder.yocto.io/waterfall waterfall]
** the [[BuildLog]] wiki page
** the [https://lists.yoctoproject.org/listinfo/yocto-builds yocto-builds] mailing list
* Pre-triage each failure:
** File a bugzilla ticket ''OR'' respond to a patch ''OR'' note known issues
** Update the [[BuildLog]] with the result of pre-triage, linking to issues/mail archives when possible


== Questions / Contact ==
== Handoff ==


If you have queries about the SWAT process you may reach out to the SWAT Facilitator [[User:Stephano| Stephano]] and the SWAT Chair [[User:Tracy_Graydon| Tracy Graydon]].
At the end of the week, the outgoing person on Swat should email swat@lists.yoctoproject.org summarising the week and noting anything that the incoming person on Swat next week should be aware of. For example, noting that there's a new intermittent bug to watch for.


== Members ==
== Members ==


* Ross Burton (UK)
* [[User:RossBurton | Ross Burton]]
* Juro Bystricky (US)
 
* Paul Eggleton (NZ)
* [[User:Leonardo_Sandoval | Leo Sandoval]]
* [[User:Tracy_Graydon| Tracy Graydon]] (US) (SWAT Chair)
 
* Stephano Cetola (US)
* [[User:Anibal Limon | Anibal Limon]]
* Maxin John (FI)
 
* Rebecca Chang (Penang)
* [[User:Köry maincent | Köry Maincent]]
* California (Cal) Sullivan (US)
 
* Armin Kuster (California)
* [[User:Thomas Perrot | Thomas Perrot]]
 
* [[User:SaulWold | Saul Wold]]
 
* [[User:Oleksiy Obitotskyy | Oleksiy Obitotskyy]]
 
* [[User:Alejandro Enedino Hernandez Samaniego | Alejandro Hernandez Samaniego]]
 
* [[User:PaulEggleton | Paul Eggleton]]
 
* [[User:Naveen Kumar Saini | Naveen Saini]]
 
* [[User:Alexandre Belloni | Alexandre Belloni]]
 
* [[User:Kergoth | Christopher Larson]]
 
* [[User:Lee_chee_yang | Lee Chee Yang]]
 
* [[User:Jon Mason | Jon Mason]]
 
* [[User:Minjae Kim | Minjae Kim]]
 
* [[User:Jagadheesan | Jaga]]
 
* [[User:Valerii Chernous | Valerii Chernous]]

Latest revision as of 10:35, 5 October 2021

Overview

All builds that are run on the public autobuilder are important for the Yocto Project, whether they be routine validation runs or pre-integration test builds. Random failures if ignored accumulate and can result in a significant number of builds failing.

The role of the Bug Swat Team is to monitor the autobuilder and do preliminary investigation of failures, to ensure that they are logged and brought to the attention of the appropriate owner.

Importantly, the Swat Team isn't responsible for resolving issues encountered on the autobuilder, simply just enough analysis so that it can be logged for later analysis and ideally make the right people aware of them.

Each week a different member of the team is on call. Every build that fails on the autobuilder should be monitored unless stated otherwise. The rotation happens at the end of Friday (deliberately vague), any failures over the weekend should be triaged by the incoming member on Monday.

The Swat Chairs are the primary contact for the Swat Team. The current Swat Chairs are Ross Burton and Richard Purdie. The Chairs are assisted by Stephen K. Jolley who handles the rotation process. If the person currently on call, or about to be on call, can no longer perform their duty then they should contact Stephen to arrange a replacement.

Process

The SWAT process is now using a specific tool, swatbot. Swatbot has a filter which will list all the pending issues that need to be triaged using this link or the "SWAT Pending Builds" link on the left hand menu. Each issue has links to the autobuilder logs for the failing step (e.g. usually stdio and warning/error logs).

The builds are shown in a tree like structure with the parent build and any child builds under it. The builds are edited as a group under the parent as quite often a failure might be common to the child builds. Each failure does need to be triaged individually although multiple builds can be changed at once to a given resolution.

Swatbot can filter pending issues to be triaged using the SWAT Pending Builds link. Once you have selected an issue to triage, you will have to take the correct reporting action and finally edit the entry to indicate what was done.

You can also be notified when a build fails by subscribing to the yocto-builds mailing list. This is sending a mail when a build fails, including direct links to the autobuilder job summary and the Error Reporting Service. The mail will also state if it is expected that the build is triaged by Swat, so check this to see if the build can be ignored as the owner is taking full responsibility. Currently, swatbot will not give you this information so you have to get it from the autobuilder build entry (the Build properties tab should have: swat_monitor true), the autobuilder API, or the notification email.

Another tool that can be used to monitor builds is the Autobuilder 'Yocto Console View' which is an overview of the top-level builds (a-full and a-quick) and the sub-builds they trigger.

Both the top-level build entry and the mail notification will include notes from the build owner, so check this for any useful context. For example, it may request that failures are reported directly to a specific person instead of bugs created, or that particular failures that are expected.

Report

There are two categories of builds that Swat will be monitoring: official branches and staging branches. The official branches are the primary top-level branches in Poky, that is master and all of the release branches (gatesgarth, dunfell, etc). The staging branches are where patches are held for testing, such as master-next, stable/dunfell-nut, or ross/mut.

Communication is important: if the build owner is on IRC then it's always worth discussing issues with them first as they may have further context and directions. Also, if the build owner triages the build failures then they must update the swatbot entries so that Swat doesn't duplicate the work.

When reporting an issue, be it in a mailing list post or a new bug, the following information should be included:

When filing bugs, always search Bugzilla first to see if the issue is already known. For example, there are some bugs that occur intermittently and are already filed with AB-INT in the whiteboard field. They are listed here: Autobuilder issues

The exact progress depends on whether the branch is an official branch or a staging branch.

Staging Branches

For builds against staging branches which contain patches under test for integration (such as master-next, stable/dunfell-nut, ross/mut, etc), first attempt to identify if there is a patch in the branch that is likely to be responsible for the failure. For example, if wget fails with libgnutls errors and there is a GnuTLS upgrade in the branch, then that is a likely candidate. If a patch can be identified that hasn't yet been merged into an official branch, then reply to the patch on the mailing list with the details. If it isn't obvious which patch is responsible for the failure, or a patch can be identified but it has already been merged to the release branch, then file a bug and ensure the branch maintainer (see the Releases page for names) is on the CC list.

Most of the failures will be for staging branches as master-next is the branch that is tested the most. However, it is rebased quite frequently so it is not always easy to find which patchs were included. In that case, you have to get the actual commit hash, for example in the build properties, the variable is yp_build_revision or in the build configuration at the beginning of the stdio log. For example, this qemux86 build [1] was master-next at revision 47482eff9897ccde946e9247724babc3a586d318. With that information, you can then clone poky (or any other layer of interest) and fetch the proper commit and see the git log:

$ git clone git://git.yoctoproject.org/poky
$ cd poky
$ git fetch origin 47482eff9897ccde946e9247724babc3a586d318
$ git log FETCH_HEAD


If in doubt, file a bug. All errors must be taken care of.

If the issue is in the infrastructure or autobuilder itself then file a bug against "Infrastructure: Autobuilder", infrastructure bugs should be assigned to Michael Halstead and autobuilder logic bugs to Richard Purdie.

Official Branches

For builds of official branches, that is master or a release branch, all failures or warnings are critical and must be filed in Bugzilla. Remember to check that the issue isn't already filed. Where an issue is already filed, please do add a comment so we can assess how frequently different issues are occurring.

Update

Finally the swatbot build entry must be updated with a summary of the outcome. Three different resolutions are available:

  • Mail sent: used when you replied to the problematic patch directly on the mailing list.
  • Bug Opened: used when a new bug has been opened or a new comment has been added to a bug. Please add the bug number in the notes.
  • Handled (other): used when the maintainer is already aware of the issue and is working on it resolution or a patch has already been sent to solve the issue.

You need an account for this step. If it hasn't been provided, please ask on the swat mailling list.

Every issue that is dealt with must be annotated, so it is easy to see which issues have been handled. This includes filing new bugs, finding existing bugs, contacting the mailing list, contacting the maintainer directly on IRC, or identifying that a patch has already been sent to fix the issue.

Tips

An issue will quite often repeat itself across multiple builds. It is worth looking for those repetitions as swatbot will allow you to select many builds and update them all at once.

In the stdio logs window, clicking on the looking glass icon will load the full log in the browser, allowing you to use the search feature of the browser. Quite often, you'll start by looking for "error:".

Be sure to check all log files, especially the testimage logs that are available for qemu_boot_log (for example in: /tmp/work/qemux86_64-poky-linux/core-image-sato-sdk/1.0-r0/testimage/qemu_boot_log.20210902120413)

Handoff

At the end of the week, the outgoing person on Swat should email swat@lists.yoctoproject.org summarising the week and noting anything that the incoming person on Swat next week should be aware of. For example, noting that there's a new intermittent bug to watch for.

Members