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

Re: git-fast-import out of memory

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jun 5, 2020, 22:43 UTC
Message-ID
<20200605224342.GF6569@camp.crustytoothpaste.net>
In-Reply-To
<c53bb69b-682d-3b47-4ed0-5f4559e69e37@gmx.com>
On 2020-06-05 at 05:15:04, Billes Tibor wrote:
Show 5 quoted lines
> Can you help me fix this issue? I hope the information I gathered is
> enough to
> help you find the cause of this behavior. I'd be happy to provide more
> information if needed or test patches.  Unfortunately the source code I was
> fetching is proprietary, I cannot post it.

Hey, thanks for this report. I can confirm this with git.git and the following commands:

  git fast-export --all --reencode=yes --signed-tags=verbatim --tag-of-filtered-object=drop >$TMP/git.fe
  cd $TMP && rm -fr test-repo && git init test-repo &&
    (cd test-repo && /usr/bin/time git fast-import --export-marks=$TMP/git.marks < $TMP/git.fe &&
    /usr/bin/time git fast-import --import-marks=$TMP/git.marks < $TMP/git.fe)

The latter fast-import command gets killed with SIGKILL due to using 16 GiB of memory, which I would agree is unreasonable.

It looks like with Junio's patch at <xmqqeeqto4x1.fsf@gitster.c.googlers.com>, the memory usage is down to 1.4 GiB, which considering that a pack must be written, is much more reasonable.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Billes TiborNext: brian m. carlson
Message 2 of 9 in “git-fast-import out of memory”
  1. Billes TiborJun 5, 2020
  2. brian m. carlsonJun 5, 2020
  3. fast-import: fix incomplete conversion with multiple mark filesbrian m. carlson, Jun 6, 2020
  4. exec: run final pipeline command in a subshell in sh modebrian m. carlson, Jun 6, 2020
  5. 0/1 Run pipeline command in subshell in sh modebrian m. carlson, Jun 6, 2020
  6. brian m. carlsonJun 6, 2020
  7. Tibor BillesJun 8, 2020
  8. Junio C HamanoJun 8, 2020
  9. brian m. carlsonJun 8, 2020

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.