← Back to issue list

Library discovery for rpath patching needs to be deterministic

View original Launchpad issue

Metadata

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

Current evaluation

Snapcraft's rpath patcher may pick the wrong of several same-named libraries in a snap because its directory walk is nondeterministic and doesn't follow ld.so search order. Filed by a maintainer ~8.4 years ago; no labels, comments, or activity since.

Suggested action: needs triage

Reason: The issue is 3078 days old with zero comments, no labels, and no maintainer acknowledgement, so it has never been triaged. It is a genuine correctness bug (nondeterministic library matching during rpath patching can link executables against the wrong libfoo version), but I could not verify via tools whether the current snapcraft/elf patcher already implements ld.so-style search ordering, so a maintainer should confirm whether it still reproduces before closing or scheduling a fix.

Impact: 50 Quick Win: 22.5 Staleness: 85 Complexity: 55 Confidence: 55 Support Request: 5

Issue body

Given a snap with four different versions of libfoo, located in usr/lib/libfoo.so, usr/lib/x86_64-linux-gnu/libfoo.so, lib/libfoo.so, and lib/randomdir/libfoo.so, Snapcraft will find an executable that wants to link to libfoo.so and may determine any one of these are a match in a directory walk that isn't deterministic and certainly doesn't behave like ld. We need to walk the entire snap looking for libraries so that we find them in odd places, but we need to first look in common directories, in the order that ld would find them, and maintain that consistency.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 50
Quick Win: 22.5
Staleness: 85
Complexity: 55
Confidence: 55
Support Request: 5
needs triage Snapcraft's rpath patcher may pick the wrong of several same-named libraries in a snap because its directory walk is nondeterministic and doesn't follow ld.so search order. Filed by a maintainer ~8.4 years ago; no labels, comments, or activity since.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 45
Confidence: 90
Support Request: 10
close stale Request for deterministic library discovery in Snapcraft's rpath patching to match ld behavior. Unaddressed for ~8 years with no comments or labels.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 65
Confidence: 85
Support Request: 15
close stale Snapcraft's rpath patching library discovery is non-deterministic when multiple library versions exist across different paths. The report requests prioritizing standard ld search paths for consistency. Open for over 8 years with no maintainer interaction.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 55
Confidence: 70
Support Request: 5
close stale Snapcraft's rpath patching library discovery is non-deterministic across multiple library paths. Requests a deterministic walk matching ld order. Unlabelled and inactive for over 8 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 50
Confidence: 75
Support Request: 10
close stale Requires deterministic library discovery for rpath patching in Snapcraft to match ld search order. Unaddressed for over 8 years with no maintainer interaction or labels.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.