Building core18 base fails : segfault/exit 139

Hallo everybody,

I am trying to build microk8s based on core18.

My host is cosmic and I am using the docker variant of the build:

docker run --rm -v "$PWD":/build -w /build snapcore/snapcraft bash \
      -c "apt update && snapcraft"

The only change I applied was adding a line base: core18 to snapcraft.yaml on master. The build works fine using unmodified sources.

With the change applied, I end up:

Downloading core18
Successfully downloaded core18 at /tmp/tmpgxi3_zbp/core18.snap
Setting up '/root/.cache/snapcraft/projects/core18/snap_hashes/amd64/09b7cdd51de34f0db0d8d725e9b6cf0193d2d4aaec7333e5cd359d10b1215c41322d0616b83ce437c65b16ee7c3cb5a7' in '/snap/core18/current'
Parallel unsquashfs: Using 8 processors
7114 inodes (7613 blocks) to write

[=============================================================\] 7613/7613 100%

created 5266 files
created 1008 directories
created 1735 symlinks
created 7 devices
created 0 fifos
Pulling libnftnl
Segmentation fault (core dumped)
Downloading 'core18.snap' 100%
Failed to run 'override-pull': Exit code was 139.

Now trying to figure out which program was actually dumping core.

Is this a known bug? Any ideas how to get around?

PS: I am very new to snapcraft so please forgive me in case I am missing something.


Hi @deas

Sorry, for the late response, I am not monitoring the activity on this forum.

I was able to build MicroK8s with the patch you suggested (base: core18) but not with building inside docker. I just did a snapcraft. I suspect due to the core18(?) snapcraft creates a VM and builds everything inside there. Give it a try, based on what i see so far MicroK8s with core18 seems to work.