random error while fetching repo submodules recursively
Hello,
Since few days I intermittently (at the beginning, then became more and more persistent) get this error while checking out a repo with submodules rescursively. The strange fact is that it was running ok, nothing changed. I can checkout the repo from anywhere else outside GH action, only happens on Windows runners (2019 and also latest)
this is the configuration:
jobs:
build-windows:
runs-on: windows-2019 # or -latest
steps:
- uses: actions/checkout@v2 # v3 makes no difference
with:
# Fetches only one commit
fetch-depth: 1
# builder private sshkey
ssh-key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
submodules: recursive
and here is the error I'm getting, please notice that it is not the same submodule failing but one between many, and it happend randomly but I'm having increasing failures.:
fetch-pack: unexpected disconnect while reading sideband packet
Error: fatal: early EOF
Error: fatal: unpack-objects failed
Error: fatal: Fetched in submodule path 'deps/submodulename', but it did not contain <commitsha>. Direct fetching of that commit failed.
this commit sha exists for sure. appearently no outages happened. I've opened a ticked into GitHub but they redirected me here. if could be of help this repo has submodules which has submodules, but the one failing most is a submodule without nested submodules
- Reproduction Steps go to Actions -> run workflow
Any tip would be appreciated, I'm stucked.
update:
also tried fetch-depth: 0 but didn't solve, a slightly difference here was that on submodule failure it retries once. A first attempt went on successfully with 1 retry, another job had multiple failure on the same submodule that set the whole run to a failed state.
Just wanted to chime in, that we also have a repo that has this issue. It affects only the Windows Runner. Linux/MacOS is working without any problems.
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
Unable to fetch in submodule path 'xxxx'; trying to directly fetch ######:
Code in the workflow:
- name: Checkout Submodule (Ref)
run: |
git submodule init
git submodule update
to inform that I've also opened a support ticked at github. It's now working on windows-2019 and I haven't made any change to the above configuration except that builds are nightly. My guess is that GH could suffer a network traffic issue and the support confirmed that it could be happening at that time. They weren't able to go deeper since I couldn't give them control to the affected repo. @paresy if you can let them in your repo try to open a ticket, this could at least help us to understand better why it happens on windows machines only.
I still get this daily, multiple times, with my windows-2022 runners. Fixes itself after restarting the run but that really shouldn't be required.
https://github.com/goatcorp/Dalamud/runs/7053836938?check_suite_focus=true
This seems to be related to OpenSSH on windows: https://github.com/PowerShell/Win32-OpenSSH/issues/1322
This might be related to this issue: https://github.com/actions/checkout/issues/1379
I mentioned there but I'm seeing the same on windows 2022 runner with repo using submodules and lfs, it has cloned successfully but it mostly doesn't and fails with:
fetch-pack: unexpected disconnect while reading sideband packet
Error: fatal: early EOF
Error: fatal: fetch-pack: invalid index-pack output
Update http.postBuffer seems like it might have made it more consistent for me:
...
- name: Set up custom git config
run: git config --global http.postBuffer 1048576000
- name: Checkout repos
uses: actions/checkout@v4
with:
submodules: 'recursive'
...
this is happening for us on a self hosted M1 machine as well, same repro same symptoms
please don't checkout