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

aws-c-common - run_cbmc_proofs failing at "Install latest CBMC" stage #200

Open
jaisnan opened this issue Sep 7, 2023 · 2 comments
Open

Comments

@jaisnan
Copy link

jaisnan commented Sep 7, 2023

The step install latest CBMC in aws-c-common's run_cbmc_proofs CI workflow seems to be failing sporadically. Sometimes the failure disappears when the CI job is re-run but sometimes the failure does not disappear.

The error looks like:

jq: error (at <stdin>:1): Cannot index string with string "assets"
Error: Process completed with exit code 1.

Here's a link to a failed run: https://github.com/awslabs/aws-c-common/actions/runs/6043368449/job/16400257070?pr=1054

@angelonakos
Copy link
Contributor

Currently, the latest CBMC is being installed this way:

https://github.com/model-checking/cbmc-starter-kit/blob/master/src/cbmc_starter_kit/template-for-ci-workflow/proof_ci.yaml#L64-L70

# Search within 5 most recent releases for latest available package
CBMC_REL="https://api.github.com/repos/diffblue/cbmc/releases?page=1&per_page=5"
CBMC_DEB=$(curl -s $CBMC_REL | jq -r '.[].assets[].browser_download_url' | grep -e 'ubuntu-20.04' | head -n 1)
CBMC_ARTIFACT_NAME=$(basename $CBMC_DEB)
curl -o $CBMC_ARTIFACT_NAME -L $CBMC_DEB
sudo dpkg -i $CBMC_ARTIFACT_NAME
rm ./$CBMC_ARTIFACT_NAME

The latest CBMC release can be fetched by sending a request to:

https://api.github.com/repos/diffblue/cbmc/releases/latest

The response needs to be parsed with jq differently. The asset, whose name starts with/contains "ubuntu-20.04" is the asset whose browser_download_url is needed for the subsequent curl -o command

@qinheping
Copy link

An attempt fix of this issue: awslabs/aws-c-common#1057.

The same failure is also observed in s2n-tls: aws/s2n-tls#4223

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants