265e488ab4
The task runner prestart hooks take a `joincontext` so they have the option to exit early if either of two contexts are canceled: from killing the task or client shutdown. Some tasks exit without being shutdown from the server, so neither of the joined contexts ever gets canceled and we leak the `joincontext` (48 bytes) and its internal goroutine. This primarily impacts batch jobs and any task that fails or completes early such as non-sidecar prestart lifecycle tasks. Cancel the `joincontext` after the prestart call exits to fix the leak. |
||
---|---|---|
.. | ||
interfaces | ||
state | ||
taskrunner | ||
alloc_runner.go | ||
alloc_runner_hooks.go | ||
alloc_runner_test.go | ||
alloc_runner_unix_test.go | ||
allocdir_hook.go | ||
cgroup_hook.go | ||
config.go | ||
consul_grpc_sock_hook.go | ||
consul_grpc_sock_hook_test.go | ||
consul_http_sock_hook.go | ||
consul_http_sock_hook_test.go | ||
csi_hook.go | ||
groupservice_hook.go | ||
groupservice_hook_test.go | ||
health_hook.go | ||
health_hook_test.go | ||
migrate_hook.go | ||
network_hook.go | ||
network_hook_test.go | ||
network_manager_linux.go | ||
network_manager_linux_test.go | ||
network_manager_nonlinux.go | ||
networking.go | ||
networking_bridge_linux.go | ||
networking_cni.go | ||
networking_cni_test.go | ||
task_hook_coordinator.go | ||
task_hook_coordinator_test.go | ||
testing.go | ||
upstream_allocs_hook.go | ||
util.go |