Skip to content

Segmentation fault on AMD64 systems #2278

Description

@AlexNeises

Bug description

Version 5.12.1, which is used in the Datadog/datadog-sca-github-action action, will error out with a Segmentation fault when attempting to run datadog-ci version on an AMD64 system. This was tested in Docker with Ubuntu 22.

Running the same commands on Ubuntu 22 on an ARM64 system results in the expected output, v5.12.1.

This is resulting in failures in AMD64 systems.

Describe what you expected

I am expecting AMD systems to behave similar to ARM systems.

Steps to reproduce the issue

docker run --rm -it --platform linux/amd64 ubuntu:22.04 bash

apt-get update && apt-get install curl unzip;
DATADOG_CI_VERSION="5.12.1"
DATADOG_CLI_PATH="/usr/local/bin/datadog-ci"
DATADOG_CI_RELEASE_BASE="https://github.com/DataDog/datadog-ci/releases/download/v${DATADOG_CI_VERSION}"

echo "Installing 'datadog-ci' v${DATADOG_CI_VERSION}"
if [ "$(uname -m)" = "aarch64" ]; then
  DATADOG_CI_BINARY="datadog-ci_linux-arm64"
else
  DATADOG_CI_BINARY="datadog-ci_linux-x64"
fi

curl -fL -k -o "$DATADOG_CLI_PATH" "${DATADOG_CI_RELEASE_BASE}/${DATADOG_CI_BINARY}"
curl -fL -k -o /tmp/datadog-ci-checksums.txt "${DATADOG_CI_RELEASE_BASE}/checksums.txt"
grep "${DATADOG_CI_BINARY}" /tmp/datadog-ci-checksums.txt | sed "s|${DATADOG_CI_BINARY}|${DATADOG_CLI_PATH}|" | sha256sum -c - || { echo "datadog-ci checksum verification failed"; }
chmod 755 "$DATADOG_CLI_PATH"

# Check that datadog-ci was installed
if [ ! -x "$DATADOG_CLI_PATH" ]; then
    echo "The datadog-ci was not installed correctly, not found in $DATADOG_CLI_PATH."
fi

echo "Done: datadog-ci available $DATADOG_CLI_PATH"
echo "Version: $($DATADOG_CLI_PATH version)"

Additional context

No response

Command

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions