LLDB Stuck in llvm::vfs:: Loop

We’re experiencing an issue where LLDB freezes when debugging certain AST contexts. The sampled stack trace suggests that LLDB is stuck in an infinite loop with the following calls involved:

  • llvm::vfs::RedirectingFileSystem::status()
  • llvm::vfs::RedirectingFileSystem::getExternalStatus()
  • clang::FileSystemStatCache::get()
  1. Unfortunately, I don’t have a simple reproducer. The types log doesn’t have information populated, possibly because of the loop.
  2. swift-healthcheck is not an option, as we didn't type any expression.

FB: Feedback Assistant

Questions:

  1. Any recommendations for additional logging or debugging techniques to help diagnose the root cause?
  2. How can we configure a timeout in ~/.lldbInit-Xcode (e.g., some internally decided reasonable threshold X seconds) so that the loop/expr-eval terminates if the timeout is reached?

When I enabled all LLDB logs, I came across the following error. After some investigation, I narrowed it down to @objc enums with Int raw values triggering the issue. I have included a reproducer in the FB report.

[LLDBTypeInfoProvider] Could not find clang debug type info for 7SomeLib8ModeTypeO
[LLDBTypeInfoProvider] Could not find clang debug type info for 7SomeLib10ModeTypeV2O
$s7SomeLib10ModeTypeV2OSgD: unimplemented type info in GetEnumCaseName

Additionally, in the reproducer, swift-healthcheck also produces logs indicating the same issue.

[LLDBTypeInfoProvider] Could not find clang debug type info for 7SomeLib10ModeTypeV2O

cc: @Adrian_Prantl