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

git status OOM on mmap of large file

From
Joey Hess <id@joeyh.name>
Date
Jan 22, 2019, 22:07 UTC
Message-ID
<20190122220714.GA6176@kitenet.net>

joey@darkstar:~/tmp/t> ls -l big-file -rw-r--r-- 1 joey joey 11811160064 Jan 22 17:48 big-file joey@darkstar:~/tmp/t> git status fatal: Out of memory, realloc failed

This file is checked into git, but using a smudge/clean filter, so the actual data checked into git is a hash. I did so using git-annex v7 mode, but I suppose git lfs would cause the same problem.

[pid  6573] mmap(NULL, 11811164160, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)

Why status needs to mmap a large file that is not modified and that is configured to pass through smudge/clean, I don't know. It seems like it should be possible for status work in this situation.

-- 
see shy jo
Next: brian m. carlson
Message 1 of 12 in “git status OOM on mmap of large file”
  1. Joey HessJan 22, 2019
  2. brian m. carlsonJan 24, 2019
  3. Jeff KingJan 24, 2019
  4. Joey HessJan 24, 2019
  5. Jeff KingJan 24, 2019
  6. Duy NguyenJan 24, 2019
  7. Joey HessJan 24, 2019
  8. Jeff KingJan 24, 2019
  9. Jeff KingJan 24, 2019
  10. avoid unncessary malloc of whole file sizeJoey Hess, Jan 24, 2019
  11. Junio C HamanoJan 24, 2019
  12. Jeff KingJan 24, 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.