summaryrefslogtreecommitdiffhomepage
path: root/runsc/container/BUILD
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-10-30 15:36:42 -0700
committergVisor bot <gvisor-bot@google.com>2019-10-30 15:39:04 -0700
commitca90dad0e21c758925968d217ad15a05015bd82c (patch)
treee754614d2a34f21fc0a65c33172cc0360e9fd892 /runsc/container/BUILD
parentdb37483cb6acf55b66132d534bb734f09555b1cf (diff)
Fix container locking
Sandbox root dir was not being saved with the Container state, so it would point to the wrong directory location when attempting to lock the sandbox. This led to race conditions saving and loading container state. Fixing it, led to multiple deadlocks. I've moved the saving and locking logic to a separate struct and moved the lock file inside the RootDir (instead of container root dir), which allows the lock to be taken inside Destroy, and removes the need to lock the sandbox. PiperOrigin-RevId: 277599612
Diffstat (limited to 'runsc/container/BUILD')
-rw-r--r--runsc/container/BUILD1
1 files changed, 1 insertions, 0 deletions
diff --git a/runsc/container/BUILD b/runsc/container/BUILD
index 26d1cd5ab..2bd12120d 100644
--- a/runsc/container/BUILD
+++ b/runsc/container/BUILD
@@ -7,6 +7,7 @@ go_library(
srcs = [
"container.go",
"hook.go",
+ "state_file.go",
"status.go",
],
importpath = "gvisor.dev/gvisor/runsc/container",