buildobx-casd doesn't exit cleanly after some BuildStream errors

Summary

Once BuildStream throws certain errors, buildbox-casd sometimes doesn't exit cleanly. One situation where this is very easy to reproduce is when you run any bst commmand in a directory that doesn't have a project.conf.

Steps to reproduce

  • Change working directory to anywhere that isn't a BuildStream project
  • Run bst show
~> cd /tmp
/tmp> bst show
No project found. You can create a new project like so:

    bst init

Error loading project: None of ['project.conf', '.bstproject.yaml'] found in '/tmp' or any of its parent directories
[--:--:--][        ][    main:core activity                 ] BUG     Buildbox-casd didn't exit cleanly. Exit code: -15, Logs: /root/.cache/buildstream/cas/logs/1571407597.8691778.log

What is the current bug behavior?

buildbox-casd doesn't exit cleanly.

What is the expected correct behavior?

buildbox-casd doesn't die.