diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-02-13 01:18:38 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-13 01:18:38 +0000 |
commit | e7ae604b523e45d8db4f47c394f618a24679dd49 (patch) | |
tree | 9b8720aeb4b4d3bc388bec55e01104e22cde3faa /runsc/boot | |
parent | fef86ac109e77f1173e1fac8e9086ec2372de660 (diff) | |
parent | 3ef012944d32313cee4df244585f48e8d4fd8e9e (diff) |
Merge release-20210208.0-58-g3ef012944 (automated)
Diffstat (limited to 'runsc/boot')
-rw-r--r-- | runsc/boot/loader.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index 77a7c530b..a02eb2ec5 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -477,14 +477,16 @@ func createProcessArgs(id string, spec *specs.Spec, creds *auth.Credentials, k * // been closed. For that reason, this should NOT be called in a defer, because // a panic in a control server rpc would then hang forever. func (l *Loader) Destroy() { - if l.ctrl != nil { - l.ctrl.srv.Stop() - } if l.stopSignalForwarding != nil { l.stopSignalForwarding() } l.watchdog.Stop() + // Stop the control server. This will indirectly stop any + // long-running control operations that are in flight, e.g. + // profiling operations. + l.ctrl.stop() + // Release all kernel resources. This is only safe after we can no longer // save/restore. l.k.Release() @@ -1055,9 +1057,6 @@ func (l *Loader) WaitExit() kernel.ExitStatus { // Wait for container. l.k.WaitExited() - // Stop the control server. - l.ctrl.stop() - // Check all references. refs.OnExit() |