containerd/linux/shim
Michael Crosby 951c129bf1 Handle locking and errors for process state
ref: #1464

This tries to solve issues with races around process state.  First it
adds the process mutex around the state call so that any state changes,
deletions, etc will be handled in order.

Second, for IsNoExist errors from the runtime, return a stopped state if
a process has been removed from the underlying OCI runtime but not from
the shim yet.  This shouldn't happen with the lock from above but its
hare to verify this issue.

Third, handle shim disconnections and return an ErrNotFound.

Forth, don't abort returning all tasks if one task is unable to return
its state.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-07 16:22:00 -04:00
..
v1 Add ExitedAt to process proto definition 2017-08-21 08:18:02 -07:00
client_linux.go linux: Honor RuncOptions if set on container 2017-08-31 14:35:05 -07:00
client_unix.go linux: Honor RuncOptions if set on container 2017-08-31 14:35:05 -07:00
client.go linux: Add RuntimeRoot to RuncOptions 2017-08-31 14:35:05 -07:00
deleted_state.go Add procesStates for shim processes 2017-08-25 14:03:55 -04:00
exec_state.go Add procesStates for shim processes 2017-08-25 14:03:55 -04:00
exec.go Add procesStates for shim processes 2017-08-25 14:03:55 -04:00
init_state.go Update reaper for multipe subscribers 2017-08-31 14:29:47 -04:00
init.go Handle locking and errors for process state 2017-09-07 16:22:00 -04:00
io.go Close stdin on create if it wasn't requested and there's no terminal 2017-05-16 14:16:47 -07:00
local.go linux: Honor RuncOptions if set on container 2017-08-31 14:35:05 -07:00
process.go Add procesStates for shim processes 2017-08-25 14:03:55 -04:00
service_linux.go use epoll to manage console i/o in linux 2017-07-30 10:50:39 +01:00
service_unix.go use epoll to manage console i/o in linux 2017-07-30 10:50:39 +01:00
service.go linux: Ensure all init children are dead when it exits 2017-09-01 14:50:56 -07:00
utils.go Add procesStates for shim processes 2017-08-25 14:03:55 -04:00