Skip to content

Sodiff: detect name-embedded-version soname transitions (thrift, LLVM) - #18614

Open
jslobodzian wants to merge 1 commit into
fasttrack/3.0from
jslobodzian/sodiff-name-embedded-soname-fix
Open

Sodiff: detect name-embedded-version soname transitions (thrift, LLVM)#18614
jslobodzian wants to merge 1 commit into
fasttrack/3.0from
jslobodzian/sodiff-name-embedded-soname-fix

Conversation

@jslobodzian

@jslobodzian jslobodzian commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Problem

Sodiff's ABI check compares built-package sonames against the published base repo (azurelinux-official-base.repo -> packages.microsoft.com prod/base), which is correct. But its version-normalization step only strips a version that trails .so (conventional libfoo.so.<ver>):

sofile_no_ver=$(echo "$sofile" | sed -E 's/[.]so[(.].+/.so/')

Libraries that bake the version into the base name -- Apache Thrift (libthrift-0.24.0.so), LLVM (libLLVM-18.so) -- keep their version after this sed. The predecessor lookup --whatprovides "libthrift-0.24.0.so*" then cannot match the published libthrift-0.15.0.so, so Sodiff concludes "brand-new library, no predecessor," skips the entire --whatrequires dependent scan, and exits clean.

Real-world impact

thrift was bumped 0.15.0 -> 0.24.0 in #18239 (14-CVE HIGH). Sodiff passed. But published parquet-libs-15.0.0-8 (a libarrow subpackage) still hard-required libthrift-0.15.0.so()(64bit) and became uninstallable. ~3.5 weeks later this surfaced as a red build in #18543 (libevent) when its dependent ceph couldn't dep-install parquet-libs. Fixed out-of-band by the libarrow rebuild #18554.

The thrift naming is expected, not a bug -- the spec documents it: "thrift versions their libraries by package version, so each version change is a SONAME change and dependencies need to be rebuilt." Sodiff must handle this class.

Fix

Derive the version-independent .so family for both SONAME styles before the predecessor/requirer lookups:

  • Conventional libfoo.so.<ver> -> libfoo.so (unchanged behavior)
  • Name-embedded libfoo-<ver>.so -> libfoo-*.so (new)

Validation

Simulated PMC provide-set harness:

built soname before after
libthrift-0.24.0.so (0.15->0.24) miss caught
libssl.so.4 (conventional 3->4) caught caught (no regression)
libLLVM-18.so (17->18) miss caught
libbrandnew.so (truly new) no-fire no-fire (no false positive)

bash -n clean.

Follow-up (not in this PR)

Bug #23439 also proposes a dnf repoclosure gate (baseline-diff over the built overlay + published tier repos) as defense-in-depth -- it catches any unresolved Requires, not just soname-shaped ones. Tracked separately.

Bug: #23439

Sodiff normalized only versions trailing ".so" (libfoo.so.<ver>), so
libraries that bake the version into the base name (libthrift-0.24.0.so,
libLLVM-18.so) were treated as brand-new libraries. Their predecessor was
never found, the --whatrequires dependent scan was skipped, and orphaned
dependents (e.g. parquet-libs still requiring libthrift-0.15.0.so after
the thrift 0.15->0.24 bump in PR #18239) passed the check -- later
breaking dependent builds such as ceph (seen in PR #18543).

Derive the version-independent .so "family" for both SONAME styles when
locating a published predecessor and its requirers.

Bug: 23439

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 17152c7d-ff27-432d-b038-1ad05da30e3c
@jslobodzian
jslobodzian requested a review from a team as a code owner August 25, 2026 17:25
@microsoft-github-policy-service microsoft-github-policy-service Bot added Tools fasttrack/3.0 PRs Destined for Azure Linux 3.0 labels Aug 25, 2026
@jslobodzian

Copy link
Copy Markdown
Collaborator Author

/azurepipelines run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fasttrack/3.0 PRs Destined for Azure Linux 3.0 Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant