← Back to issue list

Classic confined snap started segfaulting after 2.40 upgrade

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1760897
Type
issue
State
open
Author
~kos.tsakalozos
Labels
—
Created
Updated
Closed
—

Current evaluation

Classic snap segfaults after snapcraft 2.40 due to upstream patchelf corrupting Go binaries; maintainer pointed to the documented no-patchelf build attribute (upstream NixOS/patchelf#146).

Suggested action: close not a bug

Reason: This is a support/diagnosis question, not a snapcraft defect: ~sergiusens traced it to upstream NixOS/patchelf#146 and pointed at `build-attributes: [no-patchelf]`, a documented option still present in docs/reference/snapcraft-yaml.rst ('Disables executable patching for files primed by the part'), and the reporter had already confirmed that attribute restores a working build. Snapcraft's own bundled patchelf is now carried with upstream patches under snap/local/patches/patchelf/, so any residual fix belongs upstream rather than in this codebase.

Evaluated by: mr-cal-bot

Impact: 40 Quick Win: 10 Complexity: 60 Confidence: 85 Actionability: 65

Issue body

Our kuberentes-test snap is crashing when built with 2.40 snapcraft. The snap's yaml looks like this now: https://raw.githubusercontent.com/juju-solutions/release/rye/snaps/snap/kubernetes-test.yaml We had to add "build-attributes: [no-patchelf]" to get it working again. Here are two runs with different builds of the same snap where we have a working version and a failing one: https://pastebin.ubuntu.com/p/f4552kVxVK/ Here is also the build process with debug enabled: https://pastebin.ubuntu.com/p/jTm7TBJH4B/ There is this error message during build: "cannot find section Failed to update '/home/jackal/workspace/charms/release/snap/build/kubernetes-test/prime/ginkgo'. Retrying after stripping the .note.go.buildid from the elf file." Is this an expected behaviour? Is it something we should change in our snap? Or is it an indication of a bug? Thanks.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 40
Quick Win: 10
Complexity: 60
Confidence: 85
Actionability: 65
close not a bug Classic snap segfaults after snapcraft 2.40 due to upstream patchelf corrupting Go binaries; maintainer pointed to the documented no-patchelf build attribute (upstream NixOS/patchelf#146).
stealth/space-bunny-alpha
Impact: 22
Quick Win: 9
Complexity: 12
Confidence: 87
Actionability: 45
close not a bug Classic-confined snap segfaults with snapcraft 2.40. Maintainer traced it to upstream NixOS/patchelf#146 and pointed to the documented no-patchelf build-attribute workaround, which the reporter already confirmed resolves it. Answered support question.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 11
Complexity: 40
Confidence: 70
Actionability: 60
close resolved Classic confined snap segfaulting after snapcraft 2.40 upgrade due to go binary patchelf issues; workaround was adding no-patchelf build attribute.
qwen/qwen3.8-27b
Impact: 15
Quick Win: 8
Staleness: 95
Complexity: 45
Confidence: 80
Support Request: 40
close stale 2018 report that a classic confined snap (kubernetes-test) segfaults when built with snapcraft 2.40 due to patchelf/ELF buildid stripping; reporter found a no-patchelf workaround. No maintainer response in 8+ years; affected version long superseded.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 55
Confidence: 92
Support Request: 40
close stale Classic confined snap segfaults after snapcraft 2.40 upgrade due to ELF stripping. Reporter applied a workaround. No maintainer interaction in over 8 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 65
Confidence: 90
Support Request: 20
close stale Classic confined snap segfaults after snapcraft 2.40 upgrade; workaround involves no-patchelf. Issue is 8+ years old with no maintainer interaction or updates.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 35
Confidence: 75
Support Request: 20
close stale Classic snap built with snapcraft 2.40 segfaults due to ELF stripping. No maintainer response in over 8 years. Workaround exists.

Update history

Date Change
created

Related work

  • Caused By: patchelf#146 (confidence 92%)

    Explicitly cited by maintainer ~sergiusens as the likely cause of the patched-binary corruption

  • Duplicate Of: snapcraft (launchpad)#1753995 (confidence 72%)

    Same class of report: patchelf corrupts Go-built classic snaps into segfaults, worked around with no-patchelf

Related issues

Issue Project State Summary Similarity
#1736861 classic snap fails to build with "cannot find section" snapcraft (launchpad) closed Snapcraft 2.37's bundled patchelf could not patch gotty for a classic build; maintainers linked NixOS/patchelf#66 and directed users to edge/patchelf-go.
79%
#1753995 patchelf warning / binary segfaults snapcraft (launchpad) open PatchELF corrupted Go-built Telegraf classic snaps into runtime segfaults; no-patchelf avoided the crash, but a 2019 Snapcraft 3.8 reproduction remains unverified on current code.
74%