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

raw_exec leaks child process if executor fails (Linux) #24219

Open
tgross opened this issue Oct 15, 2024 · 0 comments
Open

raw_exec leaks child process if executor fails (Linux) #24219

tgross opened this issue Oct 15, 2024 · 0 comments

Comments

@tgross
Copy link
Member

tgross commented Oct 15, 2024

While debugging #23668 for Windows, I wanted to see how similar behavior works for Linux. Unfortunately if the executor is killed on Linux we get similar but not identical results. In that case the child process is leaked but when the allocation is marked failed we end up cleaning it up. That cleanup itself seems a little dubious.

Simple reproduction is to run something simple like:

job "example" {

  group "web" {

    task "http" {

      driver = "raw_exec"

      config {
        command = "/usr/bin/busybox"
        args    = ["httpd", "-v", "-f", "-p", "8001", "-h", "/tmp"]
      }

      resources {
        cpu    = 100
        memory = 100
      }

    }
  }
}

Use ps to find the executor process and kill -9 it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant