Skip to content

x.py clean fails to delete the rustbuild executable on Windows and panics #82520

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

Closed
wesleywiser opened this issue Feb 25, 2021 · 2 comments
Closed
Labels
A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust 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

@wesleywiser
Copy link
Member

Rustbuild fails to delete itself when cleaning on Windows and panics:

PS D:\code\rust> python x.py clean
Updating only changed submodules
Submodules updated in 0.13 seconds
thread 'main' panicked at 'failed to remove file D:\code\rust\build\bootstrap\debug\bootstrap.exe: Access is denied. (os error 
5)', src\bootstrap\clean.rs:80:17
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/05b6023675d77979637b04a350c85903fbf59257\/library\std\src\panicking.rs:493
   1: std::panicking::begin_panic_fmt
             at /rustc/05b6023675d77979637b04a350c85903fbf59257\/library\std\src\panicking.rs:435
   2: bootstrap::clean::do_op::{{closure}}<closure-0>
             at .\src\bootstrap\clean.rs:80
   3: core::result::Result<tuple<>, std::io::error::Error>::unwrap_or_else<tuple<>,std::io::error::Error,closure-0>
             at /rustc/05b6023675d77979637b04a350c85903fbf59257\library\core\src\result.rs:825
   4: bootstrap::clean::do_op<closure-0>
             at .\src\bootstrap\clean.rs:79
   5: bootstrap::clean::rm_rf
             at .\src\bootstrap\clean.rs:54
   6: bootstrap::clean::rm_rf
             at .\src\bootstrap\clean.rs:59
   7: bootstrap::clean::rm_rf
             at .\src\bootstrap\clean.rs:59
   8: bootstrap::clean::clean
             at .\src\bootstrap\clean.rs:24
   9: bootstrap::Build::build
             at .\src\bootstrap\lib.rs:486
  10: bootstrap::main
             at .\src\bootstrap\bin\main.rs:30
  11: core::ops::function::FnOnce::call_once<fn(),tuple<>>
             at /rustc/05b6023675d77979637b04a350c85903fbf59257\library\core\src\ops\function.rs:227
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failed to run: D:\code\rust\build\bootstrap\debug\bootstrap clean
Build completed unsuccessfully in 0:00:28
@wesleywiser wesleywiser added O-windows Operating system: Windows 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 or seasoned contributors to Rust labels Feb 25, 2021
@jyn514
Copy link
Member

jyn514 commented Feb 25, 2021

This should have been fixed by #82177. Can you rebase over that change and see if it works?

@wesleywiser
Copy link
Member Author

Ah, I thought this was reported recently but couldn't find the bug report. Thanks @jyn514!

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 or seasoned contributors to Rust 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

No branches or pull requests

2 participants