Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap panics if lldb fails to start #126892

Closed
ChrisDenton opened this issue Jun 24, 2024 · 1 comment · Fixed by #127112
Closed

Bootstrap panics if lldb fails to start #126892

ChrisDenton opened this issue Jun 24, 2024 · 1 comment · Fixed by #127112
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. O-windows Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@ChrisDenton
Copy link
Member

ChrisDenton commented Jun 24, 2024

Running ./x test tests/ui --stage 1 on Windows I get:

thread 'main' panicked at src\core\build_steps\test.rs:1820:40:
"lldb" "-P" failed Output { status: ExitStatus(ExitStatus(3221225781)), stdout: "", stderr: "" }

This seems especially unfortunate because (as far as I know) ui tests don't require lldb. It works fine if there's no lldb in PATH at least.

This is ultimately an LLVM issue caused by not installing/shipping its own dependencies (in this case Python310). However, bootstrap shouldn't crash here. It should be treated similarly to lldb not existing unless it is actually necessary,

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 24, 2024
@jieyouxu jieyouxu added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself O-windows Operating system: Windows and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 24, 2024
@jieyouxu
Copy link
Member

The temporary workaround is ensuring that

you also need python310.dll in PATH otherwise bootstrap errors

@bors bors closed this as completed in 38983df Jun 29, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jun 29, 2024
Rollup merge of rust-lang#127112 - ChrisDenton:lldb, r=Kobzol

Bootstrap: Don't get output if `lldb --version` errors

fixes rust-lang#126892

`Command` can error in two ways: the OS can fail to run the binary at all or else the binary can return an error exit code. Unfortunately the distinction between the two is not clear cut. The OS may succeed in starting the binary but it may still error before `main` (e.g. if a necessary library fails to load) and this will be reported via the exit code.

Fortunately this case is simpler. We can assume that `lldb --version` will only ever error if there's a startup issue of some kind. so both kinds of errors are caused by the OS. Thus it's safe for us to treat them equally for the sake of this specific check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. O-windows Operating system: Windows T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants