Skip to content

x.py has exponental resource usage with no progress #72523

Closed
@Kixiron

Description

@Kixiron

I attempted to use x.py with all of the following commands

$ python x.py --help
$ python x.py build -j1 --stage 1 src/libstd
$ python x.py build -i -j1 --stage 1 src/libstd
$ python x.py build -i --stage 1 src/libstd

but instead of doing what it's supposed to do, there was instead zero terminal output and and continuously increasing number of spawned python processes, ranging from 3827 pythons with x.py --help to well over 10000 pythons with python x.py build -j1 --stage 1 src/libstd. This number was steadily increasing though, I just had to kill it before my computer crashed. Killing the builds was also incredibly difficult, ctrl+cs do nothing, task manager crashes when it's opened and x'ing the window does nothing. The only semi-reliable way I found to kill the process was to kill every python process that was running, then x.py exited with still no output. On the python x.py build -i --stage 1 src/libstd command in particular, the spawning was so out of control that I had to restart my entire system in order to regain control.

This was the first build of rustc that I've done, so there were no prior or cached artifacts

Meta

Arch

Windows 10 Pro version 1909, OS build 18363.836
Python 3.7.3
The results were the same in both Powershell and CMD

Git

This occurred on 4774f9b, but I haven't attempted to bisect for the root cause yet

config.toml

These were the only configuration values that I changed

[llvm]
assertions = true

[build]
verbose = 1
profiler = true

[rust]
debug = true
codegen-units = 0
debug-assertions = true
backtrace = true
parallel-compiler = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-windowsOperating system: WindowsT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions