diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-03-29 10:06:19 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-03-29 12:20:22 -0700 |
commit | 44d8dc54e73e8010c4bdf57a422fc8d5ce709029 (patch) | |
tree | 98cb72c7df0efc0d35538b26422053d13078ee1b /t/t1510-repo-setup.sh | |
parent | fetch-pack: use smaller handshake window for initial request (diff) | |
download | tgif-44d8dc54e73e8010c4bdf57a422fc8d5ce709029.tar.xz |
Fix potential local deadlock during fetch-pack
The fetch-pack/upload-pack protocol relies on the underlying transport
(local pipe or TCP socket) to have enough slack to allow one window worth
of data in flight without blocking the writer. Traditionally we always
relied on being able to have two windows of 32 "have"s in flight (roughly
3k bytes) to stream.
The recent "progressive-stride" change allows "fetch-pack" to send up to
1024 "have"s without reading any response from "upload-pack". The
outgoing pipe of "upload-pack" can be clogged with many ACK and NAK that
are unread, while "fetch-pack" is still stuffing its outgoing pipe with
more "have"s, leading to a deadlock.
Revert the change unless we are in stateless rpc (aka smart-http) mode, as
using a large window full of "have"s is still a good way to help reduce
the number of back-and-forth, and there is no buffering issue there (it is
strictly "ping-pong" without an overlap).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1510-repo-setup.sh')
0 files changed, 0 insertions, 0 deletions