Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to upload Artifact: ECONNRESET and Socket Disconnection #116

Closed
2 of 6 tasks
killermoehre opened this issue Aug 17, 2020 · 13 comments
Closed
2 of 6 tasks

Failed to upload Artifact: ECONNRESET and Socket Disconnection #116

killermoehre opened this issue Aug 17, 2020 · 13 comments
Labels
bug Something isn't working

Comments

@killermoehre
Copy link

Describe the bug
While try to upload the upload fails with either ECONNRESET or socket disconnected.

Version

  • V1
  • V2

Environment

  • self-hosted
  • Linux
  • Windows
  • Mac
Run actions/upload-artifact@v2.1.4
  with:
    name: undionly.kpxe
    path: ipxe/src/bin/undionly.kpxe
    if-no-files-found: error
  env:
    GITHUB_TOKEN: ***
    filename: undionly.kpxe
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'true'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'true'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/home/runner/work/custom-ipxe/custom-ipxe/ipxe/src/bin/undionly.kpxe'
##[debug]File:/home/runner/work/custom-ipxe/custom-ipxe/ipxe/src/bin/undionly.kpxe was found using the provided searchPath
With the provided path, there will be 1 file(s) uploaded
##[debug]Root artifact directory is /home/runner/work/custom-ipxe/custom-ipxe/ipxe/src/bin
##[debug]Artifact Url: https://pipelines.actions.githubusercontent.com/bINcheClQHqTZNbVjfeRDuwAx9xssj4r3uOpnOJv4gG2xmi8qY/_apis/pipelines/workflows/212542507/artifacts?api-version=6.0-preview
##[error]Client network socket disconnected before secure TLS connection was established
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Upload bin/undionly.kpxe artifact as undionly.kpxe
Run actions/upload-artifact@v2.1.4
  with:
    name: ipxe.efi
    path: ipxe/src/bin-x86_64-efi/ipxe.efi
    if-no-files-found: error
  env:
    GITHUB_TOKEN: ***
    filename: ipxe.efi
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'true'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'true'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/home/runner/work/custom-ipxe/custom-ipxe/ipxe/src/bin-x86_64-efi/ipxe.efi'
##[debug]File:/home/runner/work/custom-ipxe/custom-ipxe/ipxe/src/bin-x86_64-efi/ipxe.efi was found using the provided searchPath
With the provided path, there will be 1 file(s) uploaded
##[debug]Root artifact directory is /home/runner/work/custom-ipxe/custom-ipxe/ipxe/src/bin-x86_64-efi
##[debug]Artifact Url: https://pipelines.actions.githubusercontent.com/bINcheClQHqTZNbVjfeRDuwAx9xssj4r3uOpnOJv4gG2xmi8qY/_apis/pipelines/workflows/212542507/artifacts?api-version=6.0-preview
##[error]read ECONNRESET
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Upload bin-x86_64-efi/ipxe.efi artifact as ipxe.efi

Run/Repo Url
https://github.com/killermoehre/custom-ipxe/runs/995234331?check_suite_focus=true
https://github.com/killermoehre/custom-ipxe/runs/995234353?check_suite_focus=true

How to reproduce
I don't know. I just run the run.

Additional context
It started suddenly with the linked run. I didn't change anything, my files are quite small, too.

@killermoehre killermoehre added the bug Something isn't working label Aug 17, 2020
@killermoehre
Copy link
Author

Btw, it works now again. This was probably a problem in the actual GitHub API. But even than shouldn't the action handle this better?

@eddieantonio
Copy link

I have also had this failure, but re-running the jobs fixes it. Flakey builds are annoying!

https://github.com/UAlbertaALTLab/gunaha/actions/runs/214200167
https://github.com/UAlbertaALTLab/gunaha/actions/runs/212474456

@konradpabjan
Copy link
Collaborator

I think I know what is going on here. During artifact upload, there are effectively 3 internal steps

  • 1 POST call to create the artifact
  • Multiple concurrent PUT calls to upload everything (depends on the size of the artifact and the number of files)
  • 1 PATCH call to indicate we are done uploading the artifact

Historically, the second step has been the flakiest since this can be hundreds or even thousands of http calls. There is a robust retry mechanism for this part of the upload (multiple retries with exponential backoff if something goes wrong). Now the first POST call (same with the last PATCH call) does not have any retry mechanism and I suspect something is failing along the way and there is no retry so it aborts and the action fails.

The specific section of code is here for those interested: https://github.com/actions/toolkit/blob/main/packages/artifact/src/internal/upload-http-client.ts#L54:L100

da-kami added a commit to comit-network/ambrosia that referenced this issue Sep 21, 2020
Due to an upload bug - actions/upload-artifact#116 - we frequently have to re-trigger the build.
It is unnecessary to publish a draft after a dependabot related build, thus exclude those PRs by dependabot user.
bors bot added a commit to comit-network/ambrosia that referenced this issue Sep 21, 2020
78: Do not publish draft release upon dependabot packaging r=mergify[bot] a=da-kami

Due to an upload bug - actions/upload-artifact#116 - we frequently have to re-trigger the build.
It is unnecessary to publish a draft after a dependabot related build, thus exclude those PRs by dependabot user.

Co-authored-by: Daniel Karzel <daniel@comit.network>
@dmbarry86
Copy link

I am experiencing this ECONNRESET issue as well. I'm trying to upload coverage artifacts. In total there are 92 files but they are all very small and the overall size of the bundle is only a few hundred kb.

