cirruslabs / docker-images-flutter

Docker Images for Flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flutter:stable issue si_signo=Segmentation fault(11), si_code=1, si_addr=0x10

chilio opened this issue · comments

Steps to reproduce in gitlab environment (gitlab-ci.yml):

Grab image, execute basic script:

image: "cirrusci/flutter:stable"
 before_script:
   - flutter doctor

Error emerging on different multiple runners:

$ flutter doctor
../../runtime/bin/eventhandler_linux.cc: 416: error: Failed to start event handler thread 1
===== CRASH =====
si_signo=Segmentation fault(11), si_code=1, si_addr=0x10
Aborting re-entrant request for stack trace.
/usr/bin/bash: line 1[21]...):    12 Aborted                 (core dumped) flutter doctor

Help appreciated.

@shaynekellyii is it possible you generated the image on an arm64 macOS? The above error would be consistent with my own experience with cross-platform docker image creation...

This issue seems to go as far back as sometime after v2.10.4

@shaynekellyii is it possible you generated the image on an arm64 macOS? The above error would be consistent with my own experience with cross-platform docker image creation...

This issue seems to go as far back as sometime after v2.10.4

Hmm, not sure how as I don't have an arm64 machine. @hotdang-ca

I'm running into the same issue as well.

FROM cirrusci/flutter:stable
RUN flutter doctor

And I get the same output

#5 16.81 ===== CRASH =====
#5 16.81 si_signo=Segmentation fault(11), si_code=1, si_addr=0x808080808080809f

I'm using an M1 mac if that factors into the conversation. It was raised in a previous point.

The machine it's built on may indeed be an issue. Just ran the same dockerfile on my linux machine with no issue.

Your Docker version is probably too old.
The current image uses a kernel that tries to use the new system call 'clone3'. The default seccomp file only allows this call since version 20.10.10.
So try to update your docker to at least 20.10.10 or start the docker daemon with your own seccomp file. The docker build command does not accept the option "--security-opt seccomp=", so you must configure the seccomp globally for the daemon itself.

Hopefully it helps

Docker-default-seccomp (Version 2.10.10): https://github.com/moby/moby/blob/v20.10.10/profiles/seccomp/default.json
Seccomp for docker-container: https://docs.docker.com/engine/security/seccomp/
Seccomp for docker-daemon: https://www.tenable.com/audits/items/CIS_Docker_v1.2.0_L2_Docker_Linux.audit:adab16625e799a5d4355c7bd8ef4a5e7

Upgrade docker to latest version and error gone, thanks @luvetter

I'm afraid not fixed for me

~/Desktop                                                                   17s
❯ docker -v
Docker version 20.10.20, build 9fdeb9c

~/Desktop
❯ cat Dockerfile
FROM cirrusci/flutter:stable
RUN flutter doctor

~/Desktop
❯ docker build -t my-flutter .
[+] Building 16.8s (6/6) FINISHED
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 90B                                        0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load metadata for docker.io/cirrusci/flutter:stable         1.2s
 => [auth] cirrusci/flutter:pull token for registry-1.docker.io            0.0s
 => CACHED [1/2] FROM docker.io/cirrusci/flutter:stable@sha256:7ac37abe3e  0.0s
 => ERROR [2/2] RUN flutter doctor                                        15.5s
------
 > [2/2] RUN flutter doctor:
#6 0.501    Woah! You appear to be trying to run flutter as root.
#6 0.502    We strongly recommend running the flutter tool without superuser privileges.
#6 0.502   /
#6 0.502 📎
#6 8.720 Doctor summary (to see all details, run flutter doctor -v):
#6 9.349 [!] Flutter (Channel unknown, 3.3.7, on Ubuntu 22.04 LTS 5.15.49-linuxkit, locale en_US.UTF-8)
#6 9.357     ! Flutter version 3.3.7 on channel unknown at /sdks/flutter
#6 9.358     ! Upstream repository unknown
#6 15.37
#6 15.37 ===== CRASH =====
#6 15.37 si_signo=Segmentation fault(11), si_code=1, si_addr=0x808080808080809f
#6 15.37 version=2.18.4 (stable) (Tue Nov 1 15:15:07 2022 +0000) on "linux_x64"
#6 15.37 pid=7, thread=51, isolate_group=main(0x4003061000), isolate=main(0x40030da000)
#6 15.37 isolate_instructions=4001ed0100, vm_instructions=4001ed0100
#6 15.37   pc 0x0000ffff85c04789 fp 0x00000040103d6000 Unknown symbol
#6 15.37   pc 0x0000ffff85c05cec fp 0x00000040103d6028 Unknown symbol
#6 15.37   pc 0x0000ffff84fd3f22 fp 0x00000040103d6050 Unknown symbol
#6 15.37   pc 0x0000ffff8408a142 fp 0x00000040103d6098 Unknown symbol
#6 15.37   pc 0x0000ffff8597fbe9 fp 0x00000040103d6110 Unknown symbol
#6 15.37   pc 0x0000ffff8597fa7c fp 0x00000040103d6178 Unknown symbol
#6 15.37   pc 0x0000ffff8597f876 fp 0x00000040103d6210 Unknown symbol
#6 15.37   pc 0x0000ffff846aa799 fp 0x00000040103d6298 Unknown symbol
#6 15.37   pc 0x0000ffff846aa448 fp 0x00000040103d62f0 Unknown symbol
#6 15.37   pc 0x0000ffff846aa08d fp 0x00000040103d6330 Unknown symbol
#6 15.37   pc 0x0000ffff845a4440 fp 0x00000040103d6370 Unknown symbol
#6 15.37   pc 0x0000ffff845a4168 fp 0x00000040103d63b0 Unknown symbol
#6 15.37   pc 0x0000ffff845a3ef6 fp 0x00000040103d63f0 Unknown symbol
#6 15.37   pc 0x0000ffff84089efd fp 0x00000040103d6450 Unknown symbol
#6 15.37   pc 0x0000ffff84089b3d fp 0x00000040103d64a8 Unknown symbol
#6 15.37   pc 0x0000ffff84088b82 fp 0x00000040103d6500 Unknown symbol
#6 15.37   pc 0x0000ffff845a1321 fp 0x00000040103d6568 Unknown symbol
#6 15.37   pc 0x0000ffff845a113d fp 0x00000040103d65a8 Unknown symbol
#6 15.37   pc 0x0000ffff8597fbe9 fp 0x00000040103d6620 Unknown symbol
#6 15.37   pc 0x0000ffff8597fa7c fp 0x00000040103d6688 Unknown symbol
#6 15.37   pc 0x0000ffff8597f876 fp 0x00000040103d6720 Unknown symbol
#6 15.37   pc 0x0000ffff846aa799 fp 0x00000040103d67a8 Unknown symbol
#6 15.37   pc 0x0000ffff846aa448 fp 0x00000040103d6800 Unknown symbol
#6 15.37   pc 0x0000ffff846aa08d fp 0x00000040103d6840 Unknown symbol
#6 15.37   pc 0x0000ffff845a4440 fp 0x00000040103d6880 Unknown symbol
#6 15.37   pc 0x0000ffff845a4168 fp 0x00000040103d68c0 Unknown symbol
#6 15.37   pc 0x0000ffff845a3ef6 fp 0x00000040103d6900 Unknown symbol
#6 15.37   pc 0x0000ffff845a3c79 fp 0x00000040103d6948 Unknown symbol
#6 15.37   pc 0x0000ffff845a1aaa fp 0x00000040103d69a8 Unknown symbol
#6 15.37   pc 0x0000ffff845a1882 fp 0x00000040103d6a00 Unknown symbol
#6 15.37   pc 0x0000ffff845a1618 fp 0x00000040103d6a40 Unknown symbol
#6 15.37   pc 0x0000ffff845a1321 fp 0x00000040103d6aa8 Unknown symbol
#6 15.37   pc 0x0000ffff845a113d fp 0x00000040103d6ae8 Unknown symbol
#6 15.37   pc 0x0000ffff8597fbe9 fp 0x00000040103d6b60 Unknown symbol
#6 15.37   pc 0x0000ffff8597fa7c fp 0x00000040103d6bc8 Unknown symbol
#6 15.37   pc 0x0000ffff8597f876 fp 0x00000040103d6c60 Unknown symbol
#6 15.37   pc 0x0000ffff846aa799 fp 0x00000040103d6ce8 Unknown symbol
#6 15.37   pc 0x0000ffff846aa448 fp 0x00000040103d6d40 Unknown symbol
#6 15.37   pc 0x0000ffff846aa08d fp 0x00000040103d6d80 Unknown symbol
#6 15.37   pc 0x0000ffff846a9b78 fp 0x00000040103d6dc0 Unknown symbol
#6 15.37   pc 0x0000ffff846a98c3 fp 0x00000040103d6e00 Unknown symbol
#6 15.37   pc 0x0000ffff846a95c4 fp 0x00000040103d6e40 Unknown symbol
#6 15.37   pc 0x0000ffff8459e1c4 fp 0x00000040103d6e90 Unknown symbol
#6 15.37   pc 0x0000ffff8459dfdd fp 0x00000040103d6ed0 Unknown symbol
#6 15.37   pc 0x0000ffff8597fd19 fp 0x00000040103d6f48 Unknown symbol
#6 15.37   pc 0x0000ffff8597fa7c fp 0x00000040103d6fb0 Unknown symbol
#6 15.37   pc 0x0000ffff8597f876 fp 0x00000040103d7048 Unknown symbol
#6 15.37   pc 0x0000ffff846aa799 fp 0x00000040103d70d0 Unknown symbol
#6 15.37   pc 0x0000ffff846aa448 fp 0x00000040103d7128 Unknown symbol
#6 15.37   pc 0x0000ffff846aa08d fp 0x00000040103d7168 Unknown symbol
#6 15.37   pc 0x0000ffff846a9b78 fp 0x00000040103d71a8 Unknown symbol
#6 15.37   pc 0x0000ffff846a98c3 fp 0x00000040103d71e8 Unknown symbol
#6 15.37   pc 0x0000ffff846a95c4 fp 0x00000040103d7228 Unknown symbol
#6 15.37   pc 0x0000ffff8459df1d fp 0x00000040103d7268 Unknown symbol
#6 15.37   pc 0x0000ffff8459d158 fp 0x00000040103d72c8 Unknown symbol
#6 15.37   pc 0x0000ffff853e38c9 fp 0x00000040103d7318 Unknown symbol
#6 15.37   pc 0x0000ffff8597f313 fp 0x00000040103d7360 Unknown symbol
#6 15.37   pc 0x0000ffff8597ef8b fp 0x00000040103d73a0 Unknown symbol
#6 15.37   pc 0x0000ffff8597eeb9 fp 0x00000040103d73c8 Unknown symbol
#6 15.37   pc 0x0000ffff8597edde fp 0x00000040103d7408 Unknown symbol
#6 15.37   pc 0x0000ffff85923ab8 fp 0x00000040103d7448 Unknown symbol
#6 15.37   pc 0x0000ffff85c02a0c fp 0x00000040103d74c0 Unknown symbol
#6 15.37   pc 0x00000040020482bd fp 0x00000040103d7560 dart::DartEntry::InvokeCode(dart::Code const&, unsigned long, dart::Array const&, dart::Array const&, dart::Thread*)+0x14d
#6 15.38   pc 0x00000040020480fc fp 0x00000040103d75c0 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0x14c
#6 15.38   pc 0x000000400204a52c fp 0x00000040103d7610 dart::DartLibraryCalls::HandleMessage(long, dart::Instance const&)+0x14c
#6 15.38   pc 0x0000004002071bf0 fp 0x00000040103d7ba0 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message> >)+0x350
#6 15.38   pc 0x000000400209b11d fp 0x00000040103d7c10 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)+0x14d
#6 15.38   pc 0x000000400209b7ff fp 0x00000040103d7c60 dart::MessageHandler::TaskCallback()+0x1df
#6 15.38   pc 0x00000040021be238 fp 0x00000040103d7ce0 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*)+0x148
#6 15.38   pc 0x00000040021be68d fp 0x00000040103d7d10 dart::ThreadPool::Worker::Main(unsigned long)+0x6d
#6 15.38   pc 0x00000040021312d8 fp 0x00000040103d7dd0 /sdks/flutter/bin/cache/dart-sdk/bin/dart+0x21312d8
#6 15.38 -- End of DumpStackTrace
#6 15.38 qemu: uncaught target signal 6 (Aborted) - core dumped
#6 15.42 Aborted
------
executor failed running [/bin/sh -c flutter doctor]: exit code: 134

I've since moved on and just made my own docker image of flutter but I'll still test out new things you might want me to try.

@shmink

qemu: uncaught target signal 6 (Aborted) - core dumped

Do you use a mac with Apple M1?
Maybe you are affected by this:
missing support for mac with M1 chip: #150
qemu bug on mac with M1 chip: docker/for-mac#6264

I do have an M1 yes :| I'll look into your links thanks. Fingers crossed.

@shmink did you mention that you created your own image to get it working with M1 machine? I am pretty new to the this architecture issue, I am wondering what was the base image you were using? I really need to get flutter install on a docker image.
Thanks

@jimmy-vo

You can view it here if you'd like

https://github.com/shmink/flutter-docker

Also available on dockerhub so docker pull shmink/flutter I believe