Skip to content

[stable2603] Backport #11114#11119

Merged
sigurpol merged 1 commit intostable2603from
backport-11114-to-stable2603
Feb 19, 2026
Merged

[stable2603] Backport #11114#11119
sigurpol merged 1 commit intostable2603from
backport-11114-to-stable2603

Conversation

@paritytech-release-backport-bot
Copy link
Copy Markdown

Backport #11114 into stable2603 from sigurpol.

See the documentation on how to use this bot.

Force the linker to keep the `polkadot_jemalloc_shim` crate and its
`#[global_allocator]` in all binaries that depend on it. Without it, the
linker might drop it since it is seen as a dependency with no referenced
symbols. The issue happens only on a subset of combination of rust
version and linker (e.g. on CI with Ubunti 24.04, rust 1.88.0 + gcc/ld
strips the jemalloc crate from the binary but not rust 1.92.0 and also
rust 1.88.0 + clang/mold works fine.

One way to reproduce the issue on my local Ubuntu machine using
`frame-omni-bencher` as reference (current latest version v0.17.2 has
the shim with jemalloc-allocator feature as dependency, as coming from
PR #11069 ):
1. building with rust 1.92.0 / gcc +ld => the linker doesn't strip
jemalloc allocator from the binary:
```bash
nm frame-omni-bencher | grep -i jemalloc
000000000149bf60 t _GLOBAL__sub_I_jemalloc_nodump_allocator.cc
0000000000eacae0 t jemalloc_constructor
0000000000eacd50 t _rjem_je_jemalloc_postfork_child
0000000000eacc70 t _rjem_je_jemalloc_postfork_parent
0000000000eacaf0 t _rjem_je_jemalloc_prefork
000000000262bb08 b _ZN7rocksdbL18jemalloc_type_infoB5cxx11E
```
2. building with rust 1.88.0 / gcc + ld => the linker strips aways it
```bash
000000000027f8c0 t _GLOBAL__sub_I_jemalloc_nodump_allocator.cc
00000000023a3598 b _ZN7rocksdbL18jemalloc_type_infoB5cxx11E
```

3. building with rust 1.88.0 / clang + mold => the linker keeps it (same
as 1.)

Since currently CI relies on Ubuntu 24.04 gcc /ld + rust 1.88.0, we go
here for the conservative approach to force the linker not to drop with
the `extern crate` change in all impacted binaries.

Next step - outside this PR - is to bump rust version.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
(cherry picked from commit d774715)
@github-actions github-actions Bot added the A3-backport Pull request is already reviewed well in another branch. label Feb 19, 2026
@github-actions github-actions Bot requested a review from sigurpol February 19, 2026 15:48
@github-actions
Copy link
Copy Markdown
Contributor

This pull request is amending an existing release. Please proceed with extreme caution,
as to not impact downstream teams that rely on the stability of it. Some things to consider:

  • Backports are only for 'patch' or 'minor' changes. No 'major' or other breaking change.
  • Should be a legit fix for some bug, not adding tons of new features.
  • Must either be already audited or not need an audit.
Emergency Bypass

If you really need to bypass this check: add validate: false to each crate
in the Prdoc where a breaking change is introduced. This will release a new major
version of that crate and all its reverse dependencies and basically break the release.

@sigurpol sigurpol enabled auto-merge (squash) February 19, 2026 16:12
@sigurpol sigurpol merged commit 022ec72 into stable2603 Feb 19, 2026
238 of 245 checks passed
@sigurpol sigurpol deleted the backport-11114-to-stable2603 branch February 19, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A3-backport Pull request is already reviewed well in another branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant