Skip to content

Spurious test failure (SIGSEGV) in rust-analyzer hir-def test #156460

@RalfJung

Description

@RalfJung

This has started somewhat recently but now happens pretty often:

     Running unittests src/lib.rs (obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/hir_def-f381e8bd2208ec8b)

running 482 tests
test attrs::docs::tests::docs ... ok
test attrs::tests::crate_attrs ... ok
test expr_store::lower::path::tests::fn_like_path_with_coloncolon ... ok
test expr_store::lower::path::tests::hir_to_ast_crate_path ... ok
test expr_store::lower::path::tests::hir_to_ast_path_super_in_middle ... ok
test expr_store::lower::path::tests::hir_to_ast_plain_path ... ok
test expr_store::lower::path::tests::hir_to_ast_trait_ref ... ok
test expr_store::lower::path::tests::hir_to_ast_super_path ... ok
test expr_store::lower::path::tests::hir_to_ast_self_path ... ok
test expr_store::lower::path::tests::hir_to_ast_type_anchor_path ... ok
test expr_store::lower::path::tests::keywords_in_middle_fail_lowering2 ... ok
test expr_store::lower::path::tests::keywords_in_middle_fail_lowering3 ... ok
test expr_store::lower::path::tests::keywords_in_middle_fail_lowering1 ... ok
test expr_store::scope::tests::broken_inner_item ... ok
test expr_store::scope::tests::ref_patterns_contribute_bindings ... ok
test expr_store::scope::tests::match_guard_if_let ... ok
test expr_store::scope::tests::let_chains_can_reference_previous_lets ... ok
test expr_store::scope::tests::macro_inner_item ... ok
test expr_store::scope::tests::test_lambda_scope ... ok
test expr_store::scope::tests::test_call_scope ... ok
test expr_store::scope::tests::test_bindings_after_at ... ok
test expr_store::scope::tests::test_method_call_scope ... ok
test expr_store::scope::tests::test_match ... ok
test expr_store::scope::tests::test_loop_scope ... ok
test expr_store::scope::tests::test_resolve_local_name_declaration ... ok
test expr_store::scope::tests::test_shadow_variable ... ok
test expr_store::scope::tests::test_resolve_local_name ... ok
test expr_store::tests::body::array_element_cfg ... ok
test expr_store::scope::tests::test_resolve_local_name_shadow ... ok
test expr_store::tests::body::async_fn_weird_param_patterns ... ok
test expr_store::scope::tests::while_let_adds_binding ... ok
error: test failed, to rerun pass `-p hir-def --lib`

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/hir_def-f381e8bd2208ec8b '--skip=tests::smoke_test_real_sysroot_cargo' --skip=check_code_formatting -Z unstable-options --format json` (signal: 11, SIGSEGV: invalid memory reference)
Bootstrap failed while executing `--stage 2 test --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Build completed unsuccessfully in 1:08:32
  local time: Mon May 11 13:59:34 UTC 2026
  network time: Mon, 11 May 2026 13:59:34 GMT
##[error]Process completed with exit code 1.

Also see discussion on Zulip:

Example of affected PRs:
#156357 (comment)
#156451 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.E-needs-investigationCall for participation: This issues needs some investigation to determine current statusI-flaky-testIssue: A test is flaky/unreliable/spuriously failsT-rust-analyzerRelevant to the rust-analyzer team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions