← Back to issue list

patchelf warning / binary segfaults

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1753995
Type
issue
State
open
Author
~sajoupa
Labels
Created
Updated
Closed

Current evaluation

2018 report: snapcraft 2.39.2 patchelf step warns 'cannot find section' on a Go binary (telegraf) and the resulting snap segfaults (core-dump). No maintainer response. Referenced LP bug lp:1736861 is closed as resolved. Affected version long superseded.

Suggested action: close stale

Reason: The issue has had zero comments, no labels, and no maintainer interaction for ~6.8 years (last activity 2486 days ago), and it targets snapcraft 2.39.2 (2018), a version long superseded by the current codebase whose ELF/patchelf handling has been restructured (snapcraft/elf/ module). The closely related LP bug lp:1736861, which the reporter cites as 'fix released', is closed as resolved in a subsequent release, so the original problem is no longer applicable to current snapcraft.

Impact: 25 Quick Win: 15.0 Staleness: 95 Complexity: 40 Confidence: 70 Support Request: 10

Issue body

Hi, I'm trying to snap telegraf (https://github.com/influxdata/telegraf), which is written in go. At the prime step, I get the following messages: [...] Priming telegraf patchelf: cannot find section '' Failed to update '/home/ubuntu/git/dev/telegraf/prime/bin/telegraf'. Retrying after stripping the .note.go.buildid from the elf file. Snapping 'telegraf' - Snapped telegraf_1.5.2_amd64.snap After installing and running the snap, it quickly enters Failed state (inactive (dead) (Result: core-dump)). syslog messages: https://pastebin.canonical.com/p/vzy6Pk9m5z/ dmesg: https://pastebin.canonical.com/p/PQJXM7n8Cv/ systemd service configuration (automatically generated): https://pastebin.canonical.com/p/qDp7ZbSwGN/ snapcraft file: https://pastebin.canonical.com/p/FQYWBWy25N/ This is using the stable snapcraft snap, 2.39.2 rev 1177 at the moment. The same problem does not happen with snapcraft 2.34+17.10 (deb from archives on an artful machine). This look very similar to lp:1736861, which is 'fix released'. I tried using snapcraft from --channel edge/patchelf-go. Got a warning: Files in this part are going to be patched to execute correctly on diverse environments. To disable this behavior set `build-attributes: [no-patchelf]` for the part. After adding `build-attributes: [no-patchelf]` the snap built and ran successfully, but I'm pretty sure the patchelf step is needed for the snap to run correctly on all the machines where it should be able to. Thanks.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 25
Quick Win: 15.0
Staleness: 95
Complexity: 40
Confidence: 70
Support Request: 10
close stale 2018 report: snapcraft 2.39.2 patchelf step warns 'cannot find section' on a Go binary (telegraf) and the resulting snap segfaults (core-dump). No maintainer response. Referenced LP bug lp:1736861 is closed as resolved. Affected version long superseded.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 30
Confidence: 90
Support Request: 10
close stale User reports patchelf warnings and segfaults when building a Go binary with snapcraft 2.39.2. Issue is over 8 years old with no maintainer response or labels.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 90
Support Request: 10
close stale Reports patchelf warnings and segfaults when building a Go snap with snapcraft 2.39.2. Currently inactive for over 6 years with no maintainer response or labels.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 40
Confidence: 90
Support Request: 20
close stale Report of patchelf warnings and telegraf binary segfaults during snapcraft build using version 2.39.2. Issue is over 8 years old with no maintainer interaction or labels.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 20
close stale Snapcraft 2.39.2 fails to patch Go binaries, causing segfaults. A workaround exists via the no-patchelf build attribute. The issue is over 8 years old and likely irrelevant to modern snapcraft versions.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#1736861 (confidence 65%)

    Launchpad bug 'classic snap fails to build with cannot find section' (2.37 patchelf regression), explicitly cited in the issue body as very similar and 'fix released'; tracker shows it closed/resolved in a subsequent release.

Related issues

Issue Project State Summary Similarity
#1760897 Classic confined snap started segfaulting after 2.40 upgrade snapcraft (launchpad) open 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.
75%
#1943963 patchelf creates unloadable non-PIE riscv64 executables snapcraft (launchpad) closed Abandoned without resolution. The report details a snapcraft python3.8 execution failure on riscv64, potentially involving patchelf or seccomp, but received no comments and was closed.
72%
#1736861 classic snap fails to build with "cannot find section" snapcraft (launchpad) closed Closed without comments or resolution. The snapcraft 2.37 regression causing patchelf failures in classic snaps was abandoned or resolved in a subsequent release.
70%