Jay Dhameliya
Jay Dhameliya

Reputation: 1699

git push to github fails with "error: pack-objects died of signal 967"

I fired this command:

git push origin master

I got this result:

Counting objects: 15626, done.
Delta compression using up to 4 threads.
error: pack-objects died of signal 967
error: pack-objects died with strange error

Upvotes: 0

Views: 2309

Answers (1)

torek
torek

Reputation: 488193

There is no signal number 967, but there is a signal number 9, which is SIGKILL on Linux and Unix systems. I think something printed a line ending in 67, then a carriage return, and then your local git pack-objects was hit by the "OOM killer".

What you need to do is give your Linux system (this is your system, not the one you're pushing to) more memory, or push smaller commits (or both). "Memory" in this case can be real, physical RAM, or virtual memory: swap space to which your system can write otherwise-idle memory contents from mostly-idle programs that are sitting around hogging memory. To get more physical memory, you can of course install more DRAM chips; or you can just exit any memory-hogging programs that you don't really need to keep running.

You can also tweak your Git's memory-usage settings, so that it takes less memory to do object compression, but usually there is no good reason to do that (unless you have a very old version of Git: newer ones detect enormous binary files and don't even attempt to compress them).

Details

When Git is doing a push, you normally see these:

Counting objects: nnnnn, done.

and:

Compressing objects:  nn% (mmmmm/nnnnn)

progress messages, to reassure you that Git is actually doing something during what otherwise might seem to be a long pause. These come from git pack-objects, which git push runs to make what Git calls a thin pack, to send to the other Git to which you're pushing data.

Your Git actually finished the "counting objects" phase and had entered the "compressing objects" phase, which is more memory-intensive.

So, git pack-objects is merrily printing progress lines:

Compressing objects:  xx% (xxxxx/xxx69)

It sends the cursor back to the start of the line after each printout, so that the next line overwrites the previous one, so that eventually it will say "100% (nnnnn/nnnnn), done." (And once it gets to that point it prints a newline, not just a carriage return.)

Sadly, at this point Linux—or whatever system you are using—decided that too many programs were using too much memory, and chose git pack-objects as the victim for its Out Of Memory killing. It killed off git pack-objects with SIGKILL, signal 9.

This made your push print:

error: pack-objects died of signal 9

atop the previous progress line, leaving:

error: pack-objects died of signal 967)

(Note: I don't know what the digits for all the x-s were, except that they must necessarily end in 67. The error message is not prefixed by remote:, but should end with signal 967)—i.e., a string with a closing parenthesis—and not just signal 967.)

The OOM killer means your system is low on memory. The fact that it picked git pack-objects as its victim does not necessarily mean that git pack-objects itself is the reason your system ran out of memory. It was just the biggest fish the system saw in the overfull fish-tank. Linux chooses to take out that one, rather than taking out five smaller fish.

Upvotes: 1

Related Questions