Skip to content

Working on docker + dotnet builds with both QUS and setup-qemu-action. Qus throws segmentation fault. #10

@devedse

Description

@devedse

Hey,

I'm currently trying to setup some builds for quite a complex thing I'm working on (an image optimizer which runs x86 windows applications in an ARM linux container).

I actually managed to get it all working. The strange thing is though that for some reason I can only get the build to work with the github actions task named: setup-qemu-action. Whereas I can only get running the container working with qus.

If I build the container using qus then I run into a Segmentation fault. If I run the container with setup-qemu-action I also run into a segmentation fault.

This issue I'd like to focus on building the container is not working with qus but it is working with the github task setup-qemu-action.

Here's the build where you can see it going wrong:
https://github.com/devedse/DeveImageOptimizer/runs/2343006390?check_suite_focus=true

The yaml:

  build_docker_linux_qusbuild:
    needs: generate_version_number
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Login to Docker Hub
      uses: docker/login-action@v1
      with:
        username: devedse
        password: ${{ secrets.DOCKERHUBTOKEN }}
    - name: Setup qus
      run: |
        docker run --rm --privileged aptman/qus -s -- -p
    - name: Set up Docker Buildx
      id: buildx
      uses: docker/setup-buildx-action@v1
    - name: Builder instance name
      run: echo ${{ steps.buildx.outputs.name }}
    - name: Available platforms
      run: echo ${{ steps.buildx.outputs.platforms }}
    - name: Run Buildx
      run: |
        export VERSION=1.0.${{needs.generate_version_number.outputs.build_number}}
        echo Version: $VERSION
        docker buildx build -f DeveImageOptimizer.ConsoleApp/Linux.Dockerfile --build-arg BUILD_VERSION=$VERSION --platform linux/arm64,linux/amd64 -t devedse/deveimageoptimizerconsoleapp:${{needs.generate_version_number.outputs.build_number}} -t devedse/deveimageoptimizerconsoleapp:latest --push .

Build output:

#24 [linux/arm64 build 9/9] RUN dotnet build "DeveImageOptimizer.ConsoleApp.csproj" -c Release -o /app/build
#24 sha256:448b9fe5ecc129143fcabee60dc530e38619eb2a6a7b5413e1edebca8e4afd0f
#24 67.45 /usr/share/dotnet/sdk/5.0.202/Roslyn/Microsoft.CSharp.Core.targets(71,5): error : qemu: uncaught target signal 11 (Segmentation fault) - core dumped [/src/DeveImageOptimizer/DeveImageOptimizer.csproj]
#24 68.04 
#24 68.04 Build FAILED.
#24 68.04 
#24 68.04 /usr/share/dotnet/sdk/5.0.202/Roslyn/Microsoft.CSharp.Core.targets(71,5): error : qemu: uncaught target signal 11 (Segmentation fault) - core dumped [/src/DeveImageOptimizer/DeveImageOptimizer.csproj]
#24 68.04     0 Warning(s)
#24 68.04     1 Error(s)
#24 68.05 
#24 68.05 Time Elapsed 00:00:47.97
#24 ERROR: executor failed running [/bin/sh -c dotnet build "DeveImageOptimizer.ConsoleApp.csproj" -c Release -o /app/build]: exit code: 1

#9 [linux/arm64 base  5/10] RUN if [ "linux/arm64" = "linux/arm64" ]; then         git clone --depth 1 --recurse-submodules -j8 https://github.com/devedse/hangover.git /root/hangover ;     fi
#9 sha256:98348fc916409de984e4adf6413ee670780870ea54fca0ab5a77b62aa1eecdc6
#9 CANCELED
------
 > [linux/arm64 build 9/9] RUN dotnet build "DeveImageOptimizer.ConsoleApp.csproj" -c Release -o /app/build:
------
Linux.Dockerfile:91
--------------------
  89 |     COPY . .
  90 |     WORKDIR "/src/DeveImageOptimizer.ConsoleApp"
  91 | >>> RUN dotnet build "DeveImageOptimizer.ConsoleApp.csproj" -c Release -o /app/build
  92 |     
  93 |     FROM build AS publish
--------------------
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c dotnet build "DeveImageOptimizer.ConsoleApp.csproj" -c Release -o /app/build]: exit code: 1
Error: Process completed with exit code 1.

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