Task: I need help solving errors on build.snapcraft.io


Hey there,

I recently released Task v2.4.0, but was unable to release it on Snapcraft.

I have obscure errors errors there that I have no idea how to solve. Since this build process only downloads the pre-built binary from a given URL, I don’t think these errors are related to Task, but with Snapcraft itself.

Task source: https://github.com/go-task/task

Task Snapcraft source: https://github.com/go-task/snap/blob/master/snap/snapcraft.yaml

Here’s the output of one of the builds:




That yaml could be simplified I think.

I haven’t tested this but something like…

name: task
version: 'v2.4.0'
summary: A task runner / simpler Make alternative written in Go
description: |
  Task is a simple tool that allows you to easily run development and build
  tasks. Task is written in Golang, but can be used to develop any language.
  It aims to be simpler and easier to use then GNU Make.
grade: stable
confinement: classic

  - build-on: amd64
  - build-on: i386

    plugin: dump
      - on amd64: https://github.com/go-task/task/releases/download/$SNAPCRAFT_PROJECT_VERSION/task_linux_AMD64.tar.gz
      - on i386: https://github.com/go-task/task/releases/download/$SNAPCRAFT_PROJECT_VERSION/task_linux_386.tar.gz

command: task

Or alternatively build it from source, but I appreciate just ingesting the existing built binary is a valid approach. If you built from source, you’d get builds for other architectures like arm 32 and 64 bit.


Hi @popey,

Thanks for the suggestion, I’ll consider that.

The error seems to be unrelated to that, though, since it was already working this way before.

I just got an ugly Python stracktrace that doesn’t tell me what the problem is:

Downloading 'core.snap'  95%                                                   
Downloading 'core.snap'  96%                                                   
Downloading 'core.snap'  97%                                                   
Downloading 'core.snap'  98%                                                   
Downloading 'core.snap'  99%                                                   
Downloading 'core.snap' 100%                                                   
Failed to run 'override-pull': Exit code was 139.
Build failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 230, in run
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 195, in pull
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 75, in run_build_command
    return self.backend.run(args, env=full_env, **kwargs)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/lxd.py", line 497, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['lxc', 'exec', 'lp-xenial-i386', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'SNAPCRAFT_LOCAL_SOURCES=1', '--env', 'SNAPCRAFT_SETUP_CORE=1', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build_url": "https://launchpad.net/~build.snapcraft.io/+snap/0f6f8fdc03b6dcd3775f1553b07dfecc/+build/473856"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'http_proxy=', '--env', 'https_proxy=', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy', '--', '/bin/sh', '-c', 'cd /build/task && linux32 snapcraft pull']' returned non-zero exit status 2
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/slavebin/in-target scan-for-processes --backend=lxd --series=xenial --arch=i386 SNAPBUILD-473856
Scanning for processes to kill in build SNAPBUILD-473856


Please add set -o xtrace to your override-pull script, it should print all the commands that are processed.


I’d be inclined to just try building again.


I tried that a couple of times already, without success.


did you try out @popey’s changed snapcraft,yaml yet ? looking at the one on github it uses the deprecated “build: |” keyword and a lot of unnecessary shell … also it would be good to paste the whole build log (if it is too long, use paste.ubuntu.com and link it here). you obviously had an error before the download of the core snap (which the “Failed to run ‘override-pull’ …” line indicates) that is unseen in the snippet you pasted …


@ogra I’ll try the new version once I get bit of free time.

Note that the complete is log available on the last link in my original post, though. Pasting it here again anyway:



thanks !

so the actual error seems to actually be in the build system (it seems to segfault right after or during unsquashfs):

created 0 fifos
Pulling task 
Segmentation fault (core dumped)
Downloading 'core.snap'   0%                                                   
Downloading 'core.snap'   1%

i wonder if @cjwatson has an idea here …

i also wonder if:

  - build-on: amd64
  - build-on: i386

has anything to do with it … did the amd64 build fail in the same way ?


hmm, actually…

seems to be similar (the Segfault seems to be at the same point there)


That might tie in with when I first started observing these sorts of segfaults with my own snap packages – somewhere around the time of the release of the current stable core snap (14 Feb) … ?

I’m trying a build of my currently problematic snap with the beta core image. Will let you know if it addresses things.

Repeated cmake failures in snapcraft cleanbuild

Beta core snap (rev. 6479 … ?) appears to be working. But AFAICT the launchpad build daemon does not log the revision of the core snap, so it’s difficult to tell if this is a factor looking at what changed between failing and non-failing builds of my packages.


Hey there,

Sorry for the long wait on a response. I’ve being a bit busy.

I updated my snapcraft.yaml according to the @popey suggestion, and noticed new builds are now succeeding.

I’m not sure if the fix was due changing the file or due any updates on the server.

Anyway, problem solved. Thanks for the help!