{"thread":{"id":"59798","subject":"git fetch recursion problem","startedAt":"2023-05-27T17:57:56Z","lastAt":"2023-06-19T18:40:30Z","messageCount":5,"participants":["Fraser Hanson","Glen Choo"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"477761","messageId":"CA+3o5aPQ3BkbAn3u6qSMCkAfNgTcpjT+_ikdqAkkc69NBGybpw@mail.gmail.com","threadId":"59798","inReplyTo":null,"subject":"git fetch recursion problem","fromName":"Fraser Hanson","fromEmail":"fraser.hanson@gmail.com","sentAt":"2023-05-27T17:57:45Z","receivedAt":"2023-05-27T17:57:56Z","isPatch":false,"sender":{"key":"fraser.hanson@gmail.com","avatar":null},"body":"I have some git repositories in a state where `git fetch` recursively\nspawns subprocesses until all system resources are used up and the OS\nlocks up.\nThis has been reproduced on debian with git 2.39.2, and on macos with\ngit 2.40.1.\n\nThe repositories being tracked are mirrors of github repos, within a\nsecure corporate environment.\n\nDuring the problem, the `ps aux` output looks like this:\n    fhanson     3187  0.0  0.0  11400  5092 ?        S    12:58   0:00\n             \\_ git fetch --recurse-submodules --tags --force\n--progress\n    fhanson     3195  0.0  0.0   9932  3372 ?        S    12:58   0:00\n             |   \\_ /usr/lib/git-core/git remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/lewis6991/gitsigns.nvim.git\n    fhanson     3207  0.3  0.0 101608 16004 ?        S    12:58   0:00\n             |       \\_ /usr/lib/git-core/git-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/lewis6991/gitsigns.nvim.git\n    fhanson     3555  0.0  0.0  10292  4788 ?        S    12:58   0:00\n             |           \\_ /usr/lib/git-core/git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n    fhanson     3583  0.0  0.0   9932  3956 ?        S    12:58   0:00\n             |               \\_ /usr/lib/git-core/git remote-https\norigin https://repomirror.eng.corporate.com/github-neovim/lewis6991/gitsigns.nvim.git\n    fhanson     3592  0.3  0.0 101600 16156 ?        S    12:58   0:00\n             |                   \\_ /usr/lib/git-core/git-remote-https\norigin https://repomirror.eng.corporate.com/github-neovim/lewis6991/gitsigns.nvim.git\n    ... repeating forever!\n\nThe git config for these repositories looks like this:\n\n    $ cat .git/config\n    [core]\n        repositoryformatversion = 1\n        filemode = true\n        bare = false\n        logallrefupdates = true\n    [submodule]\n        active = .\n    [remote \"origin\"]\n        url = https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n        fetch = +refs/heads/*:refs/remotes/origin/*\n        promisor = true\n        partialclonefilter = blob:none\n    [branch \"master\"]\n        remote = origin\n        merge = refs/heads/master\n\nThe git trace output looks like this (some server names redacted):\n    $ export GIT_TRACE=1\n    $ git fetch\n    07:41:19.325652 git.c:439               trace: built-in: git fetch\n    07:41:19.330118 run-command.c:655       trace: run_command:\nGIT_DIR=.git git remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:19.337765 git.c:725               trace: exec:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:19.338220 run-command.c:655       trace: run_command:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:20.664527 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n    07:41:20.679814 git.c:439               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n    07:41:20.681735 run-command.c:655       trace: run_command: git\nremote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:20.692494 git.c:725               trace: exec:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:20.693132 run-command.c:655       trace: run_command:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:21.695677 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n    07:41:21.715621 git.c:439               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n    07:41:21.717230 run-command.c:655       trace: run_command: git\nremote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:21.727616 git.c:725               trace: exec:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:21.728337 run-command.c:655       trace: run_command:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:22.801117 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n    07:41:22.816026 git.c:439               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n    07:41:22.817972 run-command.c:655       trace: run_command: git\nremote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:22.828436 git.c:725               trace: exec:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:22.829219 run-command.c:655       trace: run_command:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:24.242220 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n    07:41:24.257211 git.c:439               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n    07:41:24.259264 run-command.c:655       trace: run_command: git\nremote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:24.269718 git.c:725               trace: exec:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:24.270612 run-command.c:655       trace: run_command:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:25.306129 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n    07:41:25.320842 git.c:439               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n    07:41:25.322801 run-command.c:655       trace: run_command: git\nremote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:25.332775 git.c:725               trace: exec:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:25.333522 run-command.c:655       trace: run_command:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:26.332580 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n    07:41:26.348349 git.c:439               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n    07:41:26.350225 run-command.c:655       trace: run_command: git\nremote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:26.361171 git.c:725               trace: exec:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:26.361969 run-command.c:655       trace: run_command:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:27.585641 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n    07:41:27.600316 git.c:439               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n    07:41:27.602370 run-command.c:655       trace: run_command: git\nremote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:27.611823 git.c:725               trace: exec:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:27.612607 run-command.c:655       trace: run_command:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:28.666477 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n    07:41:28.678956 git.c:439               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n    07:41:28.680665 run-command.c:655       trace: run_command: git\nremote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:28.690534 git.c:725               trace: exec:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:41:28.691277 run-command.c:655       trace: run_command:\ngit-remote-https origin\nhttps://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n    ^C\n\n\nRandom clues and experiments:\n\nA `git clone` from our corporate mirrors always succeeds.  Immediately\nafter a `git clone`, I am always able to `git fetch`, so far.\nSomething else must cause the repository to enter a broken state,\npossibly the addition of upstream commits.  I can't verify that since\nI can't complete `git fetch.`\n\nI can fix a broken repository by deleting these settings from `.git/config`:\n        promisor = true\n        partialclonefilter = blob:none\nAfter this, `git fetch` succeeds.\nDeleting just one of these settings is not sufficient, it must be both.\n\nI copied one such broken repository out of our secure environment onto\na mac laptop that has access to both our mirror sites and to the\ninternet.\nI verified that `git fetch` from our mirror is still broken on the mac.\nThen I modified .git/config to point to the https://github.com/ url\ninstead of our mirror site, leaving the 'promisor' and\n'partialclonefilter' settings in place.\nRunning `git fetch` in this state succeeded.\n\nThis suggests that our internal mirror site is returning something\ndifferent from github itself.\n\n\nHere is the trace from successfully fetching from github.com:\n    $ git fetch\n    07:43:30.901275 git.c:439               trace: built-in: git fetch\n    07:43:30.904188 run-command.c:655       trace: run_command:\nGIT_DIR=.git git remote-https origin\nhttps://github.com/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:43:30.917345 git.c:725               trace: exec:\ngit-remote-https origin\nhttps://github.com/nvim-treesitter/nvim-treesitter-textobjects.git\n    07:43:30.918560 run-command.c:655       trace: run_command:\ngit-remote-https origin\nhttps://github.com/nvim-treesitter/nvim-treesitter-textobjects.git\n    remote: Enumerating objects: 8, done.\n    remote: Counting objects: 100% (8/8), done.\n    remote: Compressing objects: 100% (5/5), done.\n    07:43:31.714337 run-command.c:655       trace: run_command: git\nindex-pack --stdin -v --fix-thin --promisor --pack_header=2,8\n    remote: Total 8 (delta 2), reused 5 (delta 1), pack-reused 0\n    07:43:31.729793 git.c:439               trace: built-in: git\nindex-pack --stdin -v --fix-thin --promisor --pack_header=2,8\n    Receiving objects: 100% (8/8), 3.36 KiB | 3.36 MiB/s, done.\n    Resolving deltas: 100% (2/2), completed with 1 local object.\n    07:43:31.738815 run-command.c:655       trace: run_command: git\nrev-list --objects --stdin --exclude-promisor-objects --not --all\n--quiet --alternate-refs\n    07:43:31.748286 git.c:439               trace: built-in: git\nrev-list --objects --stdin --exclude-promisor-objects --not --all\n--quiet --alternate-refs\n    From https://github.com/nvim-treesitter/nvim-treesitter-textobjects\n       9c5237b..95b76b9  master        -> origin/master\n       9c5237b..11ae4c7  update-readme -> origin/update-readme\n    07:43:31.757504 run-command.c:1524      run_processes_parallel:\npreparing to run up to 1 tasks\n    07:43:31.757515 run-command.c:1551      run_processes_parallel: done\n    07:43:31.757522 run-command.c:655       trace: run_command: git\nmaintenance run --auto --no-quiet\n    07:43:31.765282 git.c:439               trace: built-in: git\nmaintenance run --auto --no-quiet\n\nThe difference starts just a few lines in, my failed fetches never see this:\n    remote: Counting objects: 100% (8/8), done.\n    remote: Compressing objects: 100% (5/\n\nNext I enabled both GIT_TRACE and GIT_CURL_VERBOSE to identify\ndifferences in the HTTP conversation between a failed fetch versus a\nsuccessful one.\nThe successful run was made by deleting the `promisor` and\n`partialclonefilter` settings from .git/config.\nI'm having some some trouble attaching these to this email, I'll have\nto include them in a follow up.\n\nNothing jumped out at me here but I'm no expert.\n\n\nIs this a git bug, or a server misconfiguration, or both?\n"},{"id":"477821","messageId":"CA+3o5aMu+_7x8WJUfjzR5OBBJPQS+hytuf+Xu+5NY6T8NscgJQ@mail.gmail.com","threadId":"59798","inReplyTo":"CA+3o5aPQ3BkbAn3u6qSMCkAfNgTcpjT+_ikdqAkkc69NBGybpw@mail.gmail.com","subject":"Re: git fetch recursion problem","fromName":"Fraser Hanson","fromEmail":"fraser.hanson@gmail.com","sentAt":"2023-05-30T19:11:47Z","receivedAt":"2023-05-30T19:12:07Z","isPatch":false,"sender":{"key":"fraser.hanson@gmail.com","avatar":null},"body":"Following is output from `GIT_CURL_VERBOSE=1 git fetch`.\n\nEach git-remote-https process spawns a sub-process that calls GET\n/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git/info/refs?service=git-upload-pack\nHTTP/1.1\nThere is no error, only an HTTP 200 OK response so it is unclear why\ngit is unsatisfied with the results of this call.\n\n09:24:59.990256 git.c:439               trace: built-in: git fetch\n09:24:59.992794 run-command.c:655       trace: run_command:\nGIT_DIR=.git git remote-https origin\nhttps://repomirror.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n09:25:00.006532 git.c:725               trace: exec: git-remote-https\norigin https://repomirror.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n09:25:00.007191 run-command.c:655       trace: run_command:\ngit-remote-https origin\nhttps://repomirror.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n09:25:00.023290 http.c:699              == Info: Couldn't find host\nrepomirror.corporate.com in the (nil) file; using defaults\n09:25:00.029420 http.c:699              == Info:   Trying 10.60.16.190:443...\n09:25:00.137589 http.c:699              == Info: Connected to\nrepomirror.corporate.com (10.60.16.190) port 443 (#0)\n09:25:00.137756 http.c:699              == Info: ALPN: offers h2\n09:25:00.137774 http.c:699              == Info: ALPN: offers http/1.1\n09:25:00.144804 http.c:699              == Info:  CAfile: /etc/ssl/cert.pem\n09:25:00.144822 http.c:699              == Info:  CApath: none\n09:25:00.145105 http.c:699              == Info: [CONN-0-0][CF-SSL]\n(304) (OUT), TLS handshake, Client hello (1):\n09:25:00.247453 http.c:699              == Info: [CONN-0-0][CF-SSL]\n(304) (IN), TLS handshake, Server hello (2):\n09:25:00.247781 http.c:699              == Info: [CONN-0-0][CF-SSL]\nTLSv1.2 (IN), TLS handshake, Certificate (11):\n09:25:00.250670 http.c:699              == Info: [CONN-0-0][CF-SSL]\nTLSv1.2 (IN), TLS handshake, Server key exchange (12):\n09:25:00.251240 http.c:699              == Info: [CONN-0-0][CF-SSL]\nTLSv1.2 (IN), TLS handshake, Server finished (14):\n09:25:00.257051 http.c:699              == Info: [CONN-0-0][CF-SSL]\nTLSv1.2 (OUT), TLS handshake, Client key exchange (16):\n09:25:00.257084 http.c:699              == Info: [CONN-0-0][CF-SSL]\nTLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):\n09:25:00.257145 http.c:699              == Info: [CONN-0-0][CF-SSL]\nTLSv1.2 (OUT), TLS handshake, Finished (20):\n09:25:00.353682 http.c:699              == Info: [CONN-0-0][CF-SSL]\nTLSv1.2 (IN), TLS change cipher, Change cipher spec (1):\n09:25:00.354049 http.c:699              == Info: [CONN-0-0][CF-SSL]\nTLSv1.2 (IN), TLS handshake, Finished (20):\n09:25:00.354143 http.c:699              == Info: SSL connection using\nTLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384\n09:25:00.354190 http.c:699              == Info: ALPN: server did not\nagree on a protocol. Uses default.\n09:25:00.354222 http.c:699              == Info: Server certificate:\n09:25:00.354274 http.c:699              == Info:  subject: C=US;\nST=California; O=Company, Inc.; CN=proxy.corporate.com\n09:25:00.354303 http.c:699              == Info:  start date: Jun 11\n00:00:00 2022 GMT\n09:25:00.354327 http.c:699              == Info:  expire date: Jun 11\n23:59:59 2024 GMT\n09:25:00.354400 http.c:699              == Info:  subjectAltName: host\n\"repomirror.corporate.com\" matched cert's \"repomirror.corporate.com\"\n09:25:00.354452 http.c:699              == Info:  issuer: C=GB;\nST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA\nOrganization Validation Secure Server CA\n09:25:00.354476 http.c:699              == Info:  SSL certificate verify ok.\n09:25:00.354624 http.c:646              => Send header, 0000000295\nbytes (0x00000127)\n09:25:00.354660 http.c:658              => Send header: GET\n/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git/info/refs?service=git-upload-pack\nHTTP/1.1\n09:25:00.354680 http.c:658              => Send header: Host:\nrepomirror.corporate.com\n09:25:00.354699 http.c:658              => Send header: User-Agent: git/2.40.1\n09:25:00.354717 http.c:658              => Send header: Accept: */*\n09:25:00.354736 http.c:658              => Send header:\nAccept-Encoding: deflate, gzip\n09:25:00.354755 http.c:658              => Send header:\nAccept-Language: en-CA, *;q=0.9\n09:25:00.354827 http.c:658              => Send header: Pragma: no-cache\n09:25:00.354921 http.c:658              => Send header: Git-Protocol: version=2\n09:25:00.354940 http.c:658              => Send header:\n09:25:00.453443 http.c:699              == Info: Mark bundle as not\nsupporting multiuse\n09:25:00.453568 http.c:646              <= Recv header, 0000000017\nbytes (0x00000011)\n09:25:00.453586 http.c:658              <= Recv header: HTTP/1.1 200 OK\n09:25:00.453602 http.c:646              <= Recv header, 0000000037\nbytes (0x00000025)\n09:25:00.453617 http.c:658              <= Recv header: Date: Mon, 29\nMay 2023 16:25:00 GMT\n09:25:00.453632 http.c:646              <= Recv header, 0000000033\nbytes (0x00000021)\n09:25:00.453646 http.c:658              <= Recv header: Server:\nApache/2.2.15 (Red Hat)\n09:25:00.453661 http.c:646              <= Recv header, 0000000046\nbytes (0x0000002e)\n09:25:00.453674 http.c:658              <= Recv header: Last-Modified:\nSun, 28 May 2023 10:15:35 GMT\n09:25:00.453689 http.c:646              <= Recv header, 0000000037\nbytes (0x00000025)\n09:25:00.453703 http.c:658              <= Recv header: ETag:\n\"42e2b247-4a13-5fcbe403f497b\"\n09:25:00.453750 http.c:646              <= Recv header, 0000000022\nbytes (0x00000016)\n09:25:00.453808 http.c:658              <= Recv header: Accept-Ranges: bytes\n09:25:00.453851 http.c:646              <= Recv header, 0000000023\nbytes (0x00000017)\n09:25:00.453874 http.c:658              <= Recv header: Content-Length: 18963\n09:25:00.453890 http.c:646              <= Recv header, 0000000019\nbytes (0x00000013)\n09:25:00.453904 http.c:658              <= Recv header: Connection: close\n09:25:00.453919 http.c:646              <= Recv header, 0000000041\nbytes (0x00000029)\n09:25:00.453932 http.c:658              <= Recv header: Content-Type:\ntext/plain; charset=UTF-8\n09:25:00.453949 http.c:646              <= Recv header, 0000000002\nbytes (0x00000002)\n09:25:00.453964 http.c:658              <= Recv header:\n09:25:00.551101 http.c:699              == Info: Closing connection 0\n09:25:00.551165 http.c:699              == Info: [CONN-0-0][CF-SSL]\nTLSv1.2 (IN), TLS alert, close notify (256):\n09:25:00.551212 http.c:699              == Info: [CONN-0-0][CF-SSL]\nTLSv1.2 (OUT), TLS alert, close notify (256):\n09:25:00.551491 http.c:699              == Info: Couldn't find host\nrepomirror.corporate.com in the (nil) file; using defaults\n09:25:00.551509 http.c:699              == Info: Hostname\nrepomirror.corporate.com was found in DNS cache\n09:25:00.551561 http.c:699              == Info:   Trying 10.60.16.190:443...\n09:25:00.658191 http.c:699              == Info: Connected to\nrepomirror.corporate.com (10.60.16.190) port 443 (#1)\n09:25:00.658452 http.c:699              == Info: ALPN: offers h2\n09:25:00.658479 http.c:699              == Info: ALPN: offers http/1.1\n09:25:00.658552 http.c:699              == Info: SSL re-using session ID\n09:25:00.658784 http.c:699              == Info: [CONN-1-0][CF-SSL]\nTLSv1.2 (OUT), TLS handshake, Client hello (1):\n09:25:00.755274 http.c:699              == Info: [CONN-1-0][CF-SSL]\nTLSv1.2 (IN), TLS handshake, Server hello (2):\n09:25:00.755437 http.c:699              == Info: [CONN-1-0][CF-SSL]\nTLSv1.2 (IN), TLS change cipher, Change cipher spec (1):\n09:25:00.755535 http.c:699              == Info: [CONN-1-0][CF-SSL]\nTLSv1.2 (IN), TLS handshake, Finished (20):\n09:25:00.755555 http.c:699              == Info: [CONN-1-0][CF-SSL]\nTLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):\n09:25:00.755586 http.c:699              == Info: [CONN-1-0][CF-SSL]\nTLSv1.2 (OUT), TLS handshake, Finished (20):\n09:25:00.755660 http.c:699              == Info: SSL connection using\nTLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384\n09:25:00.755679 http.c:699              == Info: ALPN: server did not\nagree on a protocol. Uses default.\n09:25:00.755693 http.c:699              == Info: Server certificate:\n09:25:00.755694 http.c:699              == Info:  subject: C=US;\nST=California; O=Company, Inc.; CN=proxy.corporate.com\n09:25:00.755740 http.c:699              == Info:  start date: Jun 11\n00:00:00 2022 GMT\n09:25:00.755749 http.c:699              == Info:  expire date: Jun 11\n23:59:59 2024 GMT\n09:25:00.755848 http.c:699              == Info:  subjectAltName: host\n\"repomirror.corporate.com\" matched cert's \"repomirror.corporate.com\"\n09:25:00.755879 http.c:699              == Info:  issuer: C=GB;\nST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA\nOrganization Validation Secure Server CA\n09:25:00.755888 http.c:699              == Info:  SSL certificate verify ok.\n09:25:00.755959 http.c:646              => Send header, 0000000241\nbytes (0x000000f1)\n09:25:00.755976 http.c:658              => Send header: GET\n/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git/HEAD\nHTTP/1.1\n09:25:00.755983 http.c:658              => Send header: Host:\nrepomirror.corporate.com\n09:25:00.755989 http.c:658              => Send header: User-Agent: git/2.40.1\n09:25:00.755995 http.c:658              => Send header: Accept: */*\n09:25:00.756001 http.c:658              => Send header:\nAccept-Encoding: deflate, gzip\n09:25:00.756008 http.c:658              => Send header:\nAccept-Language: en-CA, *;q=0.9\n09:25:00.756015 http.c:658              => Send header: Pragma: no-cache\n09:25:00.756022 http.c:658              => Send header:\n09:25:00.852762 http.c:699              == Info: Mark bundle as not\nsupporting multiuse\n09:25:00.852921 http.c:646              <= Recv header, 0000000017\nbytes (0x00000011)\n09:25:00.852996 http.c:658              <= Recv header: HTTP/1.1 200 OK\n09:25:00.853018 http.c:646              <= Recv header, 0000000037\nbytes (0x00000025)\n09:25:00.853033 http.c:658              <= Recv header: Date: Mon, 29\nMay 2023 16:25:00 GMT\n09:25:00.853049 http.c:646              <= Recv header, 0000000033\nbytes (0x00000021)\n09:25:00.853063 http.c:658              <= Recv header: Server:\nApache/2.2.15 (Red Hat)\n09:25:00.853078 http.c:646              <= Recv header, 0000000046\nbytes (0x0000002e)\n09:25:00.853091 http.c:658              <= Recv header: Last-Modified:\nTue, 09 May 2023 13:33:51 GMT\n09:25:00.853106 http.c:646              <= Recv header, 0000000035\nbytes (0x00000023)\n09:25:00.853184 http.c:658              <= Recv header: ETag:\n\"4319f275-17-5fb42ce4c3e23\"\n09:25:00.853209 http.c:646              <= Recv header, 0000000022\nbytes (0x00000016)\n09:25:00.853357 http.c:658              <= Recv header: Accept-Ranges: bytes\n09:25:00.853513 http.c:646              <= Recv header, 0000000020\nbytes (0x00000014)\n09:25:00.853535 http.c:658              <= Recv header: Content-Length: 23\n09:25:00.853551 http.c:646              <= Recv header, 0000000019\nbytes (0x00000013)\n09:25:00.853565 http.c:658              <= Recv header: Connection: close\n09:25:00.853582 http.c:646              <= Recv header, 0000000041\nbytes (0x00000029)\n09:25:00.853595 http.c:658              <= Recv header: Content-Type:\ntext/plain; charset=UTF-8\n09:25:00.853613 http.c:646              <= Recv header, 0000000002\nbytes (0x00000002)\n09:25:00.853626 http.c:658              <= Recv header:\n09:25:00.853701 http.c:699              == Info: Closing connection 1\n09:25:00.853746 http.c:699              == Info: [CONN-1-0][CF-SSL]\nTLSv1.2 (IN), TLS alert, close notify (256):\n09:25:00.853818 http.c:699              == Info: [CONN-1-0][CF-SSL]\nTLSv1.2 (OUT), TLS alert, close notify (256):\n09:25:00.860085 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n09:25:00.872999 git.c:439               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n09:25:00.874628 run-command.c:655       trace: run_command: git\nremote-https origin\nhttps://repomirror.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n09:25:00.884027 git.c:725               trace: exec: git-remote-https\norigin https://repomirror.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n...\n\nFrom this point it repeats until killed (start over from line 3, git.c:725...)\n\nI put together what I think is an equivalent curl command.  Running\nthis command does return a list of refs.\n\ncurl -isSL --user-agent 'git/2.40.1' -v\nhttps://repomirror.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git/info/refs\\?service\\=git-upload-pack\n\nThe log output shows a TLS result code 256 which looked suspicious to\nme.  However the curl command shows an identical TLS notify code after\nfetching the list of refs.\n\nAny clues as to how to debug this further would be appreciated, I'm stuck.\n"},{"id":"477905","messageId":"kl6lzg5iztzw.fsf@chooglen-macbookpro.roam.corp.google.com","threadId":"59798","inReplyTo":"CA+3o5aPQ3BkbAn3u6qSMCkAfNgTcpjT+_ikdqAkkc69NBGybpw@mail.gmail.com","subject":"Re: git fetch recursion problem","fromName":"Glen Choo","fromEmail":"chooglen@google.com","sentAt":"2023-06-01T22:40:35Z","receivedAt":"2023-06-01T22:40:42Z","isPatch":false,"sender":{"key":"glencbz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/58092771?v=4"},"body":"Fraser Hanson <fraser.hanson@gmail.com> writes:\n\n> The git trace output looks like this (some server names redacted):\n>     $ export GIT_TRACE=1\n>     $ git fetch\n>     07:41:19.325652 git.c:439               trace: built-in: git fetch\n>     07:41:19.330118 run-command.c:655       trace: run_command:\n> GIT_DIR=.git git remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:19.337765 git.c:725               trace: exec:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:19.338220 run-command.c:655       trace: run_command:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:20.664527 run-command.c:655       trace: run_command: git -c\n> fetch.negotiationAlgorithm=noop fetch origin --no-tags\n> --no-write-fetch-head --recurse-submodules=no --filter=blob:none\n> --stdin\n>     07:41:20.679814 git.c:439               trace: built-in: git fetch\n> origin --no-tags --no-write-fetch-head --recurse-submodules=no\n> --filter=blob:none --stdin\n>     07:41:20.681735 run-command.c:655       trace: run_command: git\n> remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:20.692494 git.c:725               trace: exec:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:20.693132 run-command.c:655       trace: run_command:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:21.695677 run-command.c:655       trace: run_command: git -c\n> fetch.negotiationAlgorithm=noop fetch origin --no-tags\n> --no-write-fetch-head --recurse-submodules=no --filter=blob:none\n> --stdin\n>     07:41:21.715621 git.c:439               trace: built-in: git fetch\n> origin --no-tags --no-write-fetch-head --recurse-submodules=no\n> --filter=blob:none --stdin\n>     07:41:21.717230 run-command.c:655       trace: run_command: git\n> remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:21.727616 git.c:725               trace: exec:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:21.728337 run-command.c:655       trace: run_command:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:22.801117 run-command.c:655       trace: run_command: git -c\n> fetch.negotiationAlgorithm=noop fetch origin --no-tags\n> --no-write-fetch-head --recurse-submodules=no --filter=blob:none\n> --stdin\n>     07:41:22.816026 git.c:439               trace: built-in: git fetch\n> origin --no-tags --no-write-fetch-head --recurse-submodules=no\n> --filter=blob:none --stdin\n>     07:41:22.817972 run-command.c:655       trace: run_command: git\n> remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:22.828436 git.c:725               trace: exec:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:22.829219 run-command.c:655       trace: run_command:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:24.242220 run-command.c:655       trace: run_command: git -c\n> fetch.negotiationAlgorithm=noop fetch origin --no-tags\n> --no-write-fetch-head --recurse-submodules=no --filter=blob:none\n> --stdin\n>     07:41:24.257211 git.c:439               trace: built-in: git fetch\n> origin --no-tags --no-write-fetch-head --recurse-submodules=no\n> --filter=blob:none --stdin\n>     07:41:24.259264 run-command.c:655       trace: run_command: git\n> remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:24.269718 git.c:725               trace: exec:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:24.270612 run-command.c:655       trace: run_command:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:25.306129 run-command.c:655       trace: run_command: git -c\n> fetch.negotiationAlgorithm=noop fetch origin --no-tags\n> --no-write-fetch-head --recurse-submodules=no --filter=blob:none\n> --stdin\n>     07:41:25.320842 git.c:439               trace: built-in: git fetch\n> origin --no-tags --no-write-fetch-head --recurse-submodules=no\n> --filter=blob:none --stdin\n>     07:41:25.322801 run-command.c:655       trace: run_command: git\n> remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:25.332775 git.c:725               trace: exec:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:25.333522 run-command.c:655       trace: run_command:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:26.332580 run-command.c:655       trace: run_command: git -c\n> fetch.negotiationAlgorithm=noop fetch origin --no-tags\n> --no-write-fetch-head --recurse-submodules=no --filter=blob:none\n> --stdin\n>     07:41:26.348349 git.c:439               trace: built-in: git fetch\n> origin --no-tags --no-write-fetch-head --recurse-submodules=no\n> --filter=blob:none --stdin\n>     07:41:26.350225 run-command.c:655       trace: run_command: git\n> remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:26.361171 git.c:725               trace: exec:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:26.361969 run-command.c:655       trace: run_command:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:27.585641 run-command.c:655       trace: run_command: git -c\n> fetch.negotiationAlgorithm=noop fetch origin --no-tags\n> --no-write-fetch-head --recurse-submodules=no --filter=blob:none\n> --stdin\n>     07:41:27.600316 git.c:439               trace: built-in: git fetch\n> origin --no-tags --no-write-fetch-head --recurse-submodules=no\n> --filter=blob:none --stdin\n>     07:41:27.602370 run-command.c:655       trace: run_command: git\n> remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:27.611823 git.c:725               trace: exec:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:27.612607 run-command.c:655       trace: run_command:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:28.666477 run-command.c:655       trace: run_command: git -c\n> fetch.negotiationAlgorithm=noop fetch origin --no-tags\n> --no-write-fetch-head --recurse-submodules=no --filter=blob:none\n> --stdin\n>     07:41:28.678956 git.c:439               trace: built-in: git fetch\n> origin --no-tags --no-write-fetch-head --recurse-submodules=no\n> --filter=blob:none --stdin\n>     07:41:28.680665 run-command.c:655       trace: run_command: git\n> remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:28.690534 git.c:725               trace: exec:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:41:28.691277 run-command.c:655       trace: run_command:\n> git-remote-https origin\n> https://repomirror.eng.corporate.com/github-neovim/nvim-treesitter/nvim-treesitter-textobjects.git\n>     ^C\n>\n>\n> Random clues and experiments:\n>\n> A `git clone` from our corporate mirrors always succeeds.  Immediately\n> after a `git clone`, I am always able to `git fetch`, so far.\n> Something else must cause the repository to enter a broken state,\n> possibly the addition of upstream commits.  I can't verify that since\n> I can't complete `git fetch.`\n>\n> I can fix a broken repository by deleting these settings from `.git/config`:\n>         promisor = true\n>         partialclonefilter = blob:none\n> After this, `git fetch` succeeds.\n> Deleting just one of these settings is not sufficient, it must be both.\n>\n> I copied one such broken repository out of our secure environment onto\n> a mac laptop that has access to both our mirror sites and to the\n> internet.\n> I verified that `git fetch` from our mirror is still broken on the mac.\n> Then I modified .git/config to point to the https://github.com/ url\n> instead of our mirror site, leaving the 'promisor' and\n> 'partialclonefilter' settings in place.\n> Running `git fetch` in this state succeeded.\n>\n> This suggests that our internal mirror site is returning something\n> different from github itself.\n>\n>\n> Here is the trace from successfully fetching from github.com:\n>     $ git fetch\n>     07:43:30.901275 git.c:439               trace: built-in: git fetch\n>     07:43:30.904188 run-command.c:655       trace: run_command:\n> GIT_DIR=.git git remote-https origin\n> https://github.com/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:43:30.917345 git.c:725               trace: exec:\n> git-remote-https origin\n> https://github.com/nvim-treesitter/nvim-treesitter-textobjects.git\n>     07:43:30.918560 run-command.c:655       trace: run_command:\n> git-remote-https origin\n> https://github.com/nvim-treesitter/nvim-treesitter-textobjects.git\n>     remote: Enumerating objects: 8, done.\n>     remote: Counting objects: 100% (8/8), done.\n>     remote: Compressing objects: 100% (5/5), done.\n>     07:43:31.714337 run-command.c:655       trace: run_command: git\n> index-pack --stdin -v --fix-thin --promisor --pack_header=2,8\n>     remote: Total 8 (delta 2), reused 5 (delta 1), pack-reused 0\n>     07:43:31.729793 git.c:439               trace: built-in: git\n> index-pack --stdin -v --fix-thin --promisor --pack_header=2,8\n>     Receiving objects: 100% (8/8), 3.36 KiB | 3.36 MiB/s, done.\n>     Resolving deltas: 100% (2/2), completed with 1 local object.\n>     07:43:31.738815 run-command.c:655       trace: run_command: git\n> rev-list --objects --stdin --exclude-promisor-objects --not --all\n> --quiet --alternate-refs\n>     07:43:31.748286 git.c:439               trace: built-in: git\n> rev-list --objects --stdin --exclude-promisor-objects --not --all\n> --quiet --alternate-refs\n>     From https://github.com/nvim-treesitter/nvim-treesitter-textobjects\n>        9c5237b..95b76b9  master        -> origin/master\n>        9c5237b..11ae4c7  update-readme -> origin/update-readme\n>     07:43:31.757504 run-command.c:1524      run_processes_parallel:\n> preparing to run up to 1 tasks\n>     07:43:31.757515 run-command.c:1551      run_processes_parallel: done\n>     07:43:31.757522 run-command.c:655       trace: run_command: git\n> maintenance run --auto --no-quiet\n>     07:43:31.765282 git.c:439               trace: built-in: git\n> maintenance run --auto --no-quiet\n>\n> The difference starts just a few lines in, my failed fetches never see this:\n>     remote: Counting objects: 100% (8/8), done.\n>     remote: Compressing objects: 100% (5/\n>\n> Next I enabled both GIT_TRACE and GIT_CURL_VERBOSE to identify\n> differences in the HTTP conversation between a failed fetch versus a\n> successful one.\n> The successful run was made by deleting the `promisor` and\n> `partialclonefilter` settings from .git/config.\n> I'm having some some trouble attaching these to this email, I'll have\n> to include them in a follow up.\n\nThis looks a lot like the partial clone fetch is recursing infinitely.\nThis could happen if Git encountered a missing object, initiated a\npartial clone fetch to get the missing object, then in the process of\nthat fetch it encountered a missing object, initiated a partial clone\nfetch to get the missing object, then (etc etc etc).\n\nI don't have good clues as to why that might be the case though.\n\nWild speculation: Does this reproduce if you clone without submodules,\nor if you pass --no-recurse-submodules to \"git fetch\"? In a non-partial\nclone fetch, \"git fetch\" may read .gitmodules to get submodule\ninformation. Perhaps something similar is happening in the partial clone\nfetch.\n"},{"id":"477908","messageId":"CA+3o5aNgChKi-m6F_sYr4Sc+VXP-K2BCMpTpY8Km+kH5u9tkCQ@mail.gmail.com","threadId":"59798","inReplyTo":"kl6lzg5iztzw.fsf@chooglen-macbookpro.roam.corp.google.com","subject":"Re: git fetch recursion problem","fromName":"Fraser Hanson","fromEmail":"fraser.hanson@gmail.com","sentAt":"2023-06-01T22:57:39Z","receivedAt":"2023-06-01T22:57:57Z","isPatch":false,"sender":{"key":"fraser.hanson@gmail.com","avatar":null},"body":"Thanks for the theory!\n\nThis repo has no .gitmodules file.\nI tried running `git fetch --no-recurse-submodules` in one of my\nbroken repos, but it does not prevent the bug from happening.\n\nI also tried removing the submodule configuration in .git/config, that\nhad no effect either.\n\nMaybe something is unusual on the server side.  I've set up my own git\nserver attempting to reproduce similar apache and git versions as on\nour corporate mirror but so far cannot reproduce the bug.\nI've compared the GIT_CURL_VERBOSE output to what I get for the same\nrepo from github, but it's not very helpful.\nGithub uses HTTP2 and my git client sends different service api calls\nto github so there's not much basis for comparison here.\n\nMy main theory was that maybe the server-side git version was too old\nto handle partial clones properly.\nPartial clones were introduced in git 2.25.  On my test git server, I\nset the server-side git version to 2.7.2.\nThis did not reproduce the bug -- on the client side using a recent\ngit version, I was still able to pull partial clones and then fetch\nfrom origin after my local copy went out of date.\n"},{"id":"478531","messageId":"CA+3o5aO8oGnSLwTB52nHPsfCU0tSpkkkDV3dZcZ-8vt=BhoNAA@mail.gmail.com","threadId":"59798","inReplyTo":"CA+3o5aNgChKi-m6F_sYr4Sc+VXP-K2BCMpTpY8Km+kH5u9tkCQ@mail.gmail.com","subject":"Re: git fetch recursion problem","fromName":"Fraser Hanson","fromEmail":"fraser.hanson@gmail.com","sentAt":"2023-06-19T18:40:12Z","receivedAt":"2023-06-19T18:40:30Z","isPatch":false,"sender":{"key":"fraser.hanson@gmail.com","avatar":null},"body":"I figured out what is going on here.\nThis problem is caused by the server configuration, but git should\nhandle this more gracefully because it is easy to hit this problem and\nthe consequence are severe.\n\nThe root cause is that the git server is using the git \"dumb http\" protocol.\nThe git server runs apache configured like this:\n    <Directory \"/srv/git\">\n        Options +Indexes\n        AllowOverride None\n        Order allow,deny\n        Allow from all\n    </Directory>\n\nApache does not pass requests to git-http-backend.\nThe server's /srv/git/ dir contains bare git repositories created with\n`git clone --mirror`.\nThe repositories on the server must be prepared before download with\n`git update-server-info`.\n\nThis is how the bug develops.\n\n### git client requests a partial clone from the server:\n$ git clone --filter=blob:none  http://172.20.208.191/git/kmarius/jsregexp.git\n\n### git clone succeeds, but there are no *.promisor files (these\nshould exist for a partial clone)\n$ cd jsregexp\n$ find .git -name \\*.promisor | wc -l\n0\n\n### the cloned repository is still configured as a partial clone\n$ cat .git/config\n[core]\n    repositoryformatversion = 1\n    filemode = true\n    bare = false\n    logallrefupdates = true\n[remote \"origin\"]\n    url = http://172.20.208.191/git/kmarius/jsregexp.git\n    fetch = +refs/heads/*:refs/remotes/origin/*\n    promisor = true\n    partialclonefilter = blob:none\n[branch \"master\"]\n    remote = origin\n    merge = refs/heads/master\n\n### git pull works, as long as there are no new commits added to the\nserver's git repo\n$ git pull\nAlready up to date.\n\n### Next, add a commit into the server's git repository.\n### Then update the server's git repository with this:\nserver# cd /srv/git/kmarius/jsregexp.git\nserver# git update-server-info\n\n### Back on the client side, git pull is now broken:\n\n$ GIT_TRACE=1 git fetch 2>&1 | head -20\n14:21:03.574765 git.c:460               trace: built-in: git fetch\n14:21:03.575455 run-command.c:655       trace: run_command:\nGIT_DIR=.git git remote-http origin\nhttp://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.578239 git.c:750               trace: exec: git-remote-http\norigin http://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.578349 run-command.c:655       trace: run_command:\ngit-remote-http origin http://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.590589 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n14:21:03.593654 git.c:460               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n14:21:03.594362 run-command.c:655       trace: run_command: git\nremote-http origin http://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.597148 git.c:750               trace: exec: git-remote-http\norigin http://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.597253 run-command.c:655       trace: run_command:\ngit-remote-http origin http://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.609592 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n14:21:03.612749 git.c:460               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n14:21:03.613392 run-command.c:655       trace: run_command: git\nremote-http origin http://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.616123 git.c:750               trace: exec: git-remote-http\norigin http://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.616235 run-command.c:655       trace: run_command:\ngit-remote-http origin http://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.630921 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n14:21:03.634074 git.c:460               trace: built-in: git fetch\norigin --no-tags --no-write-fetch-head --recurse-submodules=no\n--filter=blob:none --stdin\n14:21:03.634746 run-command.c:655       trace: run_command: git\nremote-http origin http://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.636388 git.c:750               trace: exec: git-remote-http\norigin http://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.636443 run-command.c:655       trace: run_command:\ngit-remote-http origin http://172.20.208.191/git/kmarius/jsregexp.git\n14:21:03.649168 run-command.c:655       trace: run_command: git -c\nfetch.negotiationAlgorithm=noop fetch origin --no-tags\n--no-write-fetch-head --recurse-submodules=no --filter=blob:none\n--stdin\n...\n\nThis will repeat forever, repeatedly spawning sub-processes.\n\nThe impact can be severe.  I discovered this while using Neovim's\nlazy.nvim plugin manager within a secure, firewalled environment\nwithout internet access. The editor is configured to pull packages\nfrom an intranet mirror site containing bare clones of GitHub\nprojects.  The multi-threaded lazy.nvim plugin manager attempts to\nupdate all 30 or so repositories in my configuration simultaneously.\nAll of the repos with fresh commits on our dumb http mirror server hit\nthe bug, causes many git processes to spawn very fast.  The system\nlocks up in seconds, the OOM killer shows up too late to save it.\n\nGit should handle this situation better.  The following would be nice:\n* when the http dumb protocol is used for clone or fetch, log an\ninfo-level message which is visible with GIT_TRACE\n* when a git partial clone is performed over dumb http protocol, log a\nwarning-level message explaining that the resulting repo may be broken\n* when a 'git fetch' is done from a broken repository, don't\nrepeatedly spawn git-remote-http processes forever\n"}]}