Fix race condition (COMPLETED/BOT_DIED) in task_runner.

Per b/69462084 and a TODO comment in this file, a race condition
exists when an external process polls task status that fails with
BOT_DIED (there's a short window in which the task will be marked
as COMPLETED before being updated to BOT_DIED). This change sends
the task-update without the exit code (to prevent the COMPLETED
status from being set), and then sends a task_error message. The
default must_signal_internal_failure is also changed to provide a
default error in case run_isolated fails.

TESTED=Ran unit tests in task_runner_test and they pass.

Any other tests?

Change-Id: I1db3e15ccbdac3da9181b273681180211b07841c
Commit-Queue: Marc-Antoine Ruel <>
Reviewed-by: Marc-Antoine Ruel <>
4 files changed
tree: db294e237921ca550cd0119e56e1c255453b4dc4
  1. appengine/
  2. client/
  3. infra/
  4. .gitignore
  5. .vpython
  7. codereview.settings
  11. OWNERS


LUCI is an ensemble of services that work together to run large scale CI (continuous integration) infrastructure to get results in O(1). It is used by the Chromium project.

See appengine/ for the services provided.


A complete CI toolkit:

  • Strict separation between task distribution and file distribution.
    • Swarming distributes tasks across an army (thousands) of Swarming bots.
    • Isolate server distributes 10s of thousands of files per task.
  • Federated authentication and ACL.
  • git based configuration data propagation.
  • Automatic Google Compute Engine VM recycling.
  • Windows, OSX and Linux (Ubuntu), used with Android, iOS, ChromeOS.
  • Written in python 2.7 along Go tools.
  • Used by the Chromium infrastructure and other teams.


  1. Install Google AppEngine SDK.
  2. git clone

Code layout


  • Branch master constains the latest code.
  • Branch stable contains the stable code.


  • Sign the Google CLA.
  • See the coding style.
  • Make sure your and are configured in git config.

Run the following to setup the code review tool and create your first review:

git clone $HOME/src/depot_tools
export PATH="$PATH:$HOME/src/depot_tools"
cd luci-py
git checkout -b work origin/master

# hack hack

git commit -a -m "This is awesome\"
# This will ask for your Google Account credentials.
git cl upload -s
# Wait for LGTM over email.
# Check the commit queue box in codereview website.
# Wait for the change to be tested and landed automatically.

Use git cl help and git cl help <cmd> for more details.


This project is licensed under Apache v2.0 license. See LICENSE for details.