@kiancross
Copy link

kiancross commented Nov 17, 2020

I'm also having this problem. I've seen it a couple of times in the past, but suddenly it's become quite frequent today. I'm trying to upload a JSON coverage artifact - the file isn't very big.

EDIT:
This is now happening frequently.

@kakuzei
Copy link

kakuzei commented Nov 19, 2020

I'm having the same issue: a lot of workflow executions failed in the last 3 days with the following error:

Run actions/upload-artifact@v2
With the provided path, there will be 31 file(s) uploaded
Error: read ECONNRESET

@peteryule
Copy link

This is now happening for us frequently in the last couple of days.

@ogrisel
Copy link

ogrisel commented Nov 23, 2020

It seems to me that it would be possible to reduce the likelihood of those failures by implementing a retry mechanism with exponential backoff:

  • try upload;
  • if it fails, print warning message and wait 1s and retry;
  • if it still fails, print warning message and wait 2s and retry;
  • if it still fails, print warning message and wait 4s and retry;
  • if it still fails, print warning message and wait 8s and retry;
  • if it still fails, print warning message and wait 16s and retry;
  • if it still fails, print error message and abort.

However I have never coded in TypeScript so I am not confident enough to try to contribute this myself.

@kakuzei
Copy link

kakuzei commented Dec 1, 2020

Hello,
We are still encountering the upload artifact issue during the execution of our workflows:

2020-11-30T16:14:03.8299997Z ##[group]Run actions/upload-artifact@v2
2020-11-30T16:14:03.8300677Z with:
2020-11-30T16:14:03.8301354Z   name: ...
2020-11-30T16:14:03.8302112Z   path: ...
2020-11-30T16:14:03.8302824Z   if-no-files-found: warn
2020-11-30T16:14:03.8303422Z env:
...
2020-11-30T16:14:03.8429868Z   ACTIONS_STEP_DEBUG: true
2020-11-30T16:14:03.8430458Z ##[endgroup]
2020-11-30T16:14:03.9223335Z With the provided path, there will be xxx file(s) uploaded
2020-11-30T16:14:05.6239533Z Total size of all the files uploaded is xxx bytes
2020-11-30T16:14:05.6390587Z ##[error]read ECONNRESET

Do you understand why I don't have any debug messages in the logs even if I set the environment variable ACTIONS_STEP_DEBUG to true ?

@jnewland
Copy link

jnewland commented Dec 9, 2020

Just adding a note here to say that I too ran into this several times this morning, paired with intermittent occurrences of actions/download-artifact#55. I'm curious if the telemetry mentioned over in #137 (comment) might be showing a trend that matches the reports in this issue.

@newhoggy
Copy link

Also ran into this issue:

image

@kroggen
Copy link

kroggen commented Dec 16, 2020

Me too, the same problem.

I just clicked on Re-run jobs

okke-formsma added a commit to okke-formsma/zmk that referenced this issue Dec 21, 2020
Build steps are often failing with "ECONNRESET" errors due to
rate-limiting by github. We usually don't need/care about the
artifacts, so don't have to fail the build when the upload fails.

related to zmkfirmware#502 and #actions/upload-artifact/issues/116
petejohanson pushed a commit to zmkfirmware/zmk that referenced this issue Dec 21, 2020
Build steps are often failing with "ECONNRESET" errors due to
rate-limiting by github. We usually don't need/care about the
artifacts, so don't have to fail the build when the upload fails.

related to #502 and #actions/upload-artifact/issues/116
btashton added a commit to apache/nuttx that referenced this issue Dec 23, 2020
We are seeing higher cases of artifact upload failures
in github.  Other projects are also seeing this as has been
reported at actions/upload-artifact#116

There is a fix that was just merged in the base library:
actions/toolkit#675

So Hopefully we can revert this before too long.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
Ouss4 pushed a commit to apache/nuttx that referenced this issue Dec 23, 2020
We are seeing higher cases of artifact upload failures
in github.  Other projects are also seeing this as has been
reported at actions/upload-artifact#116

There is a fix that was just merged in the base library:
actions/toolkit#675

So Hopefully we can revert this before too long.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
@konradpabjan
Copy link
Collaborator

konradpabjan commented Jan 4, 2021

Should be good now. Retries with exponential back-off have been added to all HTTP calls so any socket disconnects, timeouts, 503s or ECONNRESET errors should gracefully now retry and the artifact upload should go through (previously only a subset of HTTP calls during upload were retried). Recent updates should significantly improve reliability.

If this issue appears again, please open a new issue

tyalie pushed a commit to tyalie/zmk that referenced this issue Nov 15, 2022
Build steps are often failing with "ECONNRESET" errors due to
rate-limiting by github. We usually don't need/care about the
artifacts, so don't have to fail the build when the upload fails.

related to zmkfirmware#502 and #actions/upload-artifact/issues/116
yuanbin pushed a commit to yuanbin/zmk that referenced this issue Jun 14, 2023
Build steps are often failing with "ECONNRESET" errors due to
rate-limiting by github. We usually don't need/care about the
artifacts, so don't have to fail the build when the upload fails.

related to zmkfirmware#502 and #actions/upload-artifact/issues/116
think4tomorrow added a commit to think4tomorrow/zhc that referenced this issue Dec 18, 2024
Build steps are often failing with "ECONNRESET" errors due to
rate-limiting by github. We usually don't need/care about the
artifacts, so don't have to fail the build when the upload fails.

related to #502 and #actions/upload-artifact/issues/116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests