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

Re: fatal: Out of memory, getdelim failed under NFS mounts

From
René Scharfe <l.s.r@web.de>
Date
Aug 10, 2017, 13:27 UTC
Message-ID
<8e307474-d180-6d98-2c6b-062f2181bd14@web.de>
In-Reply-To
<20170809173928.h2ylvg5tp2p5inem@hopa.kiewit.dartmouth.edu>
Am 09.08.2017 um 19:39 schrieb Yaroslav Halchenko:
Show 27 quoted lines
> More context (may be different issue(s)) could be found at
> http://git-annex.branchable.com/forum/git-annex_add_out_of_memory_error/
> but currently I am consistently reproducing it while running
> git (1:2.11.0-3 debian stretch build) within debian stretch singularity
> environment [1].
> 
> External system is Centos 6.9, and git 1.7.1 (and installed in modules
> 2.0.4) do not show similar buggy behavior.
> 
> NFS mounted partitions are bind mounted inside the sinularity space and
> when I try to do some git operations, I get that error inconsistently , e.g.
> 
> 	yhalchen@discovery:/mnt/scratch/yoh/datalad$ git pull --ff-only origin master
> 	fatal: Out of memory, getdelim failed
> 	error: git://github.com/datalad/datalad did not send all necessary objects
> 
> 	yhalchen@discovery:/mnt/scratch/yoh/datalad$ git pull --ff-only origin master
> 	fatal: Out of memory, getdelim failed
> 	error: git://github.com/datalad/datalad did not send all necessary objects
> 
> 	yhalchen@discovery:/mnt/scratch/yoh/datalad$ git pull --ff-only origin master
> 	From git://github.com/datalad/datalad
> 	 * branch              master     -> FETCH_HEAD
> 	fatal: Out of memory, getdelim failed
> 
> and some times it succeeds.  So it smells that some race condition
> somewhere...?

I doubt the type of file system matters. The questions are: How much main memory do you have, what is git trying to cram into it, is there a way to reduce the memory footprint or do you need to add more RAM?

> any recommendations on how to pin point the "offender"? ;)

Running "GIT_TRACE=1 git pull --ff-only origin master" would be a good start, I think, to find out which of the different activities that pull is doing causes the out-of-memory error.

"free" and "ulimit -a" can help you find out how much memory you can use.

Also: What does "wc -L .git/FETCH_HEAD .git/packed-refs" report?
getdelim() is used mostly to read lines from files like these and in
the admittedly unlikely case that they are *really* long such an
error would be expected.
René
Previous: Yaroslav HalchenkoNext: Yaroslav Halchenko
Message 2 of 21 in “fatal: Out of memory, getdelim failed under NFS mounts”
  1. Yaroslav HalchenkoAug 9, 2017
  2. René ScharfeAug 10, 2017
  3. Yaroslav HalchenkoAug 10, 2017
  4. René ScharfeAug 10, 2017
  5. Junio C HamanoAug 10, 2017
  6. Yaroslav HalchenkoAug 10, 2017
  7. René ScharfeAug 10, 2017
  8. Jeff KingAug 10, 2017
  9. Yaroslav HalchenkoAug 10, 2017
  10. strbuf: clear errno before calling getdelim(3)René Scharfe, Aug 10, 2017
  11. Jeff KingAug 10, 2017
  12. Yaroslav HalchenkoAug 10, 2017
  13. Junio C HamanoAug 10, 2017
  14. Simon RuderichAug 11, 2017
  15. René ScharfeAug 11, 2017
  16. Simon RuderichAug 12, 2017
  17. René ScharfeAug 12, 2017
  18. René ScharfeAug 12, 2017
  19. Jeff KingAug 13, 2017
  20. René ScharfeAug 13, 2017
  21. Jeff KingAug 13, 2017

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.