rust-lang / rust-lang/rust

SIGSEGV on aarch64 when running on Podman 5.4

Open
#138,512 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug E-needs-mcve I-crash T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

I'm getting a SIGSEGV when installing packages with cargo install inside an alpine dockerfile, running in Podman. It works on Podman 5.3, but not in Podman 5.4 (Podman issue: https://github.com/containers/podman/issues/25563)

Code
cargo install mdbook-mermaid

Also happens with:

cargo install cargo-audit
Meta

rustc --version --verbose:

rustc 1.85.0 (4d91de4e4 2025-02-17)
binary: rustc
commit-hash: 4d91de4e48198da2e33413efdcd9cd2cc0c46688
commit-date: 2025-02-17
host: aarch64-unknown-linux-musl
release: 1.85.0
LLVM version: 19.1.7
Error output
[1/2] STEP 7/9: RUN cargo install mdbook-mermaid
    Updating crates.io index
 Downloading crates ...
  Downloaded mdbook-mermaid v0.14.1
  Installing mdbook-mermaid v0.14.1
    Updating crates.io index
     Locking 135 packages to latest compatible versions
      Adding env_logger v0.10.2 (available: v0.11.7)
      Adding pulldown-cmark v0.9.6 (available: v0.13.0)
      Adding toml_edit v0.15.0 (available: v0.22.24)
 Downloading crates ...
  Downloaded bitflags v2.9.0
  Downloaded getrandom v0.3.1
  Downloaded digest v0.10.7
  Downloaded darling_macro v0.20.10
  Downloaded strsim v0.11.1
  Downloaded generic-array v0.14.7
  Downloaded pulldown-cmark-escape v0.10.1
  Downloaded terminal_size v0.4.2
  Downloaded itoa v1.0.15
  Downloaded thiserror v2.0.12
  Downloaded unicase v2.8.1
  Downloaded cfg-if v1.0.0
  Downloaded env_logger v0.11.7
  Downloaded utf8parse v0.2.2
  Downloaded clap v4.5.32
  Downloaded unicode-ident v1.0.18
  Downloaded toml v0.5.11
  Downloaded indexmap v1.9.3
  Downloaded thiserror-impl v2.0.12
  Downloaded darling_core v0.20.10
  Downloaded toml_datetime v0.5.1
  Downloaded cc v1.2.16
  Downloaded num-traits v0.2.19
  Downloaded typenum v1.18.0
  Downloaded toml_edit v0.15.0
  Downloaded memchr v2.7.4
  Downloaded pulldown-cmark v0.9.6
  Downloaded version_check v0.9.5
  Downloaded serde_json v1.0.140
  Downloaded clap_builder v4.5.32
  Downloaded ucd-trie v0.1.7
  Downloaded aho-corasick v1.1.3
  Downloaded regex v1.11.1
  Downloaded syn v2.0.100
  Downloaded pulldown-cmark v0.10.3
  Downloaded itertools v0.10.5
  Downloaded combine v4.6.7
  Downloaded handlebars v6.3.1
  Downloaded bstr v1.11.3
  Downloaded regex-syntax v0.8.5
  Downloaded anyhow v1.0.97
  Downloaded rustix v1.0.2
  Downloaded errno v0.3.10
  Downloaded quote v1.0.40
  Downloaded dbus v0.9.7
  Downloaded chrono v0.4.40
  Downloaded serde v1.0.219
  Downloaded pkg-config v0.3.32
  Downloaded colorchoice v1.0.3
  Downloaded regex-automata v0.4.9
  Downloaded clap_lex v0.7.4
  Downloaded bytes v1.10.1
  Downloaded ident_case v1.0.1
  Downloaded jiff v0.2.4
  Downloaded proc-macro2 v1.0.94
  Downloaded pest_generator v2.7.15
  Downloaded libc v0.2.171
  Downloaded is_terminal_polyfill v1.70.1
  Downloaded is-terminal v0.4.16
  Downloaded hashbrown v0.12.3
  Downloaded termcolor v1.4.1
  Downloaded serde_derive v1.0.219
  Downloaded pest_meta v2.7.15
  Downloaded pest v2.7.15
  Downloaded once_cell v1.21.1
  Downloaded fastrand v2.3.0
  Downloaded darling v0.20.10
  Downloaded tempfile v3.19.0
  Downloaded ryu v1.0.20
  Downloaded pest_derive v2.7.15
  Downloaded opener v0.7.2
  Downloaded log v0.4.26
  Downloaded derive_builder v0.20.2
  Downloaded hex v0.4.3
  Downloaded clap_complete v4.5.46
  Downloaded env_logger v0.10.2
  Downloaded autocfg v1.4.0
  Downloaded anstyle-query v1.1.2
  Downloaded topological-sort v0.2.2
  Downloaded shlex v1.3.0
  Downloaded sha2 v0.10.8
  Downloaded mdbook v0.4.47
  Downloaded num-modular v0.6.1
  Downloaded libdbus-sys v0.2.5
  Downloaded anstream v0.6.18
  Downloaded iana-time-zone v0.1.61
  Downloaded derive_builder_macro v0.20.2
  Downloaded derive_builder_core v0.20.2
  Downloaded num-order v1.2.0
  Downloaded fnv v1.0.7
  Downloaded env_filter v0.1.3
  Downloaded crypto-common v0.1.6
  Downloaded humantime v2.2.0
  Downloaded either v1.15.0
  Downloaded anstyle v1.0.10
  Downloaded cpufeatures v0.2.17
  Downloaded block-buffer v0.10.4
  Downloaded anstyle-parse v0.2.6
  Downloaded linux-raw-sys v0.9.3
   Compiling proc-macro2 v1.0.94
   Compiling unicode-ident v1.0.18
   Compiling memchr v2.7.4
   Compiling thiserror v2.0.12
   Compiling bitflags v2.9.0
   Compiling autocfg v1.4.0
   Compiling libc v0.2.171
   Compiling aho-corasick v1.1.3
   Compiling ident_case v1.0.1
   Compiling quote v1.0.40
   Compiling typenum v1.18.0
   Compiling syn v2.0.100
   Compiling rustix v1.0.2
   Compiling fnv v1.0.7
   Compiling version_check v0.9.5
   Compiling regex-syntax v0.8.5
   Compiling strsim v0.11.1
   Compiling generic-array v0.14.7
   Compiling linux-raw-sys v0.9.3
   Compiling utf8parse v0.2.2
   Compiling regex-automata v0.4.9
   Compiling darling_core v0.20.10
   Compiling thiserror-impl v2.0.12
   Compiling anstyle-parse v0.2.6
   Compiling darling_macro v0.20.10
   Compiling is_terminal_polyfill v1.70.1
   Compiling colorchoice v1.0.3
   Compiling anstyle-query v1.1.2
   Compiling anstyle v1.0.10
   Compiling ucd-trie v0.1.7
   Compiling serde v1.0.219
   Compiling anstream v0.6.18
   Compiling pest v2.7.15
