From: Junio C Hamano <junkio@cox.net>
To: Matthias Lederhofer <matled@gmx.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] upload-pack: fix timeout in create_pack_file
Date: Sun, 23 Jul 2006 23:23:06 -0700 [thread overview]
Message-ID: <7vd5bvh67p.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <E1G2t9n-0005PW-72@moooo.ath.cx> (Matthias Lederhofer's message of "Tue, 18 Jul 2006 19:14:51 +0200")
Matthias Lederhofer <matled@gmx.net> writes:
> Signed-off-by: Matthias Lederhofer <matled@gmx.net>
> ---
> <yacc> fatal: packfile '../linux-2.6/.git/objects/pack/tmp-7iPJo5'
> SHA1 mismatch
> <yacc> error: git-fetch-pack: unable to read from git-index-pack
> <yacc> error: git-index-pack died with error code 128
> <yacc> Any idea what this means?
> This happens after ~12 minutes. The problem is that the loop in
> upload-pack.c actually sending the pack does not reset the timeout.
> I'd guess --timeout is 600 or a bit more on git.kernel.org :)
>
> This does not help for low timeouts with slow clients. If a client is
> slow enough so the server is blocked for more time than specified by
> timeout the connection will be closed too (e.g. 15kb/s with a timeout
> of 30 (git adds 10 extra) is not enough).
Where do we add 10 extra?
> We should either add a
> warning to the man page or try to fix this. I don't know if this can
> be fixed not using non-blocking sockets.
I think the intent of "timeout" was to protect us from funny
clients by avoiding talking with the ones that take too much
time doing something that should not take too long. When we are
in create_pack_file(), we are already committed to the heaviest
operation anyway, so one possibility might be to stop doing
timeout at that point. I am not sure if that is acceptable,
though -- it opens up the daemon to even easier DoS than it
currently is.
My gut feeling is that your patch would be fine as is (have you
tried and confirmed that it helps cases other than slow
clients?)
> Perhaps support for resume would be quite useful too but I've no idea
> how hard this is to implement.
That would be _very_ hard.
next prev parent reply other threads:[~2006-07-24 6:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-18 17:14 [PATCH] upload-pack: fix timeout in create_pack_file Matthias Lederhofer
2006-07-24 6:23 ` Junio C Hamano [this message]
2006-07-24 7:10 ` Matthias Lederhofer
2006-07-24 7:55 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vd5bvh67p.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=matled@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox