Skip to content

LLVM recursion stack overflow when buildin fresh #150691

Description

@madonuko

If you are very energetic and wants to do something very challenging, well here comes a very difficult-to-repro issue:

https://gist.github.com/madonuko/8cb7959b33f9f31e8221f23d5e2a95a9

I know rust, but I didn't write the code, I just tried to package this into terrapkg/packages#8917.

rpmbuild │ error: rustc interrupted by SIGSEGV, printing backtrace
rpmbuild │ 
rpmbuild │ /lib64/librustc_driver-c19429d635bbd64e.so(+0x75afef) [0x7fd74f5c3fef]
rpmbuild │ /lib64/libc.so.6(+0x19f90) [0x7fd74ec8ff90]
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a5e55) [0x7fd74a9a5e55]
rpmbuild │ 
rpmbuild │ ### cycle encountered after 3 frames with period 4
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a60d4) [0x7fd74a9a60d4]
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a60d4) [0x7fd74a9a60d4]
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a60d4) [0x7fd74a9a60d4]
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a60d4) [0x7fd74a9a60d4]
rpmbuild │ ### recursed 63 times
rpmbuild │ 
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a60d4) [0x7fd74a9a60d4]
rpmbuild │ 
rpmbuild │ note: rustc unexpectedly overflowed its stack! this is a bug
rpmbuild │ note: maximum backtrace depth reached, frames may have been lost
rpmbuild │ note: we would appreciate a report at https://github.com/rust-lang/rust
rpmbuild │ help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
rpmbuild │ sccache: Compiler killed by signal 11
rpmbuild │ warning: fresh-editor@0.1.70: Generated locale options with 12 locales
rpmbuild │ warning: fresh-editor@0.1.70: Generated plugins/lib/fresh.d.ts with 103 ops and 21 interfaces
rpmbuild │ error: could not compile `fresh-editor` (lib)
rpmbuild │ 
rpmbuild │ Caused by:
rpmbuild │   process didn't exit successfully: `sccache /usr/bin/rustc --crate-name fresh --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 -C split-debuginfo=packed --cfg 'feature="default"' --cfg 'feature="embed-plugins"' --cfg 'feature="plugins"' --cfg 'feature="runtime"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("default", "dev-bins", "embed-plugins", "plugins", "runtime", "schema-only"))' -C metadata=3fed27ae5032d961 -C extra-filename=-25b9882c2da4b565 --out-dir /root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps -L dependency=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps --extern alacritty_terminal=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libalacritty_terminal-25b4782d25f019f1.rmeta --extern anyhow=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libanyhow-fc28200dd619b1a0.rmeta --extern arboard=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libarboard-e7b0c9d0742278e5.rmeta --extern async_trait=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libasync_trait-ee030a5354d34fec.so --extern chrono=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libchrono-e98223259a0b6c0a.rmeta --extern clap=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libclap-7d19fc781a035366.rmeta --extern crossterm=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libcrossterm-b23ae4fbf74367a0.rmeta --extern deno_ast=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libdeno_ast-74f62be517fa0a7a.rmeta --extern deno_core=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libdeno_core-c7a9e939e273e389.rmeta --extern deno_error=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libdeno_error-bc50f4569bf089c5.rmeta --extern dirs=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libdirs-f7d3d1621a815573.rmeta --extern ignore=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libignore-9f7eb26b5a11aa6e.rmeta --extern include_dir=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libinclude_dir-8f1dcb78fb120048.rmeta --extern libc=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/liblibc-0ff57ed2289b9b14.rmeta --extern libloading=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/liblibloading-f967c18aa754b10b.rmeta --extern lru=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/liblru-50e421b529f698e1.rmeta --extern lsp_types=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/liblsp_types-472ab56b0660d6ba.rmeta --extern nix=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libnix-e8e06d268004f03b.rmeta --extern once_cell=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libonce_cell-3baeb423f1cff178.rmeta --extern portable_pty=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libportable_pty-a28090ff13c7c6bb.rmeta --extern pulldown_cmark=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libpulldown_cmark-77361b4d79d1f20e.rmeta --extern ratatui=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libratatui-0f49aeddaf0bd900.rmeta --extern regex=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libregex-e169ad73ba8109b9.rmeta --extern rust_i18n=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/librust_i18n-16b218b72499cbc4.rmeta --extern schemars=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libschemars-f469a3eadbd91a16.rmeta --extern serde=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libserde-cdb8b972371602b8.rmeta --extern serde_json=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libserde_json-96783494a5888979.rmeta --extern sha2=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libsha2-d6c7622757ca7769.rmeta --extern syntect=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libsyntect-17bddcfbd248091d.rmeta --extern tempfile=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtempfile-ac6d14c62747d1b4.rmeta --extern tokio=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtokio-6845fd1b1469c928.rmeta --extern tracing=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtracing-fcfaad432a349d95.rmeta --extern tracing_subscriber=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtracing_subscriber-28dc4dd42ede4178.rmeta --extern trash=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtrash-e2cfcc970c5bb1bf.rmeta --extern tree_sitter=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter-87a5a856cfdddf82.rmeta --extern tree_sitter_bash=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_bash-6dc6da67099ab5b6.rmeta --extern tree_sitter_c=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_c-a6886e0c18252258.rmeta --extern tree_sitter_c_sharp=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_c_sharp-3fc8fabd8967cec1.rmeta --extern tree_sitter_cpp=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_cpp-0f1e88494233a51b.rmeta --extern tree_sitter_css=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_css-4fc8090d43921eac.rmeta --extern tree_sitter_go=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_go-0042f91bb118c490.rmeta --extern tree_sitter_highlight=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_highlight-ed2ff504bd2b62b7.rlib --extern tree_sitter_html=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_html-7e436c84a2159b5a.rmeta --extern tree_sitter_java=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_java-4b2ef41c43659fa0.rmeta --extern tree_sitter_javascript=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_javascript-782861e6c85517c0.rmeta --extern tree_sitter_json=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_json-c86724fbdb2c0bf4.rmeta --extern tree_sitter_lua=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_lua-04a37a6d092c859f.rmeta --extern tree_sitter_pascal=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_pascal-4f023e0334f911cb.rmeta --extern tree_sitter_php=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_php-f2c2695a912abd68.rmeta --extern tree_sitter_python=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_python-011ba246765436d2.rmeta --extern tree_sitter_ruby=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_ruby-5ed93ed443fc7a03.rmeta --extern tree_sitter_rust=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_rust-18012059d63a3c37.rmeta --extern tree_sitter_typescript=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libtree_sitter_typescript-e3e51f8f0db8ab82.rmeta --extern unicode_segmentation=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libunicode_segmentation-c39e81cb76dbf5f7.rmeta --extern unicode_width=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libunicode_width-2d3cb584ad27d583.rmeta --extern ureq=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/libureq-d92edfce76f063a8.rmeta --extern url=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/deps/liburl-974fd041defa123b.rmeta -Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn -C link-arg=-fuse-ld=mold -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/psm-0aca3e5615d4fab2/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/onig_sys-2269754da89e3ebd/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-194ad682058d723c/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-bash-daf98d35db8e1b1b/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-c-7b701f1cc2964ef5/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-c-sharp-15f02f6d4e4dee04/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-cpp-27e5738335cd46aa/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-css-f25e7c00fdf34d30/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-go-7e78fdf2138c635d/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-html-b7eebe0387fa8b96/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-java-8ee81d38e4e4c493/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-javascript-eeb8abc310331390/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-json-571f132699736d64/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-lua-66c01eab98cf9e63/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-pascal-06e5f70d5761dd1d/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-php-a1f13293db5acf40/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-python-8019467f1722427f/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-ruby-8520c05cff82d31c/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-rust-bb65ffdf5a7afc80/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/build/tree-sitter-typescript-3d9ae403f3b23e4d/out -L native=/root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpmbuild │ ing-b472b3c39cad7629/out -L /root/rpmbuild/BUILD/fresh-0.1.70-build/fresh-0.1.70/target/rpm/gn_out/obj` (exit status: 254)

