etckeeper / git / pack-objects died of signal 9

etckeeper / git / pack-objects died of signal 9

  • Written by
    Walter Doekes
  • Published on

Is your etckeeper dying on the git gc?

On several machines I have now seen git run out of memory when trying to do repo optimization and garbage collection. Usually this happened in /etc where we like to have etckeeper. It might look like this:

...
warning: The last gc run reported the following. Please correct the root cause
and remove .git/gc.log
Automatic cleanup will not be performed until the file is removed.

error: pack-objects died of signal 9
fatal: failed to run repack

A manual git gc did not help:

# git gc --prune=now
Enumerating objects: 11391, done.
Counting objects: 100% (11391/11391), done.
Delta compression using up to 2 threads
error: pack-objects died of signal 9)
fatal: failed to run repack

But combining it with a memory limit did:

# git -c pack.windowMemory=1024m gc --prune=now
Enumerating objects: 11391, done.
Counting objects: 100% (11391/11391), done.
Delta compression using up to 2 threads
Compressing objects: 100% (5664/5664), done.
Writing objects: 100% (11391/11391), done.
Total 11391 (delta 7052), reused 8042 (delta 5041), pack-reused 0

That was quite slow. But now everything is okay again.


Back to overview Newer post: gpgv / can't allocate lock for Older post: segfault in library / addr2line / objdump