Building core18 base fails : segfault/exit 139

Bug #1806237 reported by Andreas Steffan
This bug report is a duplicate of:  Bug #1774012: Warn about the use of bases. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

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:

```
Preparing to pull libnftnl
Running on 'xenial'
Pulling libnftnl
snapcraft is running as a snap False, SNAP_NAME set to ''
Segmentation fault (core dumped)
Traceback (most recent call last):
  File "/usr/bin/snapcraft", line 9, in <module>
    load_entry_point('snapcraft==2.43.1', 'console_scripts', 'snapcraft')()
  File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1037, in invoke
    return Command.invoke(self, ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3/dist-packages/snapcraft/cli/_runner.py", line 93, in run
    ctx.forward(lifecyclecli.commands["snap"])
  File "/usr/lib/python3/dist-packages/click/core.py", line 552, in forward
    return self.invoke(cmd, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/snapcraft/cli/lifecycle.py", line 136, in snap
    project = _execute(steps.PRIME, parts=[], **kwargs)
  File "/usr/lib/python3/dist-packages/snapcraft/cli/lifecycle.py", line 35, in _execute
    lifecycle.execute(step, project_config, parts)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_runner.py", line 90, in execute
    executor.run(step, part_names)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_runner.py", line 194, in run
    self._handle_step(part_names, part, step, current_step, cli_config)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_runner.py", line 208, in _handle_step
    getattr(self, "_run_{}".format(current_step.name))(part)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_runner.py", line 250, in _run_pull
    self._run_step(step=steps.PULL, part=part, progress="Pulling")
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_runner.py", line 327, in _run_step
    getattr(part, step.name)()
  File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler/__init__.py", line 415, in pull
    self._runner.pull()
  File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler/_runner.py", line 83, in pull
    "override-pull", self._override_pull_scriptlet, self._sourcedir
  File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler/_runner.py", line 176, in _run_scriptlet
    scriptlet_name=scriptlet_name, code=status
snapcraft.internal.errors.ScriptletRunError: Failed to run 'override-pull': Exit code was 139.
```

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

Thanks
Andreas

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Docker is an advanced mode, we can certainly warn about this situation, but by stating core18 on a docker image that is not based out of bionic you are mixing libc ABI and causing this crash you see here.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.