Meta

rustc --version --verbose:

rustc 1.92.0 (ded5c06cf 2025-12-08) (Fedora 1.92.0-1.fc44)
binary: rustc
commit-hash: ded5c06cf21d2b93bffd5d884aa6e96934ee4234
commit-date: 2025-12-08
host: x86_64-unknown-linux-gnu
release: 1.92.0
LLVM version: 21.1.7
Backtrace

rpmbuild │ sccache: warning: The server looks like it shut down unexpectedly, compiling locally instead
rpmbuild │ error: rustc interrupted by SIGSEGV, printing backtrace
rpmbuild │ 
rpmbuild │ /lib64/librustc_driver-c19429d635bbd64e.so(+0x75afef) [0x7f07072fafef]
rpmbuild │ /lib64/libc.so.6(+0x19f90) [0x7f07069c6f90]
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a5e55) [0x7f07026dce55]
rpmbuild │ 
rpmbuild │ ### cycle encountered after 3 frames with period 4
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a60d4) [0x7f07026dd0d4]
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a60d4) [0x7f07026dd0d4]
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a60d4) [0x7f07026dd0d4]
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a60d4) [0x7f07026dd0d4]
rpmbuild │ ### recursed 63 times
rpmbuild │ 
rpmbuild │ /lib64/libLLVM.so.21.1(+0x46a60d4) [0x7f07026dd0d4]
rpmbuild │ 
rpmbuild │ note: rustc unexpectedly overflowed its stack! this is a bug
rpmbuild │ note: maximum backtrace depth reached, frames may have been lost
rpmbuild │ note: we would appreciate a report at https://github.com/rust-lang/rust
rpmbuild │ help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jan 5, 2026
  2. madonuko commented on Jan 5, 2026

    @madonuko
    Author

    So to further explain what's happening:

    • The anda tool calls rpmbuild, which parses and execute instructions in the RPM spec file.
    • The %cargo_build macro is invoked. This is equivalent to /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' /usr/bin/cargo build -j${RPM_BUILD_NCPUS} -Z avoid-dev-deps --profile rpm.
    • However rpmbuild would define other environment variables automatically based on other factors that I would not like to explain here.
    • Once it fails, if you run anda, the build process starts all over again, removing previous build files.
    • The build files are not removed after it fails. You can access them at /root/rpmbuild/BUILD/.
  3. added
    I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
    on Jan 5, 2026
  4. sethigris commented on Jan 5, 2026

    @sethigris
  5. theemathas commented on Jan 5, 2026

    @theemathas
  6. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Jan 5, 2026
  7. sethigris commented on Jan 5, 2026

    @sethigris
  8. Noratrieb commented on Jan 5, 2026

    @Noratrieb
  9. theemathas commented on Jan 5, 2026

    @theemathas
  10. sethigris commented on Jan 5, 2026

    @sethigris
  11. oli-obk commented on Jan 5, 2026

    @oli-obk
  12. sethigris commented on Jan 5, 2026

    @sethigris
  13. added
    S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.
    on Jan 5, 2026
  14. Noratrieb commented on Jan 5, 2026

    @Noratrieb
    Member

    About the issue itself: Since libLLVM has been stripped of all symbols, it's impossible to figure out anything about what could have caused the issue and whether this may be a known bug. Might be infinite recursion, might just be deeply nested recursion that hits the stack limit.

  15. 5 remaining items

  16. sethigris commented on Jan 5, 2026

    @sethigris

    @workingjubilee So this is a Fedora packaging issue, not an LLVM limitation.

  17. Noratrieb commented on Jan 5, 2026

    @Noratrieb
    Member

    No. The bug likely not anything Fedora-specific. It's just that Fedora's packaging makes it harder to quickly infer whether this could be related to another bug. As pointed out by @saethlin, this issue will need to be fully reproduced and debugged by someone to figure out what's really going on.

  18. added
    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
    on Jan 5, 2026
  19. Noratrieb commented on Jan 5, 2026

    @Noratrieb
    Member

    I tried to reproduce the issue since you posted a convenient dockerfile, but it does not work for me:

    0.293 Building RPMs in anda-build/rpm
    0.326 rpmbuild │ warning: Downloading https://github.com/sinelaw/fresh/archive/refs/tags/v0.1.70.tar.gz to /packages/anda/langs/rust/fresh/v0.1.70.tar.gz
    1.183 rpmbuild │ setting SOURCE_DATE_EPOCH=1766793600
    1.230 rpmbuild │ error: Failed build dependencies:
    1.230 rpmbuild │ 	cargo is needed by fresh-0.1.70-1.fcrawhide.x86_64
    1.230 rpmbuild │ 	cargo-rpm-macros is needed by fresh-0.1.70-1.fcrawhide.x86_64
    1.230 rpmbuild │ 	pkgconfig(icu-uc) is needed by fresh-0.1.70-1.fcrawhide.x86_64
    1.230 rpmbuild │
    1.230 rpmbuild │ RPM build warnings:
    1.230 rpmbuild │     Downloading https://github.com/sinelaw/fresh/archive/refs/tags/v0.1.70.tar.gz to /packages/anda/langs/rust/fresh/v0.1.70.tar.gz
    1.247   2026-01-05T20:16:20.364498Z  INFO anda::util: Command exited with status: exit status: 11
    1.247     at src/util.rs:179
    1.247
    1.248 Error:
    1.248    0: Failed to build RPMs
    1.248    1: Command exited with status: exit status: 11
    1.248
    1.248 Location:
    1.248    src/util.rs:180
    1.248
    1.248 Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
    1.248 Run with RUST_BACKTRACE=full to include source snippets.
    

    What do I need to do to actually reproduce the problem? Looking at the build log on your PR in GHA, I found out that the built program is https://github.com/sinelaw/fresh (this would have been helpful to clarify).

  20. Noratrieb commented on Jan 5, 2026

    @Noratrieb
    Member

    When it comes to debugging these issues, the most important thing is always to get rid of as many tools and wrappers as possible and reproduce the issue with a setup that's as simple as possible, so I would advise trying that.

  21. changed the title [-]recursion stack overflow with sccache[/-] [+]LLVM recursion stack overflow with sccache when buildin fresh[/+] on Jan 5, 2026
  22. madonuko commented on Jan 6, 2026

    @madonuko
    Author

    So turns out I forgot to test my dockerfile (thought I did); updated it to pull build dependencies too.

    edit 1: I am now trying to remove the entire rpmbuild and anda stack

    edit 2: still trying to reduce the stack, but seems like sccache is not at fault

  23. madonuko commented on Jan 6, 2026

    @madonuko
    Author

    removed most of the rpm stuff and sccache from the Dockerfile

    also, for the debug symbols, if you open gdb and analyze it it will automatically download the symbols iirc

  24. changed the title [-]LLVM recursion stack overflow with sccache when buildin fresh[/-] [+]LLVM recursion stack overflow when buildin fresh[/+] on Jan 6, 2026
  25. cuviper commented on Jan 6, 2026

    @cuviper
    Member

    also, for the debug symbols, if you open gdb and analyze it it will automatically download the symbols iirc

    Yes, because gdb uses libdebuginfod.so, and Fedora hosts such a server.

    For symbols only, rpm-built binaries also include so-called "mini debuginfo" in the .gnu_debugdata section, which would be nice to support in Rust backtraces -- rust-lang/backtrace-rs#430.

  26. workingjubilee commented on Jan 6, 2026

    @workingjubilee
    Member

    Oh, that's on me to fix! Got it.

    Yes, loading libdebuginfod.so into random Rust binaries seems suboptimal as a way of extracting traces. I'm lazy and want my information without even starting gdb, which is why I instead write... software... to extract information that gdb does... look, I know it doesn't make sense!

  27. cuviper commented on Jan 6, 2026

    @cuviper
    Member

    Sure, I agree that libdebuginfod.so should not be introduced everywhere, and especially not in a process that's about to die. At least .gnu_debugdata is local, but it's not an allocated section, so you do still have to open it from disk. I guess that may make it no-go for rustc's SIGSEGV handler too.

    You still get a core dump though, right? Then you can investigate with fuller tooling afterward.
    ("you" != @workingjubilee in particular 😉 )

  28. cuviper commented on Jan 6, 2026

    @cuviper
    Member

    @madonuko I think your gist also needs the cargo-config file that you're copying in. Once we have that, it should be independent of actual rpm machinery, and it might be possible to also try the same configuration/environment/etc. on the upstream docker rust image.

  29. cuviper commented on Jan 6, 2026

    @cuviper
    Member

    Here's an attempt to decode the top comment's addresses, assuming current llvm-libs-21.1.8-1.fc44.x86_64 was used:

    $ eu-addr2line -Cfi -e /lib64/libLLVM.so.21.1 0x46a5e55
    llvm::LiveInterval* const* llvm::SmallVectorTemplateCommon<llvm::LiveInterval*, void>::reserveForParamAndGetAddressImpl<llvm::SmallVectorTemplateBase<llvm::LiveInterval*, true> >(llvm::SmallVectorTemplateBase<llvm::LiveInterval*, true>*, llvm::LiveInterval* const&, unsigned long) inlined at /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/ADT/SmallVector.h:538:9 in (anonymous namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRef<llvm::MachineInstr*>)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/ADT/SmallVector.h:233:9
    llvm::SmallVectorTemplateBase<llvm::LiveInterval*, true>::reserveForParamAndGetAddress(llvm::LiveInterval*&, unsigned long)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/ADT/SmallVector.h:538:9
    llvm::SmallVectorImpl<llvm::LiveInterval*>::append(unsigned long, llvm::LiveInterval*)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/ADT/SmallVector.h:694:29
    llvm::SmallVectorImpl<llvm::LiveInterval*>::resize(unsigned long, llvm::LiveInterval*)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/ADT/SmallVector.h:661:11
    llvm::IndexedMap<llvm::LiveInterval*, llvm::VirtReg2IndexFunctor>::resize(unsigned long)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/ADT/IndexedMap.h:62:16
    llvm::IndexedMap<llvm::LiveInterval*, llvm::VirtReg2IndexFunctor>::grow(llvm::Register)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/ADT/IndexedMap.h:72:9
    llvm::LiveIntervals::createEmptyInterval(llvm::Register)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/CodeGen/LiveIntervals.h:151:22
    llvm::LiveIntervals::createAndComputeVirtRegInterval(llvm::Register)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/CodeGen/LiveIntervals.h:158:24
    llvm::LiveIntervals::getInterval(llvm::Register)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/CodeGen/LiveIntervals.h:137:12
    (anonymous namespace)::RegisterCoalescer::joinVirtRegs(llvm::CoalescerPair&)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/lib/CodeGen/RegisterCoalescer.cpp:3671:28
    (anonymous namespace)::RegisterCoalescer::joinIntervals(llvm::CoalescerPair&)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/lib/CodeGen/RegisterCoalescer.cpp:3849:50
    (anonymous namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&, llvm::SmallPtrSetImpl<llvm::MachineInstr*>&)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/lib/CodeGen/RegisterCoalescer.cpp:2166:8
    (anonymous namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRef<llvm::MachineInstr*>)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/lib/CodeGen/RegisterCoalescer.cpp:4066:20
    
    $ eu-addr2line -Cfi -e /lib64/libLLVM.so.21.1 0x46a60d4
    llvm::MCRegister::isPhysicalRegister(unsigned int) inlined at /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/CodeGen/Register.h:56:12 in (anonymous namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRef<llvm::MachineInstr*>)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/MC/MCRegister.h:59:36
    llvm::Register::isPhysicalRegister(unsigned int)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/CodeGen/Register.h:56:12
    llvm::Register::isPhysical() const
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/CodeGen/Register.h:78:46
    llvm::LiveIntervals::createInterval(llvm::Register)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/lib/CodeGen/LiveIntervals.cpp:224:22
    llvm::LiveIntervals::createEmptyInterval(llvm::Register)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/CodeGen/LiveIntervals.h:153:16
    llvm::LiveIntervals::createAndComputeVirtRegInterval(llvm::Register)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/CodeGen/LiveIntervals.h:158:24
    llvm::LiveIntervals::getInterval(llvm::Register)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/include/llvm/CodeGen/LiveIntervals.h:137:12
    (anonymous namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&, llvm::SmallPtrSetImpl<llvm::MachineInstr*>&)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/lib/CodeGen/RegisterCoalescer.cpp:2141:33
    (anonymous namespace)::RegisterCoalescer::copyCoalesceWorkList(llvm::MutableArrayRef<llvm::MachineInstr*>)
    /usr/src/debug/llvm-21.1.8-1.fc44.x86_64/llvm/lib/CodeGen/RegisterCoalescer.cpp:4066:20
    
  30. madonuko commented on Jan 7, 2026

    @madonuko
    Author

    I think your gist also needs the cargo-config file that you're copying in.

    totally forgot about that, added that into the gist too.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions