← Back to issue list

timeout if doing snapcraft pull and build seperately

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2008777
Type
issue
State
closed
Author
~hopem
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by a craft-parts ignore-patterns correction included in Snapcraft 7.2.11 and 7.3.x; the reporter confirmed that Snapcraft 7.3 works.

Resolution: closed resolved

Reason: craft-parts commit 9ba439ce fixed the ignore-patterns bug and was packaged in Snapcraft 7.2.11 by commit 524866d2. The reporter subsequently confirmed that Snapcraft 7.3 resolves the hang.

Evaluated by: mr-cal-bot

No scores available.

Issue body

I am building a snap using snapcraft version 7.2.9 and lxd 5.11-ad0b61e and if I trigger the build by simply executing 'snapcraft' it works. However if I do 'snapcraft pull; snapcraft;' it never completes and seems to hang on "Running build phase..." indefinitely. I am using a Launchpad snap recipe to build my snap for multiple architectures and am no longer able to do so. It appears that this behaviour started after I upgraded the snap to use core22 (previously core20). From LP: ... Executing action Executed: pull patchelf Executed parts lifecycle Running build phase... Error: websocket: close 1006 (abnormal closure): unexpected EOF Build failed Traceback (most recent call last): File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 269, in run self.build() File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 253, in build self.run_build_command(["snapcraft"], cwd=output_path, env=env) File "/usr/lib/python3/dist-packages/lpbuildd/target/operation.py", line 62, in run_build_command return self.backend.run(args, cwd=cwd, env=full_env, **kwargs) File "/usr/lib/python3/dist-packages/lpbuildd/target/lxd.py", line 730, in run subprocess.check_call(cmd, **kwargs) File "/usr/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['lxc', 'exec', 'lp-jammy-amd64', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/lpbuildd-git-proxy', '--env', 'SNAPPY_STORE_NO_CDN=1', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build-request-id": "lp-77700990", "build-request-timestamp": "2023-02-24T13:43:42Z", "build_url": "https://launchpad.net/~hopem/hotsos/+snap/hotsos/+build/2032346"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'SNAPCRAFT_BUILD_FOR=amd64', '--', '/bin/sh', '-c', 'cd /build/hotsos && linux64 snapcraft']' returned non-zero exit status 1. Revoking proxy token... RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=lxd --series=jammy --arch=amd64 SNAPBUILD-2032346 Scanning for processes to kill in build SNAPBUILD-2032346 If I try locally I get the same: $ snapcraft pull Launching instance... Executed: pull hotsos Executed: pull patchelf Executed parts lifecycle $ snapcraft Launching instance... Initializing parts lifecycle \ (505.3s) I checked and it has successfully created the build container: $ lxc list --project snapcraft +----------------------------------------------+---------+-----------------------+------+-----------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +----------------------------------------------+---------+-----------------------+------+-----------+-----------+ | snapcraft-hotsos-on-amd64-for-amd64-29493175 | RUNNING | 10.205.190.104 (eth0) | | CONTAINER | 0 | +----------------------------------------------+---------+-----------------------+------+-----------+-----------+ It just never completes.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by a craft-parts ignore-patterns correction included in Snapcraft 7.2.11 and 7.3.x; the reporter confirmed that Snapcraft 7.3 works.
stealth/space-bunny-alpha — closed resolved Hang on 'snapcraft pull' followed by a separate build was caused by a source ignore-patterns bug, fixed in Craft-parts 1.15.3 (9ba439c) and released in Snapcraft 7.2.11; reporter confirmed Snapcraft 7.3 works.
stealth/space-bunny-alpha — closed stale Closed with no documented resolution or maintainer explanation; the core22/LXD pull/build hang received no comments, linked fix, or follow-up.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The report described a hang when running snapcraft pull and build separately on core22, but received no comments or fixes.
qwen/qwen3.6-35b-a3b — — A report detailing a hang when running snapcraft pull and build separately was closed without comments or resolution, indicating it was abandoned. No fix or workaround was provided.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The report described a hang when running snapcraft pull and build separately, but received no comments or fixes before closure.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The report describes a hang when running snapcraft pull and build separately on core22, but no comments, fixes, or resolution details were provided. Likely closed due to inactivity.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/craft-parts@9ba439ce60e23e02d069ad235d462c72f67e837f (confidence 99%)

    Corrected source ignore-pattern handling, released in craft-parts 1.15.3.

  • Likely Fixed By: snapcore/snapcraft@524866d22bf323e66c40d07c7da96c5920aa882f (confidence 98%)

    Snapcraft packaging commit that included the craft-parts fix in version 7.2.11.

Related issues

Issue Project State Summary Similarity
#1897337 snapcraft build <part> ignores the part snapcraft (launchpad) closed Selective part builds were restored by snapcore/snapcraft#3572, which passed named parts into lifecycle planning instead of building every defined part.
72%
#1675516 can't cleanbuild snapcraft itself snapcraft (launchpad) closed Fresh testing confirmed Snapcraft could build itself successfully; the report was closed after the suspected interim fix was verified.
70%
#1793082 pickle up errors from build environments snapcraft (launchpad) closed Fixed by canonical/snapcraft#2455 in commit 9d353a630: outer Snapcraft now retrieves and reports error data from build providers.
70%