On Fri, Jun 12, 2015 at 10:31:33AM -0700, Shawn Pearce wrote: > I did something stupid like trying to push a copy of WebKit[1] into my > GitHub account. This is ~5.2 GiB of data, which GitHub prefers not to > accept. Ok ... Heh, yeah. We cap it at 2G, and if you are going to have a WebKit fork, we prefer you fork the actual WebKit repo so it shares objects (though if you have a need to create a new fork network, let me know). > $ git push --all git@xxxxxxxxxx:spearce/wk.git > Counting objects: 2752427, done. > Delta compression using up to 12 threads. > Compressing objects: 100% (442684/442684), done. > remote: fatal: pack exceeds maximum allowed size > Writing objects: 100% (2752427/2752427), 5.28 GiB | 8.86 MiB/s, done. > Total 2752427 (delta 2225007), reused 2752427 (delta 2225007) > fatal: The remote end hung up unexpectedly > fatal: The remote end hung up unexpectedly > > Notice GitHub prints "remote: fatal: pack exceeds maximum allowed > size". That interrupted my "Writing objects" progress meter, and then > git push just kept going and wrote really really fast (170 MiB/s!) > until the entire pack was sent. Sounds like it's writing to a closed fd, then. Which makes sense; I think we should hang up the socket after writing the "fatal" message above. > Shouldn't git push realize its stream is broken and stop writing when > the peer is all like "uh, no, I'm not going to do that, but thanks for > trying"? Hrm. I have this old patch, which was originally written so that "kill $(pidof git-push)" did not let a rogue pack-objects continue writing. I'm not sure if that's what is going on here, though. I think we connect pack-objects directly to the socket. So it sounds more like "pack-objects --stdout" needs to know to stop writing when writes to the socket fail. -- >8 -- Date: Sun, 3 Apr 2011 20:53:08 -0400 Subject: [PATCH] send-pack: kill pack-objects helper on signal or exit We spawn an external pack-objects process to actually send objects to the remote side. If we are killed by a signal during this process, the pack-objects will keep running and complete the push, which may surprise the user. We should take it down when we go down. Signed-off-by: Jeff King <peff@xxxxxxxx> --- send-pack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/send-pack.c b/send-pack.c index 2a64fec..bdf723b 100644 --- a/send-pack.c +++ b/send-pack.c @@ -67,6 +67,7 @@ static int pack_objects(int fd, struct ref *refs, struct sha1_array *extra, stru po.in = -1; po.out = args->stateless_rpc ? -1 : fd; po.git_cmd = 1; + po.clean_on_exit = 1; if (start_command(&po)) die_errno("git pack-objects failed"); -- 2.4.2.752.geeb594a -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html