Skip to content

tests/debuginfo/path.rs test failing on MacOS #156660

Closed

Description

@theemathas

Summary

The test in tests/debuginfo/path.rs is failing on the main branch on my computer.

Command used

./x test debuginfo -- path.rs

Expected behaviour

Test passes

Actual behaviour

Test fails. See log below.

Notable output include:

warning: `po` was unsuccessful, running `p` instead

and

warning: This version of LLDB has no plugin for the language "rust". Inspection of frame variables will be limited.

Bootstrap configuration (bootstrap.toml)

# See bootstrap.example.toml for documentation of available options
#
profile = "library"  # Includes one of the default files in src/bootstrap/defaults
change-id = 154587

Operating system

MacOS Tahoe 26.4

HEAD

281c97c

Additional context

Build Log

Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.25s
/Users/timc/rust/build/aarch64-apple-darwin/ci-llvm/bin/llvm-strip does not exist; skipping copy
Building stage1 compiler artifacts (stage0 -> stage1, aarch64-apple-darwin)
    Finished `release` profile [optimized] target(s) in 0.50s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage1 library artifacts (stage1 -> stage1, aarch64-apple-darwin)
    Finished `dist` profile [optimized] target(s) in 0.03s
Building stage1 compiletest (stage0 -> stage1, aarch64-apple-darwin)
    Finished `release` profile [optimized] target(s) in 0.20s
Testing stage1 with compiletest suite=debuginfo mode=debuginfo (aarch64-apple-darwin)

running 1 tests

[debuginfo-lldb] tests/debuginfo/path.rs ... F


failures:

---- [debuginfo-lldb] tests/debuginfo/path.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 2100

error: check directive(s) from `/Users/timc/rust/tests/debuginfo/path.rs` not found in debugger output. errors:
    (path.rs:12) `"/some/path"`
    (path.rs:16) `"/some/path"`
the following subset of check directive(s) was found successfully:
    (path.rs:10) `(std::path::PathBuf) "/some/path" { inner = "/some/path" { inner = { inner = size=10 { [0] = '/' [1] = 's' [2] = 'o' [3] = 'm' [4] = 'e' [5] = '/' [6] = 'p' [7] = 'a' [8] = 't' [9] = 'h' } } } } `
    (path.rs:14) `(&std::path::Path) "/some/path" { data_ptr = 0x0000000100000b58 length = 10 } `
status: exit status: 0
command: LLDB_BATCHMODE_SCRIPT_PATH="/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/path.debugger.script" LLDB_BATCHMODE_TARGET_PATH="/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/a" PATH="/Users/timc/rust/build/aarch64-apple-darwin/stage1/lib/rustlib/aarch64-apple-darwin/lib:/opt/homebrew/opt/rustup/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pkg/env/active/bin:/opt/pmk/env/global/bin:/Applications/iTerm.app/Contents/Resources/utilities" PYTHONPATH="/Users/timc/rust/src/etc" PYTHONUNBUFFERED="1" "lldb" "--one-line" "script --language python -- import lldb_batchmode; lldb_batchmode.main()"
--- stdout -------------------------------
(lldb) script --language python -- import lldb_batchmode; lldb_batchmode.main()
LLDB batch-mode script
----------------------
Debugger commands script is '/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/path.debugger.script'.
Target executable is '/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/a'.
Current working directory is '/Users/timc/rust'
Creating a target for '/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/a'
settings set auto-confirm true

settings set target.inherit-tcc true