error: could not compile `pest` (lib)
Caused by:
  process didn't exit successfully: `/usr/local/rustup/toolchains/1.85.0-aarch64-unknown-linux-musl/bin/rustc --crate-name pest --edition=2021 /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pest-2.7.15/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="memchr"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("const_prec_climber", "default", "memchr", "miette-error", "pretty-print", "std"))' -C metadata=ad1c6c26bc004204 -C extra-filename=-0e9f56b08d1b76c7 --out-dir /tmp/cargo-installIOc0qN/release/deps -C strip=debuginfo -L dependency=/tmp/cargo-installIOc0qN/release/deps --extern memchr=/tmp/cargo-installIOc0qN/release/deps/libmemchr-9f3e61bb84415a1a.rmeta --extern thiserror=/tmp/cargo-installIOc0qN/release/deps/libthiserror-12cc08f65ec944a5.rmeta --extern ucd_trie=/tmp/cargo-installIOc0qN/release/deps/libucd_trie-ef6ec1f78939dd4f.rmeta --cap-lints allow -C target-feature=-crt-static` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `mdbook-mermaid v0.14.1`, intermediate artifacts can be found at `/tmp/cargo-installIOc0qN`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
subprocess exited with status 101
subprocess exited with status 101
Error: building at STEP "RUN cargo install mdbook-mermaid": exit status 101
Backtrace

No backtrace is shown even with RUST_BACKTRACE=full

Maybe related, when installing cargo-tarpaulin, I get this error (also works on Podman 5.3):

error: failed to run custom build command for `openssl-sys v0.9.106`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
  process didn't exit successfully: `/tmp/cargo-install2Kt7oK/release/build/openssl-sys-503ba76cae0da31d/build-script-main` (signal: 6, SIGABRT: process abort signal)
  --- stderr
  fatal runtime error: code running before main must not use thread::current

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files or tests are named. First reproduce cargo install mdbook-mermaid and cargo install cargo-audit with rustc 1.85.0 on aarch64-unknown-linux-musl inside Alpine under Podman 5.4, then compare with Podman 5.3; done means the compiler no longer crashes with SIGSEGV or the related SIGABRT.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.