git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [bug] git clone command leaves orphaned ssh process

From
Aaron Schrab <aaron@schrab.com>
Date
Sep 12, 2023, 00:40 UTC
Message-ID
<20230912T004049Z.jiWw7xuK7fiT@pug.qqx.org>
In-Reply-To
<CAN47KsX5cpo5oD7PAwAQzjR4oocST6uSkJe2SzAYPxxqy7dGtg@mail.gmail.com>
At 13:11 +0300 11 Sep 2023, Max Amelchenko <maxamel2002@gmail.com> wrote:
>Maybe it's connected also to the underlying infrastructure? We are
>getting this in AWS lambda jobs and we're hitting a system limit of
>max processes because of it.

Running as a lambda, or in a container, could definitely be why you're seeing a difference. Normally when a process is orphaned it gets adopted by `init` (PID 1), and that will take care of cleaning up after orphaned zombie processes.

But most of the time containers just run the configured process directly, without an init process. That leaves nothing to clean orphan processes.

Although for that to really be a problem, would require hitting that max process limit inside a single container invocation. Of course since containers usually aren't meant to be spawning a lot of processes, that limit might be a lot lower than on a normal system.

I know that Docker provides a way to include an init process in the started container (`docker run --init`), but I don't think that AWS Lambda does.

Previous: Max AmelchenkoNext: Jeff King
Message 6 of 9 in “[bug] git clone command leaves orphaned ssh process”
  1. Max AmelchenkoSep 10, 2023
  2. Bagas SanjayaSep 10, 2023
  3. Max AmelchenkoSep 10, 2023
  4. Taylor BlauSep 10, 2023
  5. Max AmelchenkoSep 11, 2023
  6. Aaron SchrabSep 12, 2023
  7. Jeff KingSep 12, 2023
  8. Max AmelchenkoSep 24, 2023
  9. Jeff KingSep 25, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.