Segmentation fault using Debian Bookworm ARM64v8 image during dotnet restore in docker
I'm getting a strange error named "Segmentation fault (core dumped)" when trying to build my dockerfile on the ARM64v8 Bookworm image coming from microsoft dotnet/runtime. this occurs every time on the
dotnet restore
command while it's not occuring on the AMD64 Bookworm image.
Using .NET 8
Some log:
111 Replies
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Have you done anything weird in your dockerfile
Show your dockerfile
https://github.com/Sella-GH/AzzyBot/blob/feat/dockerfile/Dockerfile
The AMD64 part goes through without issues, only the ARM64v8 part makes issues
Are you running the arm image on a x64 machine?
I'm not quite sure what architecture the Ubuntu runners from GitHub use but I guess it's x64, yes
It's emulating via QEMU then
Which is not supported
It should work though if you try the macos arm64 runner as host I think
And like completely doesn't work
Do I have to use the macos runner for every image then? I use a matrix strategy from GitHub Actions to compile the images
You need to use a runner that has the corresponding architecture
X64 for x64 and arm64 for arm64
you sure macos runners are on the M platform?
They made the arm64 ones public like 3 months ago
They were enterprise only before
oh nice
But note that if your repo isn't open source, they're always paid iirc
Unlike the other runners which have some limited free capacity even for private repos
Yeah the ubuntu runners are free in private
I guess 2.000 mins was it
maybe you can ask for ubuntu/arm64
?
I'm not sure if one customer asking is gonna let GitHub provide ARM64 runners lol
no, in the yaml
And how exactly?
There are no ubuntu arm64 runners iirc
But you could try to get an Oracle Always Free VPS
Which are Arm64
And setup a self hosted runner there
Tried the Free Tier already until they were at max capacity and won't let me create any servers anymore
https://github.com/actions/runner-images/issues/9254
it's free
use mac
Yeah but only for open source iirc
They have no free minutes for private macos arm64 iirc
Nope only for Ubuntu
do you have a university email?
I'm open source anyway so no issues
Ah I thought you weren't
If you've asked me this 2 years ago I'd have said yes
This dockerfile is open source if I see this correctly lol
@Filip Navara wanna fix QEMU after naot win x86? :kekw:
nah
Well big question then, if I have to use ARM64 runners for the respecting images how can I combine all of the digests into one action in the end and upload one tag with all images?
jobs:
S
According to this site they also support macOS 13 to use ARM64 runners, not only macOS 14 (like I falsely assumed)
https://github.com/actions/runner-images?tab=readme-ov-file#available-images
However, seems I can't get docker running on the machines.. not sure what I am doing wrong
Well that's it. No docker for the M1 images - I guess I can't compile ARM64 images on GitHub Actions
Petris
And setup a self hosted runner there
Quoted by
<@246732334282440704> from #Segmentation fault using Debian Bookworm ARM64v8 image during dotnet restore in docker (click here)
React with ❌ to remove this embed.
Probably the best idea sigh
can you send the link of that issue
i want to see the linux arm64
can you try ubuntu-latest docker with linux/arm64 flag
I already have
It's not available in the images section
not that
it's an x86_64 image with docker
with platform arm64
like
docker build ...... --platform linux/arm64
Yeah I already have before
I always used the ubuntu-latest runners
can you share the repo
https://github.com/Sella-GH/AzzyBot/blob/feat/dockerfile/.github/workflows/docker.yml
Well that's an issue because if I run a self-hosted runner for a public repository...
We recommend that you only use self-hosted runners with private repositories. This is because forks of your public repository can potentially run dangerous code on your self-hosted runner machine by creating a pull request that executes the code in a workflow.https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#self-hosted-runner-security
is it failing on the linux or windows arm64 image pull?
Both
Okay using the self-hosted runner for ARM64 now and seems to work so far...
But there's a side effect - it can only compile one Docker image at a time
you only have 1 runner
configure more
Yeah read about this in the aftermath. Anyway it works - thanks all for helping the case. 🙂
now apply for the private beta of linux/arm64
There's a private beta?
yes, everyone is forcefully delaying the implementation of arm64 because it's gaining market
my opinion is that is not that hard to implement but they are delaying it as much as possible
And where is this private beta? I don't see anything in the issue
teams is 4 bucks a month
But you need at least 2 people
And guess what, I'm alone lol
still a good investment
Still need another peep
where did you read it's at least 2 people?
Last time I was in an organization I read about that you need at least two people or I've got some wrong info
i just proceeded to checkout on a new org
and i could purchase a single license
you have to select individual
Well Individual is GitHub Pro IIRC
i dont think github pro exists anymore
that's your personal account
you should create an organization
https://github.com/organizations/plan
Yeah because GitHub Pro is only available for Personal accounts aka Individuals
they changed it a bit
now an organization can be an individual
can belong to *
and be, if you want to
This whole runner stuff took enough time for me today tbh
Made a cleanup job now otherwise this thing runs out of space in like 2 hours
maybe you are focusing too much on something that isn't adding a ton of value? xd
also, it's failing on docker, not on arm64 so you can still have all your docker images for standard and release arm64 non docker
for now
Maybe I've got a different POV on stuff but IMHO it's waaaaay better to have a fully automated build CI and release CD.
This stuff saves a good amount of time if you have to do that again and again and again
i didn't check but are you uploading the images to docker hub?
I'm still wanting to distribute non-docker images of the stuff. Docker is just for the "lazy".
As I don't expect to go through the roof with this niche piece of software I made I still found out it's a good thing to learn stuff for future needs
Yes
github will eventually "catch up" with arm stuff
don't worry
Usually I'm with the saying "Self-host over Cloud" so it's no issue for me lol
be careful with your github tokens
Yeah I use secrets so nothing to worry by now
found your problem 😁
i think
QEMU unable to compile as every time?
it's due to multiplatform
🤨
But why does it work when I specify the ARCH?
https://github.com/JuanchiBruzzone/AzzyBot/actions/runs/8412293180/job/23032959698
can you see that?
the push fail is on purpose
i'm just doing restore and build
Yeah I can see
i didn't investigate why
but maybe github keeps the container and tries to do multi platform
and that is fucking up QEMU
because if you single target arm64 it works perfectly using ubuntu-latest, as it should
Not sure about that tho
https://github.com/dotnet/core/blob/v8.0.3/release-notes/8.0/supported-os.md#qemu
works fine :harold:
But if you do Multiplatform it fucks up
This is weird
i just pull 8 and it uses the appropiate stuff
there was a breaking change on .net8 docker pulls
it comes from debian now
Mhh let me check
https://github.com/dotnet/dotnet-docker/discussions/4549
this one
but i think it's coming from multi platform docker container target
I changed my workflow and docker file let's see if it breaks
start easy just target linux/arm64
or you going for the home run?
I'm going for the
revert
yes
because of the breaking change
i just posted above
you need to explicitly say it's for windows now
Why windows lol it should use Linux as docker container
otherwise it pulls debian
weren't your running multiple containers? or just ubuntu?
you are doing windows amd64
you need to tell it go look for windows image
or just do linux container
linux/amd64
Guess I'm just moving on with my approach - works at least
yeah xd
just wanted to find the bug
Now I've got an issue regarding docker volumes but that doesn't involve .NET anymore
But a question for the end:
Is it even possible to run docker natively on Windows so that you need a native docker image for the platform?
IIRC docker desktop uses either WSL2 or Hyper-V with Linux as base OS
You can’t run docker in windows without virtualization
I think there is something native but it’s exclusive to windows server
So there is basically no need for adding windows/amd64 docker images?
This is a discord bot right?
Yes
People would usually run it from a server
Linux server
And develop on windows docker Linux
Based
I think you are going overkill
Just target Linux amd and arm64
And docker
Well I use it on windows too but mainly for debugging
But I can just do docker pull
And it’s Linux
It’s just a better experience
I am on macOS so I gladly accept a Linux arm64 image
That adds value
I don’t think windows adds that much value
Windows servers are expensive
And if the run it locally they most likely will use docker
Fair points
I see that there is a big learning experience for you here so focus on important stuff and have a pipeline for stuff that maybe doesn’t add that much value but it’s good for you to learn !
I removed the Windows images now, just building the linux ones now (ARM and x64) at first for docker, later then for the full release stuff then.
Need to catch some sleep and fix the remaining issues tomorrow.... I'm feeling so close to the end of this nightmare lol
nice
I've got it finally working in docker without any issues 🎉
Thanks everyone for helping!