tags:

views:

1319

answers:

3

Hi

I have been pushing to this repo successfully for some time, it started giving me the following error from no where, any ideas why it is happening?

Ishaqs-Mac:source ishaq$ git push
Counting objects: 68, done.
Delta compression using 2 threads.
Compressing objects: 100% (50/50), done.
Connection to SERVER closed by remote host.
error: pack-objects died with strange error
error: failed to push some refs to 'SERVER:PROJECT.git'

appreciate your time and help.

+3  A: 

Couple of points to check out:

  • problem of disk space on the pushing side (like "out of disk space" in $GIT_DIR or $TMP_DIR ?)

  • right issues (under which account the process is executed ?)

  • Platform-specific issue: on Mac OS, you can have a MacPort configuration problem.

  • difference of version between the git on the pushing side and the one on the remote site (meaning for instance if you try to push submodules on the remote peer, with a git binary which doesn't know about submodule, you could have some trouble like this)

Note: Since is an error message associated with the pack_object() function, so check if git pack still works.

static void pack_objects(int fd, struct ref *refs)
{
    for (;;) {
     int status, code;
     pid_t waiting = waitpid(pid, &status, 0);
     if (waiting < 0) {
      if (errno == EINTR)
       continue;
      return error("waitpid failed (%s)", strerror(errno));
     }
     if ((waiting != pid) || WIFSIGNALED(status) ||
         !WIFEXITED(status))
      return error("pack-objects died with strange error");
     code = WEXITSTATUS(status);
     if (code)
      return -code;
     return 0;
    }
}

Note-bis: there are some recent cases for this error message when pushing to GitHub (late January 2009)

VonC
Thanks, - I have installed git via installer (not Mac ports) could I still have this MacPorts specific problem?- the repository has same permissions as every other repo- server has 1.5.4, but if this was the problem, it should have been there before - git repack works fine
ishaq
I just cloned the repo to a different location, and tried to push, it works fine. don't know what's wrong with existing copy, it has 7,8 local commits so I can't just discard it :(
ishaq
+3  A: 

Unfortunately, the error messages aren't very helpful. But your problem isn't coming from Git pack; the first error message is from OpenSSH, which was able to reach the remote server but not sign in:

Connection to SERVER closed by remote host.

This is not a password problem (which has a different error message) but could be a permissions problem (like a group that doesn't have proper permission, which I see occasionally on OSX) or an unrecognized account name (on some systems this reports with password problems) or a timeout. You might try signing in from the command line:

$ ssh username@servername

to discover what kind of problem you are having. You might also try repairing permissions; OS X seems particularly vulnerable to recurring permissions problems and to running from odd groups.

Sidenote -- since you're on Leopard, I suggest you install SSHKeychain, which manages SSH identities and will store your SSH passphrases in the system keychain automatically. It won't help your current problem, but might prevent similar problems in the future.

Paul
Hi Paul,I already have keychain installed and I can login to my server just f through my keys :-)had cloned to a different location and it allowed me to push from there. tried to create and apply patches to that location, didn't work, trailing whitespace errorstoday I pushed it from my office
ishaq
Interesting. I don't see how that led to these error messages, but as I said, the error messages don't help much. Congrats on getting it resolved.
Paul
A: 

If you happen to be using a code review tool such as gerrit, and you get this when you try to push code, it might be because java programs are generally awesome at memory management. And you won't find anyone on the internet that can help you, until you, in desperation, decide to kill gerrit and restart it. And then poof, your problem goes away... until a few days later when you'll need to restart gerrit again for the same issue.

Java is awesome.

no, as I said, the only thing which bothers me when I push from any other location than my home (office, coffee shop, etc), it works fine. doesn't work from home. I am not on java.
ishaq