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. |
||
---|---|---|
.. | ||
getter | ||
interfaces | ||
restarts | ||
state | ||
template | ||
testdata | ||
artifact_hook.go | ||
artifact_hook_test.go | ||
connect_native_hook.go | ||
connect_native_hook_test.go | ||
device_hook.go | ||
device_hook_test.go | ||
dispatch_hook.go | ||
dispatch_hook_test.go | ||
driver_handle.go | ||
envoy_bootstrap_hook.go | ||
envoy_bootstrap_hook_test.go | ||
envoy_version_hook.go | ||
envoy_version_hook_test.go | ||
errors.go | ||
errors_test.go | ||
lazy_handle.go | ||
lifecycle.go | ||
logmon_hook.go | ||
logmon_hook_test.go | ||
logmon_hook_unix_test.go | ||
plugin_supervisor_hook.go | ||
remotetask_hook.go | ||
script_check_hook.go | ||
script_check_hook_test.go | ||
service_hook.go | ||
service_hook_test.go | ||
sids_hook.go | ||
sids_hook_test.go | ||
stats_hook.go | ||
stats_hook_test.go | ||
task_dir_hook.go | ||
task_runner.go | ||
task_runner_getters.go | ||
task_runner_hooks.go | ||
task_runner_test.go | ||
tasklet.go | ||
tasklet_test.go | ||
template_hook.go | ||
validate_hook.go | ||
validate_hook_test.go | ||
vault_hook.go | ||
vault_hook_test.go | ||
volume_hook.go | ||
volume_hook_test.go |