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

::error::other side closed failed in riscv64 #495

Open
3 tasks done
duguying opened this issue Jan 9, 2025 · 3 comments
Open
3 tasks done

::error::other side closed failed in riscv64 #495

duguying opened this issue Jan 9, 2025 · 3 comments

Comments

@duguying
Copy link

duguying commented Jan 9, 2025

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

::error::other side closed error stable occurrence.
hardware: starfive visionfive2
os: base image ubuntu:latest (riscv64)

➜  riscv64 git:(master) uname -a
Linux ubuntu 6.2.0-39-generic #40.1-Ubuntu SMP Fri Dec  1 11:12:19 UTC 2023 riscv64 riscv64 riscv64 GNU/Linux

pipeline platform: gitea action

Image

dockerfile:

# syntax=docker/dockerfile:1

FROM alpine AS base

# arm64-specific stage
FROM ubuntu:latest AS build-arm64
RUN echo "This stage is used on arm64"

# amd64-specific stage
FROM ubuntu:latest AS build-amd64
RUN echo "This stage is used on amd64 (x86)"

# amd64-specific stage
FROM ubuntu:latest AS build-riscv64
RUN echo "This stage is used on amd64 (x86)"

# common steps
FROM build-${TARGETARCH} AS build
RUN echo "This stage is used on all architectures"

FROM build

COPY "./cargo" "~/.cargo"

RUN apt update -y && apt install git build-essential wget pkg-config libssl-dev -y

# install rust
ENV RUSTUP_HOME=/usr/local/rustup \
    CARGO_HOME=/usr/local/cargo \
    PATH=/usr/local/cargo/bin:$PATH

RUN set -eux; \
    dpkgArch="$(dpkg --print-architecture)"; \
    case "${dpkgArch##*-}" in \
    amd64) rustArch='x86_64-unknown-linux-gnu' ;; \
    arm64) rustArch='aarch64-unknown-linux-gnu' ;; \
    riscv64) rustArch='riscv64gc-unknown-linux-gnu' ;; \
    *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
    esac; \
    \
    url="https://static.rust-lang.org/rustup/dist/${rustArch}/rustup-init"; \
    wget "$url"; \
    chmod +x rustup-init; \
    ./rustup-init -y --no-modify-path --default-toolchain stable; \
    rm rustup-init; \
    chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
    rustup --version; \
    cargo --version; \
    rustc --version; \
    cargo install wasm-pack; \
    cargo install --force cbindgen; \
    cargo install --force typst-cli;

# install nodejs
RUN apt-get update -y && apt-get install -y ca-certificates curl gnupg rinse; \
    curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
    NODE_MAJOR=20; \
    echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list; \
    apt-get update && apt-get install nodejs -y

# install golang
RUN dpkgArch="$(dpkg --print-architecture)"; \
    gopkg="go1.21.6.linux-${dpkgArch}"; \
    wget "https://go.dev/dl/${gopkg}.tar.gz"; \
    tar zxf "./${gopkg}.tar.gz"; \
    rm "./${gopkg}.tar.gz"; \
    mv ./go /usr/local/;

ENV PATH=/usr/local/go/bin:$PATH

# install docker-ce-cli
RUN dpkgArch="$(dpkg --print-architecture)"; \
    if [ "$dpkgArch" = "riscv64" ]; then \
    wget https://github.com/carlosedp/riscv-bringup/releases/download/v1.0/docker-v19.03.8-dev_riscv64.deb; \
    apt install ./docker-v19.03.8-dev_riscv64.deb -y; \
    rm docker-v19.03.8-dev_riscv64.deb; \
    else \
    apt-get update; \
    apt-get install ca-certificates curl gnupg; \
    install -m 0755 -d /etc/apt/keyrings; \
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg; \
    chmod a+r /etc/apt/keyrings/docker.gpg; \
    echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
    $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
    tee /etc/apt/sources.list.d/docker.list > /dev/null; \
    apt-get update -y; \
    apt-get install docker-ce-cli -y; \
    fi

Expected behaviour

run metadata will

Actual behaviour

::error::other side closed error stable occurrence.

Repository URL

No response

Workflow run URL

No response

YAML workflow

name: ci

on:
  push:
    tags:
      - '*'

env:
  GITEA_REPO: git.duguying.net/duguying/runner-base

