buttonmen-dev / buttonmen

Buttonmen - an online dice game
Other
16 stars 24 forks source link

occasional CircleCI failure because of corrupted phantomjs tarball #3014

Open cgolubi1 opened 2 days ago

cgolubi1 commented 2 days ago

Occasionally CircleCI fails on the unpack_phantomjs step with:

#!/bin/bash -eo pipefail
/bin/tar xjf /usr/local/src/phantomjs-1.9.7-linux-x86_64.tar.bz2 --strip-components=1

bzip2: Compressed file ends unexpectedly;
        perhaps it is corrupted?  *Possible* reason follows.
bzip2: Inappropriate ioctl for device
        Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

/bin/tar: Child returned status 2
/bin/tar: Error is not recoverable: exiting now

Exited with code exit status 2

These seem to succeed on retry. When you see failures with this signature, please link them here, so we can gather data about how often this is happening, and prioritize fixing it if it's happening often.

cgolubi1 commented 2 days ago

Example: https://app.circleci.com/pipelines/github/buttonmen-dev/buttonmen/249/workflows/ea2e6e5d-bf73-4497-9a3b-d56389f0d95f/jobs/350

cgolubi1 commented 2 days ago

This failed a second time in a row: https://app.circleci.com/pipelines/github/buttonmen-dev/buttonmen/249/workflows/a2a5e1cc-0380-458f-9790-c9bd93835274/jobs/351

So maybe it's not occasional, and deployments are blocked. I'll retry again, and mark this issue critical, but don't have time to investigate right now.

cgolubi1 commented 2 days ago

Ah, from local testing of the wget:

$ wget https://bitbucket.org/ariya/phantomjs/downloads/${PHANTOMJS_VERSION_NAME}.tar.bz2 -O /tmp/${PHANTOMJS_VERSION_NAME}.tar.bz2
--2024-11-15 08:50:36--  https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
Resolving bitbucket.org (bitbucket.org)... 104.192.142.26, 104.192.142.24, 104.192.142.25
Connecting to bitbucket.org (bitbucket.org)|104.192.142.26|:443... connected.
HTTP request sent, awaiting response... 429 Too Many Requests
2024-11-15 08:50:36 ERROR 429: Too Many Requests.

So it's possible that this is an intermittent issue on bitbucket's end. It's also possible that we should cache this ancient version of phantomjs we require somewhere ourselves.

cgolubi1 commented 2 days ago

Succeeded on the third try: https://app.circleci.com/pipelines/github/buttonmen-dev/buttonmen/249/workflows/d683d414-4770-4843-ac35-94e47ad8af7e

So back to the original description - this is an intermittent issue, if it starts happening more often, we should take some action.