Skip to content

Install script does not exit with a non-zero exit code on a broken pipe #584

@klemmchr

Description

@klemmchr

Our nightly build of our Docker images succeeded, however the pipeline shows the following error:

02:06:38 [DBG] dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.407/dotnet-sdk-8.0.407-linux-x64.tar.gz
02:06:43 [DBG] dotnet-install: Remote file https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.407/dotnet-sdk-8.0.407-linux-x64.tar.gz size is 212950827 bytes.
02:06:43 [DBG] dotnet-install: Extracting archive from https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.407/dotnet-sdk-8.0.407-linux-x64.tar.gz
02:06:43 [DBG] dotnet-install: Downloaded file size is 212950827 bytes.
02:06:43 [DBG] dotnet-install: The remote and local file sizes are equal.
02:06:55 [DBG] dotnet-install: Installed version is 8.0.407
02:06:55 [DBG] dotnet-install: Adding to current process PATH: `/opt/.dotnet`. Note: This change will be visible only when sourcing script.
02:06:55 [DBG] dotnet-install: Note that the script does not resolve dependencies during installation.
02:06:55 [DBG] dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
02:06:55 [DBG] dotnet-install: Installation finished successfully.
02:06:55 [DBG] curl: (56) Send failure: Broken pipe
ENV DOTNET_ROOT /opt/.dotnet
ENV PATH $PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive \
    apt-get install -y --no-install-recommends \
        ca-certificates \
        libc6 \
        libgcc-s1 \
        libgssapi-krb5-2 \
        libicu74 \
        liblttng-ust1 \
        libssl3 \
        libstdc++6 \
        libunwind8 \
        libatomic1 \
        tzdata \
        zlib1g && \
    curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 8.0 --install-dir $DOTNET_ROOT && \
    curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 9.0 --install-dir $DOTNET_ROOT && \
    chmod -R 555 $DOTNET_ROOT && \
    rm -rf /var/lib/apt/lists/*

.NET 8 was installed properly while .NET 9 was not installed.

02:12:45 [DBG] Step 32/43 : RUN dotnet --info
02:12:48 [DBG]  ---> Running in cf27c4516910
02:12:48 [DBG] .NET SDK:
02:12:48 [DBG]  Version:           8.0.407
02:12:48 [DBG]  Commit:            cac65f27eb
02:12:48 [DBG]  Workload version:  8.0.400-manifests.20e9918b
02:12:48 [DBG]  MSBuild version:   17.11.26+2b19be476
02:12:48 [DBG] Runtime Environment:
02:12:48 [DBG]  OS Name:     ubuntu
02:12:48 [DBG]  OS Version:  24.04
02:12:48 [DBG]  OS Platform: Linux
02:12:48 [DBG]  RID:         linux-x64
02:12:48 [DBG]  Base Path:   /opt/.dotnet/sdk/8.0.407/
02:12:48 [DBG] .NET workloads installed:
02:12:48 [DBG] Configured to use loose manifests when installing new manifests.
02:12:48 [DBG] There are no installed workloads to display.
02:12:48 [DBG] Host:
02:12:48 [DBG]   Version:      8.0.14
02:12:48 [DBG]   Architecture: x64
02:12:48 [DBG]   Commit:       1584e49360
02:12:48 [DBG] .NET SDKs installed:
02:12:48 [DBG]   8.0.407 [/opt/.dotnet/sdk]
02:12:48 [DBG] .NET runtimes installed:
02:12:48 [DBG]   Microsoft.AspNetCore.App 8.0.14 [/opt/.dotnet/shared/Microsoft.AspNetCore.App]
02:12:48 [DBG]   Microsoft.NETCore.App 8.0.14 [/opt/.dotnet/shared/Microsoft.NETCore.App]
02:12:48 [DBG] Other architectures found:
02:12:48 [DBG]   None
02:12:48 [DBG] Environment variables:
02:12:48 [DBG]   DOTNET_ROOT       [/opt/.dotnet]
02:12:48 [DBG] global.json file:
02:12:48 [DBG]   Not found
02:12:48 [DBG] Learn more:
02:12:48 [DBG]   https://aka.ms/dotnet/info
02:12:48 [DBG] Download .NET:
02:12:48 [DBG]   https://aka.ms/dotnet/download

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions