diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2018-10-11 16:05:44 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-10-11 16:07:05 -0700 |
commit | ea5f6ed6ecab7f8b2648836117f62629b3c2cbb8 (patch) | |
tree | edd6bb8e7c06c38947736b694b08448c936c2312 /runsc/boot/loader_test.go | |
parent | 86680fa00240e3e439d1275f4f8bf89678cf3355 (diff) |
Make Wait() return the sandbox exit status if the sandbox has exited.
It's possible for Start() and Wait() calls to race, if the sandboxed
application is short-lived. If the application finishes before (or during) the
Wait RPC, then Wait will fail. In practice this looks like "connection
refused" or "EOF" errors when waiting for an RPC response.
This race is especially bad in tests, where we often run "true" inside a
sandbox.
This CL does a best-effort fix, by returning the sandbox exit status as the
container exit status. In most cases, these are the same.
This fixes the remaining flakes in runsc/container:container_test.
PiperOrigin-RevId: 216777793
Change-Id: I9dfc6e6ec885b106a736055bc7a75b2008dfff7a
Diffstat (limited to 'runsc/boot/loader_test.go')
0 files changed, 0 insertions, 0 deletions