From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF1E4C4363A for ; Wed, 14 Oct 2020 18:35:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B4442222A for ; Wed, 14 Oct 2020 18:35:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=bastelstu.be header.i=@bastelstu.be header.b="DM+O7vgR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389144AbgJNSfj (ORCPT ); Wed, 14 Oct 2020 14:35:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389127AbgJNSfi (ORCPT ); Wed, 14 Oct 2020 14:35:38 -0400 X-Greylist: delayed 590 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 14 Oct 2020 11:35:38 PDT Received: from chrono.xqk7.com (mail.chrono.xqk7.com [IPv6:2a01:4f8:150:6153:beef::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A9DEC061755 for ; Wed, 14 Oct 2020 11:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1602699945; bh=14LsyXaUEhcaU++k0fLlKkSI7zcS74FrOAHtSemvUZg=; h=To:References:Cc:From:Subject:Date:In-Reply-To:From; b=DM+O7vgRvXGjWReANco8tJXu1PPCOEPeTsmYVKvs/g/EB/PA6vgZNJhlCFoyryF2k BpEN7PY9MRG/W/aXxOVjMXPFyluZqzbtKM8UrWJUaOj5h9QQ7Ohmf+sOR2W9LFmAL6 oQUC0i4zLTsOOoCmCZ8/hJ34sW5Yp/bVuE95IB5TGOQALGJNbW2RvxjpyZq6IHD+dA 3kpkbMnm8aBElQ2rq/F7yCG6lG7GWF+laczQee91WBYzeOdwas3yvrYgyURTovrVl3 Le/pNHKbcqP3l1EhrgZPGFBXGaP1yVrKAlxdlfIip1XVrl/5klav4DplU4QpttzvDV mDz39Wr56NvRw== To: git@vger.kernel.org References: Cc: Hongyi Zhao , Willy Tarreau From: =?UTF-8?Q?Tim_D=c3=bcsterhus?= Autocrypt: addr=timwolla@googlemail.com; prefer-encrypt=mutual; keydata= xsDiBEp4RjERBADS2mpyB7QAFM2JbgCNMbhxOCCvwm4uakKOaL8Csjb3ZyEFxs4e6pxCikJX U3ZxByA5tPv5C6RnSdizx7D/5Xj1W+DsYGRj9cSj+TKaIeZgyFi8V1jGMd42cvn4X8YXnu5W DZFwClOdS+cN8EgnrW+5l/HK8OxixiSctD1dorzIQwCgnZX+oW7O+IErYRKWPGEd8DVh/kUD /RvL7qH/q0oPYVzQ+aLyQLoMd38bcMfeHK0Ays6z7yZWomngznRtfqxD6RNnRQbfytmlRIka 7MB+dkn+In3d6h5wAZFxLCHRk/Gn53+Ddxs9/Lb+kDlSHLQ23vZOBWiEpJ5++qOV9E5TOLhP W47D2cnHSyzQiFoif/q3Aiqj20diA/0Ss/fB1eOV6gNaMPbFfPMDvGslAe5x5qb0ZmlUSAKN xlqB2jDD3mXQqVP2Qxtjt6xOuCu0MzxPhBoGN6nyxkIgpPKWDDRGEcQfcZPJfq/nZ+Jyh+SV la3bLIRfDQ0+fuHQ4UeRdCmZ7738WWBel5iOhk6hvdOtMtwRN5T0q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W4TW3jg6j6J1CZKszEJaMAbqmzFz 8axAXLmKJ5BB1BGPTFlJiY8kqeKGver40AKWgbDbJGoFAiW8TI/WUYjmclsgxSEIfweiYfv9 McPU8Q9LIr34Fy0MjNpxbGbgbNkzwcEMLG8Vi3TR5pxwdSewSt+SjyRJdauFbiUvdeKlVu9N J8q8vrk1A+3CSQQYEQIACQUCTimSuQIbDAAKCRBXjoZ92bSMeAJaAJ9FPFigeO+ECi9ospMU +Bgib+6sdwCfW+JcQNcwH+1TmKlFaXiqXZXMElQ= Subject: Unable to get pack file - HTTP 416 [was: error: Unable to get pack file] Message-ID: <419fd4ad-f9c2-927c-7ae0-c6083f70dcba@bastelstu.be> Date: Wed, 14 Oct 2020 20:25:44 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi List, Hongyi, Willy, [please leave me in Cc, I am not subscribed] Am 20.06.20 um 16:58 schrieb Hongyi Zhao: > I have a local repo mirror for https://source.winehq.org/git/wine.git > which was updated some time ago. When I try to update the local repo > to its latest version, I meet the following error message: > > $ git pull > error: Unable to get pack file > https://source.winehq.org/git/wine.git/objects/pack/pack-3776ee1d93e316ed56507e9062d8fc8e5c07feed.pack > The requested URL returned error: 416 Requested Range Not Satisfiable > error: Unable to find 6ed1d04b1325d4c2480907b76b8b1d5529caebab under > https://source.winehq.org/git/wine.git > Cannot obtain needed object 6ed1d04b1325d4c2480907b76b8b1d5529caebab > while processing commit bf454cc39428fc5299e5c26d9c0ddc6a9277c7ae. > error: fetch failed. > > Any suggestions for this problem? > I experienced the same issue yesterday with the canonical git repository of HAProxy [0]. The git repository uses the dumb HTTP transport. I am using git 2.28.0 from the `git-core` PPA for Ubuntu: https://launchpad.net/~git-core/+archive/ubuntu/ppa I attempted to update the repository using `git fetch` as usual, but interrupted the fetch with Ctrl+C, because it appeared stuck. It did not return in tens of seconds, while it usually updates in single-digit seconds. Afterwards I retried the operation, but it failed with the same error message Hongyi experienced in June. I could track the issue down to the following: 1. git already downloaded all the bytes of the pack file in question. 2. When retrying the `git fetch` git attempted to resume the download by sending a `Range` request. 3. Because the file was complete git was sending an invalid `Range`. 4. The nginx at haproxy.org returned the HTTP 416 in response, causing git to fail. I could fix the issue by truncating the temporary pack file to be 1 Byte smaller than before. I suspect deleting the temporary file would also have worked. Even after truncation the operation took quite a while. I am not sure what git was doing under the hood. The network connection was not the limiting factor there. Neither running `git fsck` nor `git gc` was able to fix the issue. I had to edit around in the `.git/objects/` folder. I would claim that this behavior is a bug in git, because I was unable to fix my repository with regular git commands. The next repack on the server might or might not have fixed the issue. I believe one of the following suggestions should prevent this issue from happening: 1. Retry without the `Range` header when receiving a 416 in response. 2. Checking the returned `Content-Range` to check whether the full pack is already downloaded and then ignoring the error status. 3. Deleting the temporary packfile in progress when resuming the download fails. Then the next retry would have worked from my understanding. Please see the following link to mail-archive.com for my initial thread on the HAProxy mailing list. It might contain additional details: https://www.mail-archive.com/haproxy@formilux.org/msg38650.html Best regards Tim Düsterhus [0] https://git.haproxy.org/git/haproxy.git/