version
lldb-2100.0.17.108 Apple Swift version 6.3.2 (swiftlang-6.3.2.1.108 clang-2100.1.1.101)
command script import /Users/timc/rust/src/etc/lldb_lookup.py
# LLDB iterates through these in reverse order to discover summaries/synthetics that means the top
# of the list can be "overwritten" by items lower on the list. Be careful when reordering items.
# Forces test-compliant formatting to all other types
type synthetic add -l lldb_lookup.synthetic_lookup -x ".*" --category Rust
# Std String
type synthetic add -l lldb_lookup.StdStringSyntheticProvider -x "^(alloc::([a-z_]+::)+)String$" --category Rust
type summary add -F lldb_lookup.StdStringSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)String$" --category Rust
# Std str
type synthetic add -l lldb_lookup.StdSliceSyntheticProvider -x "^&(mut )?str$" --category Rust
type summary add -F lldb_lookup.StdStrSummaryProvider -e -x -h "^&(mut )?str$" --category Rust
## MSVC
type synthetic add -l lldb_lookup.MSVCStrSyntheticProvider -x "^ref(_mut)?\$<str\$>$" --category Rust
type summary add -F lldb_lookup.StdStrSummaryProvider -e -h -x "^ref(_mut)?\$<str\$>$" --category Rust
# Array/Slice
type synthetic add -l lldb_lookup.StdSliceSyntheticProvider -x "^&(mut )?\\[.+\\]$" --category Rust
type summary add -F lldb_lookup.SizeSummaryProvider -e -x -h "^&(mut )?\\[.+\\]$" --category Rust
## MSVC
type synthetic add -l lldb_lookup.MSVCStdSliceSyntheticProvider -x "^ref(_mut)?\$<slice2\$<.+> >" --category Rust
type summary add -F lldb_lookup.StdSliceSummaryProvider -e -x -h "^ref(_mut)?\$<slice2\$<.+> >" --category Rust
# OsString
type summary add -F lldb_lookup.StdOsStringSummaryProvider -e -x -h "^(std::ffi::([a-z_]+::)+)OsString$" --category Rust
# Vec
type synthetic add -l lldb_lookup.StdVecSyntheticProvider -x "^(alloc::([a-z_]+::)+)Vec<.+>$" --category Rust
type summary add -F lldb_lookup.SizeSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)Vec<.+>$" --category Rust
# VecDeque
type synthetic add -l lldb_lookup.StdVecDequeSyntheticProvider -x "^(alloc::([a-z_]+::)+)VecDeque<.+>$" --category Rust
type summary add -F lldb_lookup.SizeSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)VecDeque<.+>$" --category Rust
# HashMap
type synthetic add -l lldb_lookup.classify_hashmap -x "^(std::collections::([a-z_]+::)+)HashMap<.+>$" --category Rust
type summary add -F lldb_lookup.SizeSummaryProvider -e -x -h "^(std::collections::([a-z_]+::)+)HashMap<.+>$" --category Rust
# HashSet
type synthetic add -l lldb_lookup.classify_hashset -x "^(std::collections::([a-z_]+::)+)HashSet<.+>$" --category Rust
type summary add -F lldb_lookup.SizeSummaryProvider -e -x -h "^(std::collections::([a-z_]+::)+)HashSet<.+>$" --category Rust
# Rc
type synthetic add -l lldb_lookup.StdRcSyntheticProvider -x "^(alloc::([a-z_]+::)+)Rc<.+>$" --category Rust
type summary add -F lldb_lookup.StdRcSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)Rc<.+>$" --category Rust
# Arc
type synthetic add -l lldb_lookup.arc_synthetic -x "^(alloc::([a-z_]+::)+)Arc<.+>$" --category Rust
type summary add -F lldb_lookup.StdRcSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)Arc<.+>$" --category Rust
# Cell
type synthetic add -l lldb_lookup.StdCellSyntheticProvider -x "^(core::([a-z_]+::)+)Cell<.+>$" --category Rust
# RefCell
type synthetic add -l lldb_lookup.StdRefSyntheticProvider -x "^(core::([a-z_]+::)+)Ref(Cell|Mut)?<.+>$" --category Rust
type summary add -F lldb_lookup.StdRefSummaryProvider -e -x -h "^(core::([a-z_]+::)+)Ref(Cell|Mut)?<.+>$" --category Rust
# NonZero
type summary add -F lldb_lookup.StdNonZeroNumberSummaryProvider -e -x -h "^(core::([a-z_]+::)+)NonZero(<.+>|I\d{0,3}|U\d{0,3})$" --category Rust
# PathBuf
type summary add -F lldb_lookup.StdPathBufSummaryProvider -e -x -h "^(std::([a-z_]+::)+)PathBuf$" --category Rust
# Path
type summary add -F lldb_lookup.StdPathSummaryProvider -e -x -h "^&(mut )?(std::([a-z_]+::)+)Path$" --category Rust
# Enum
# type summary add -F lldb_lookup.ClangEncodedEnumSummaryProvider -e -h "lldb_lookup.is_sum_type_enum" --recognizer-function --category Rust
## MSVC
type synthetic add -l lldb_lookup.MSVCEnumSyntheticProvider -x "^enum2\$<.+>$" --category Rust
type summary add -F lldb_lookup.MSVCEnumSummaryProvider -e -x -h "^enum2\$<.+>$" --category Rust
## MSVC Variants
type synthetic add -l lldb_lookup.synthetic_lookup -x "^enum2\$<.+>::.*$" --category Rust
# Tuple
type synthetic add -l lldb_lookup.TupleSyntheticProvider -x "^\(.*\)$" --category Rust
type summary add -F lldb_lookup.TupleSummaryProvider -x "^\(.*\)$" --category Rust
## MSVC
type synthetic add -l lldb_lookup.MSVCTupleSyntheticProvider -x "^tuple\$<.+>$" --category Rust
type summary add -F lldb_lookup.TupleSummaryProvider -e -x -h "^tuple\$<.+>$" --category Rust
type category enable Rust

