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

Re: Closing fds twice when using remote helpers

From
Mike Hommey <mh@glandium.org>
Date
May 16, 2019, 00:31 UTC
Message-ID
<20190516003130.racexnofe7cxra3t@glandium.org>
In-Reply-To
<20190515105609.sucfjvuumeyyrmjb@glandium.org>
On Wed, May 15, 2019 at 07:56:09PM +0900, Mike Hommey wrote:
Show 15 quoted lines
> Hi,
> 
> I started getting a weird error message during some test case involving
> git-cinnabar, which is a remote-helper to access mercurial
> repositories.
> 
> The error says:
> fatal: mmap failed: Bad file descriptor
> 
> ... which was not making much sense. Some debugging later, and it turns
> out this is what happens:
> 
> - start_command is called for fast-import
> - start_command is called again for git-remote-hg, passing the
>   fast_import->out as cmd->in.

My mistake, it's the opposite: start_command for fast-import is called with the out of git-remote-hg as in.

Anyways, patches incoming.
Mike
Next: Mike Hommey
Message 1 of 5 in “Re: Closing fds twice when using remote helpers”
  1. Mike HommeyMay 16, 2019
  2. 1/2 dup() the input fd for fast-import used for remote helpersMike Hommey, May 16, 2019
  3. 2/2 Use xmmap_gently instead of xmmap in use_packMike Hommey, May 16, 2019
  4. Jeff KingMay 16, 2019
  5. Jeff KingMay 16, 2019

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.