jobs:
  build:
    runs-on: ${{ matrix.platform }}
    strategy:
      fail-fast: false
      matrix:
        platform:
          - linux/amd64
          - linux/arm64
          - linux/riscv64
    steps:
      - name: Prepare
        run: |
          platform=${{ matrix.platform }}
          echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV

      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: |
            ${{ env.GITEA_REPO }}

      - name: Log in to Gitea Docker Registry
        uses: docker/login-action@v3
        with:
          registry: git.duguying.net
          username: ${{ vars.DOCKER_GITEA_USERNAME }}
          password: ${{ secrets.DOCKER_GITEA_TOKEN }}

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Build and push by digest
        id: build
        uses: docker/build-push-action@v6
        with:
          platforms: ${{ matrix.platform }}
          labels: ${{ steps.meta.outputs.labels }}
          outputs: type=image,"name=${{ env.GITEA_REPO }}",push-by-digest=true,name-canonical=true,push=true

      - name: Export digest
        run: |
          set -x #echo on
          mkdir -p /tmp/digests
          digest="${{ steps.build.outputs.digest }}"
          touch "/tmp/digests/${digest#sha256:}"

      - name: Upload digest
        uses: actions/upload-artifact@v3
        with:
          name: digests-${{ env.PLATFORM_PAIR }}
          path: /tmp/digests/*
          if-no-files-found: error
          retention-days: 1

  merge:
    runs-on: ubuntu-latest
    needs:
      - build
    steps:
      - name: Download digests
        uses: actions/download-artifact@v3
        with:
          path: /tmp/digests
          pattern: digests-*
          merge-multiple: true

      - name: Organize digests
        run: |
          set -x #echo on
          mv /tmp/digests/*/* /tmp/digests
          rm -rf /tmp/digests/digests-*
          ls -al /tmp/digests

      - name: Log in to Gitea Docker Registry
        uses: docker/login-action@v3
        with:
          registry: git.duguying.net
          username: ${{ vars.DOCKER_GITEA_USERNAME }}
          password: ${{ secrets.DOCKER_GITEA_TOKEN }}

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: |
            ${{ env.GITEA_REPO }}
          tags: |
            type=ref,event=branch
            type=ref,event=pr
            type=semver,pattern={{version}}
            type=semver,pattern={{major}}.{{minor}}

      - name: Create manifest list and push
        working-directory: /tmp/digests
        run: |
          set -x #echo on
          echo "$DOCKER_METADATA_OUTPUT_JSON"
          ls -al /tmp/digests
          docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
            $(printf '${{ env.GITEA_REPO }}@sha256:%s ' *)

      - name: Inspect image
        run: |
          docker buildx imagetools inspect ${{ env.GITEA_REPO }}:${{ steps.meta.outputs.version }}

Workflow logs

No response

BuildKit logs


Additional info

No response

@crazy-max
Copy link
Member

::error::other side closed error stable occurrence.

I don't think this is an issue with the action itself but the runner on riscv64. Can you try adding the actions/checkout right before - name: Docker meta step?

@duguying
Copy link
Author

duguying commented Jan 9, 2025

::error::other side closed error stable occurrence.

I don't think this is an issue with the action itself but the runner on riscv64. Can you try adding the actions/checkout right before - name: Docker meta step?

checkout runing well. but the metadata still failed. release-build (linux_riscv64)-1159.log

Image

@duguying
Copy link
Author

duguying commented Jan 10, 2025

docker version

➜  riscv64 git:(master) docker version
Client:
 Version:           26.1.3
 API version:       1.45
 Go version:        go1.22.2
 Git commit:        26.1.3-0ubuntu1~24.04.1
 Built:             Mon Oct 14 14:29:26 2024
 OS/Arch:           linux/riscv64
 Context:           default

Server:
 Engine:
  Version:          26.1.3
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.22.2
  Git commit:       26.1.3-0ubuntu1~24.04.1
  Built:            Mon Oct 14 14:29:26 2024
  OS/Arch:          linux/riscv64
  Experimental:     false
 containerd:
  Version:          1.7.12
  GitCommit:        
 runc:
  Version:          1.1.12-0ubuntu3.1
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit:        

os version(i've upgrade to ubuntu 24.04 noble)
ubuntu 24.04

but it still errorred

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

No branches or pull requests

2 participants