breakpoint set --file 'path.rs' --line 24
DEBUG: breakpoint added, id = 1
Breakpoint 1: where = a`path::main + 52 at path.rs:24:5, address = 0x000000010000096c
DEBUG: registering breakpoint callback, id = 1
Error while trying to register breakpoint callback, id = 1, message = error: could not get num args: can't find callable: breakpoint_callback

run
Process 25396 launched: '/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/a' (arm64) Process 25396 stopped * thread #1, name = 'main', queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: 0x000000010000096c a`path::main at path.rs:24:5 21 let path = Path::new("/some/path"); 22 let pathbuf = path.to_path_buf(); 23 -> 24 zzz(); // #break ^ 25 } 26 27 fn zzz() { Target 0: (a) stopped.
print pathbuf
(std::path::PathBuf) "/some/path" { inner = "/some/path" { inner = { inner = size=10 { [0] = '/' [1] = 's' [2] = 'o' [3] = 'm' [4] = 'e' [5] = '/' [6] = 'p' [7] = 'a' [8] = 't' [9] = 'h' } } } }
po pathbuf
warning: `po` was unsuccessful, running `p` instead (std::path::PathBuf) "/some/path" { inner = "/some/path" { inner = { inner = size=10 { [0] = '/' [1] = 's' [2] = 'o' [3] = 'm' [4] = 'e' [5] = '/' [6] = 'p' [7] = 'a' [8] = 't' [9] = 'h' } } } }
print path
(&std::path::Path) "/some/path" { data_ptr = 0x0000000100000b58 length = 10 }
po path
warning: `po` was unsuccessful, running `p` instead (&std::path::Path) "/some/path" { data_ptr = 0x0000000100000b58 length = 10 }
quit
------------------------------------------
--- stderr -------------------------------
warning: This version of LLDB has no plugin for the language "rust". Inspection of frame variables will be limited.
------------------------------------------

---- [debuginfo-lldb] tests/debuginfo/path.rs stdout end ----

failures:
    [debuginfo-lldb] tests/debuginfo/path.rs

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 172 filtered out; finished in 1.83s

Some tests failed in compiletest suite=debuginfo mode=debuginfo host=aarch64-apple-darwin target=aarch64-apple-darwin
Build completed unsuccessfully in 0:00:05

Output of lldb --version:

lldb-2100.0.17.108
Apple Swift version 6.3.2 (swiftlang-6.3.2.1.108 clang-2100.1.1.101)

Activity

  1. added
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    C-bugCategory: This is a bug.
    on May 17, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on May 17, 2026
  3. self-assigned this
    on May 20, 2026
  4. added
    A-testsuiteArea: The testsuite used to check the correctness of rustc
    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on May 20, 2026
  5. jieyouxu commented on May 20, 2026

    @jieyouxu
    Member

    @theemathas do you happen to know if that worked for you previously? Or is it from a newer lldb version?

  6. added
    E-needs-investigationCall for participation: This issues needs some investigation to determine current status
    and removed
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    on May 20, 2026
  7. jieyouxu commented on May 20, 2026

    @jieyouxu
    Member

    Yeah, I can repro locally too with

    lldb-2100.0.16.12
    Apple Swift version 6.3.1 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
    
  8. jieyouxu commented on May 20, 2026

    @jieyouxu
  9. jieyouxu commented on May 20, 2026

    @jieyouxu
    Member

    (I can't look into this during this week, but I'll try to take a look next week.)

  10. theemathas commented on May 21, 2026

    @theemathas
    ContributorAuthor

    @theemathas do you happen to know if that worked for you previously? Or is it from a newer lldb version?

    This issue happened on a brand new laptop.

  11. theemathas commented on May 21, 2026

    @theemathas
    ContributorAuthor

    Also reproduces on a different laptop with

    lldb-2100.0.16.4
    Apple Swift version 6.3 (swiftlang-6.3.0.123.5 clang-2100.0.123.102)
    

    I've ran all tests on this laptop before, but it has been a while, so I don't know what might have changed since then. Maybe it's the MacOS upgrade from Sequoia to Tahoe?

  12. jieyouxu commented on May 22, 2026

    @jieyouxu
    Member

    Current investigation notes:

    • Error while trying to register breakpoint callback, id = 1, message = error: could not get num args: can't find callable: breakpoint_callback is another point of interest. The callback registration fails AFAICT because at the point in lldb batchmode script, the execution context (or whatever) doesn't actually have lldb_batchmode.py itself loaded? EDIT: but this does not fail with vanilla lldb I think?
    • Against macpors lldb 17, 18, 19, 20, 21 this test passes
    • However, lldb 21 (system-ish) po is failing 🤔
    • Macports lldb 22 / homebrew lldb 22 are failing
  13. removed their assignment
    on May 22, 2026
  14. jieyouxu commented on May 22, 2026

    @jieyouxu
  15. jieyouxu commented on May 22, 2026

    @jieyouxu
  16. jieyouxu commented on May 23, 2026

    @jieyouxu
    Member

    Did some more digging, see #156769 (comment). TL;DR: I believe the check relied on silent fallback behavior for something that never "properly" worked, and the fallback became no longer silent (produces a warning on newer lldb) which causes the "exact" check to of course fail.

  17. removed
    E-needs-investigationCall for participation: This issues needs some investigation to determine current status
    on May 23, 2026
  18. added a commit that references this issue on May 24, 2026
    4474668
  19. added a commit that references this issue on May 24, 2026
    30e8a87
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-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.O-macosOperating system: macOST-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)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