title: Cannot push to remote git repo over ssh, stuck at "Writing objects: 11%"
body: <p>I'm having a problem where trying to do a git push hangs up while "Writing objects".  This is not the common scenario of Windows and git-daemon that I have seen answered elsewhere.  This is Linux to Linux, using ssh.  On both the client and server, git version is 1.7.8.6.</p>
  
  <p>I've tried doing the following:</p>
  
  <ul>
  <li>Create a local empty repo and push to that -- works fine</li>
  <li>Pull from local repo to local repo -- works fine</li>
  <li>Clone the remote repo to the local machine -- works fine</li>
  <li><code>git fsck</code> and <code>git gc</code> on both server and client repos</li>
  <li>Push to pre-existing remote repo -- hangs writing objects at 11%</li>
  <li>Create empty remote repo and push to that -- hangs writing objects at 2%</li>
  </ul>
  
  <p>There's an env variable I can set to make git produce debug messages.  Nothing useful there.</p>
  
  <p>I've talked to people at length in IRC about this, and I've tried googling it.  We're getting nowhere.  Can anyone here help me figure out what's going wrong?</p>
  
  <p>Thanks!</p>
  
  <p>UPDATE:  Based on someone's suggestion, I did an <code>strace -F</code>, and it gets stuck on a select() in a child process.  I'd provide the whole trace, but stackexchange doesn't have a way to upload.  Anyhow, here's the relevant section:</p>
  
  <pre><code>[pid 14414] getsockopt(3, SOL_SOCKET, SO_RCVBUF, [87872], [4]) = 0^M
  [pid 14414] select(7, [3 4], [3], NULL, NULL) = 2 (in [4], out [3])^M
  [pid 14414] read(4,  &lt;unfinished ...&gt;^M
  [pid 14433] &lt;... write resumed&gt; )       = 8192^M
  [pid 14433] write(1, "\262\36\237\265\234\n\332W\26\271.\250\271W\34\250N\34*\341\247R\21\177\\Dq\23\27\211\270\25"..., 8192) = 8192^M
  [pid 14433] write(1, "Y\343}z\367\31y\321)\254\236na\274\347*\253\247\264d\25\213\364\243\331\242\236\3222U3\246"..., 8192 &lt;unfinished ...&gt;^M
  [pid 14414] &lt;... read resumed&gt; "t\277\177\276\361\377\327U\361Re\f\347\300\27\3\255}E\363\2277\312p\356F\335U\345\336\250\273"..., 16384) = 16384^M
  [pid 14414] write(3, "\210y\r\202\303`\222m\216\177x \354\216Y\322n\232l\273\237\214\352\32\r\261r\311\347\356\236\26"..., 16432) = 16432^M
  [pid 14414] getsockopt(3, SOL_SOCKET, SO_RCVBUF, [87872], [4]) = 0^M
  [pid 14414] select(7, [3], [3], NULL, NULL) = 1 (out [3])^M
  [pid 14414] write(3, "\v\267\355\33\257\332\330\326\233\260;\223\212z\333\213\21'1\20\7\366\"f\253\373\0059\24\206C4"..., 5504) = 5504^M
  [pid 14414] getsockopt(3, SOL_SOCKET, SO_RCVBUF, [87872], [4]) = 0^M
  [pid 14414] select(7, [3], [], NULL, NULL &lt;unfinished ...&gt;^M
  [pid 14433] &lt;... write resumed&gt; )       = ? ERESTARTSYS (To be restarted if SA_RESTART is set)^M
  [pid 14433] --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL, si_value={int=1, ptr=0x1}} ---^M
  [pid 14433] rt_sigreturn()              = 1^M
  [pid 14433] write(1, "Y\343}z\367\31y\321)\254\236na\274\347*\253\247\264d\25\213\364\243\331\242\236\3222U3\246"..., 8192) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)^M
  [pid 14433] --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL, si_value={int=1, ptr=0x1}} ---^M
  [pid 14433] rt_sigreturn()              = 1^M
  [pid 14433] write(1, "Y\343}z\367\31y\321)\254\236na\274\347*\253\247\264d\25\213\364\243\331\242\236\3222U3\246"..., 8192) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)^M
  [pid 14433] --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL, si_value={int=1, ptr=0x1}} ---^M
  [pid 14433] rt_sigreturn()              = 1^M
  [pid 14433] write(1, "Y\343}z\367\31y\321)\254\236na\274\347*\253\247\264d\25\213\364\243\331\242\236\3222U3\246"..., 8192) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)^M
  [pid 14433] --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL, si_value={int=1, ptr=0x1}} ---^M
  [pid 14433] rt_sigreturn()              = 1^M
  </code></pre>