ypapax
February 18, 2019, 8:56am
1
Today my balena build fails on line
[main] Step 12/62 : RUN cd $GOPATH/src/github.com/myCompany/myApp/app/apps/myApp && CGO_ENABLED=1 go build -o /myApp -ldflags “-linkmode external -extldflags -static”
[main] —> Running in df912e2f65c7
[main] qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[main]
[main] Segmentation fault (core dumped)
Or sometimes it prints still working
for a long time:
[main] —> Running in 5a867524296c
[Info] Still working…
[Info] Still working…
[Info] Still working…
In the beginning of the build it prints:
[Info] Running locally emulated build
[Info] Pulling previous images for caching purposes...
Usually, it works though. I don’t see any problem on status page
1 Like
Hey,
Did you explicitly request an emulated build?
Qemu is known to be unreliable with go compilations, and we would always recommend using our native arm builders instead (and they’ll also provide much faster builds).
Occassionally network hiccups can cause the builder to fallback to an emulated build, perhaps this is what happened? In that case you should be able to repush, get a native ARM builder, and your build will succeed.
Misiu
April 7, 2025, 10:08am
16
I have the exact same error on .NET9 Blazor app.
I get the same error when trying to build docker image using
docker build --platform linux/arm64/v8 -f OmniCuroNext.Web/Dockerfile .
balena cli is using docker, so I think this is docker issue
mpous
April 8, 2025, 10:11am
17
Hello @Misiu could you please share the error log that you get?
Thanks!
Misiu
April 16, 2025, 12:35pm
18
I have .NET 9 app I’m trying to build. I’m on Windows 10, Docker Desktop 4.40.0 (187762) .
I get this errors:
PS C:\Users\Tomek\Source\repos\OmniCuroNext> docker build --platform linux/arm64/v8 -f OmniCuroNext.Web/Dockerfile .
[+] Building 65.3s (14/18) docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.41kB 0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:9.0 0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:9.0 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 464B 0.0s
=> [build 1/8] FROM mcr.microsoft.com/dotnet/sdk:9.0 0.0s
=> [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:9.0 0.0s
=> [internal] load build context 0.2s
=> => transferring context: 24.58kB 0.2s
=> CACHED [build 2/8] WORKDIR /src 0.0s
=> CACHED [build 3/8] COPY [OmniCuroNext.Web/OmniCuroNext.Web.csproj, OmniCuroNext.Web/] 0.0s
=> CACHED [build 4/8] COPY [OmniCuroNext.ServiceDefaults/OmniCuroNext.ServiceDefaults.csproj, OmniCuroNext.ServiceDefaults/] 0.0s
=> CACHED [build 5/8] RUN dotnet restore "./OmniCuroNext.Web/OmniCuroNext.Web.csproj" 0.0s
=> [build 6/8] COPY . . 0.2s
=> [build 7/8] WORKDIR /src/OmniCuroNext.Web 0.1s
=> ERROR [build 8/8] RUN dotnet build "./OmniCuroNext.Web.csproj" -c Release -o /app/build 64.6s
------
> [build 8/8] RUN dotnet build "./OmniCuroNext.Web.csproj" -c Release -o /app/build:
34.97 Determining projects to restore...
52.39 All projects are up-to-date for restore.
59.97 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
64.55 Segmentation fault (core dumped)
------
Dockerfile:19
--------------------
17 | COPY . .
18 | WORKDIR "/src/OmniCuroNext.Web"
19 | >>> RUN dotnet build "./OmniCuroNext.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build
20 |
21 | # This stage is used to publish the service project to be copied to the final stage
--------------------
ERROR: failed to solve: process "/bin/sh -c dotnet build \"./OmniCuroNext.Web.csproj\" -c $BUILD_CONFIGURATION -o /app/build" did not complete successfully: exit code: 139
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/d40lvec31zzuy4i85ape1uwys
PS C:\Users\Tomek\Source\repos\OmniCuroNext>
Logs in Docker desktop:
[internal] load build definition from Dockerfile
transferring 1.4 kB 0.0s
[internal] load metadata for mcr.microsoft.com/dotnet/sdk:9.0
[internal] load metadata for mcr.microsoft.com/dotnet/aspnet:9.0
[internal] load .dockerignore
[build 1/8] FROM mcr.microsoft.com/dotnet/sdk:9.0
[base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:9.0
[internal] load build context
transferring 24 kB 0.1s
[build 2/8] WORKDIR /src
[build 3/8] COPY [OmniCuroNext.Web/OmniCuroNext.Web.csproj, OmniCuroNext.Web/]
[build 4/8] COPY [OmniCuroNext.ServiceDefaults/OmniCuroNext.ServiceDefaults.csproj, OmniCuroNext.ServiceDefaults/]
[build 6/8] COPY . .
[build 5/8] RUN dotnet restore "./OmniCuroNext.Web/OmniCuroNext.Web.csproj"
[build 7/8] WORKDIR /src/OmniCuroNext.Web
[build 8/8] RUN dotnet build "./OmniCuroNext.Web.csproj" -c Release -o /app/build
Determining projects to restore...
All projects are up-to-date for restore.
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault (core dumped)
errors in Docker Desktop:
But when I do balena push
, everything works fine.
This looks like an issue with the emulation that docker desktop does using QEMU, my guess is that it is missing some instruction or other that is required when building OmniCuroNext.Web.csproj
. The reason it works when you use balena push
is that our builder pipeline is not emulated and is being built on native arm64/v8 build servers. This might be a question for the folks at docker?