Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task runner: fix goroutine leak in prestart hook #11741

Merged
merged 2 commits into from
Dec 23, 2021
Merged

Commits on Dec 23, 2021

  1. task runner: fix goroutine leak in prestart hook

    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.
    tgross committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    e1bbf30 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7406e6d View commit details
    Browse the repository at this point in the history