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

Re: [PATCH] Fix bunch of fd leaks in http-fetch

From
Junio C Hamano <junkio@cox.net>
Date
Nov 12, 2005, 05:45 UTC
Message-ID
<7vk6feiflx.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20051111235516.GY30496@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
> The current http-fetch is rather careless about fd leakage, causing
> problems while fetching large repositories. This patch does not reserve
> exhaustiveness, but I covered everything I spotted...

Thanks. While I am sure a quick fix is better for the end user than not doing anything at all, I am a bit reluctant.

It strikes me somewhat odd that these close() are not tied to the lifetime rule of the transfer_request structure. When the program falls back from an individual object to alternates, the same request structure is reused, but in that case ->local stays the same. Otherwise, the original request structure is released so I wonder if would make things cleaner to close ->local inside request_release()...

Nick?
Previous: Petr BaudisNext: Nick Hengeveld
Message 4 of 7 in “file descriptor leak? or expected behavior?”
  1. Becky BruceNov 11, 2005
  2. Becky BruceNov 11, 2005
  3. Fix bunch of fd leaks in http-fetchPetr Baudis, Nov 11, 2005
  4. Junio C HamanoNov 12, 2005
  5. Nick HengeveldNov 12, 2005
  6. Petr BaudisNov 12, 2005
  7. Nick HengeveldNov 13, 2005

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.