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

loading cached compiler messages OOMs system #7736

Closed
matthiaskrgr opened this issue Dec 22, 2019 · 1 comment · Fixed by #7737
Closed

loading cached compiler messages OOMs system #7736

matthiaskrgr opened this issue Dec 22, 2019 · 1 comment · Fixed by #7737
Labels
C-bug Category: bug

Comments

@matthiaskrgr
Copy link
Member

Problem
I have a crate with a couple hundred dependencies for testing clippy/rustc.
When I cargo clippy on it in a way that it will generate A LOT of warnings, clippy will take several minutes to run on it but not OOM.
Running the same command again, (as cargo tries to load the error messages from cache I assume), I can see that cargo is trying to occupy 12+ gigabyte of ram within <30 seconds and I have to abort the process manually.
target/debug/.fingerprint/unicode-normalization-4895d5af05ae5f63/output is 11 gigabyte in size.

Steps

Run

RUSTC_BOOTSTRAP=1 RUSTFLAGS="-Z force-unstable-if-unmarked" RUST_BACKTRACE=full cargo clippy --all-targets --all-features -vvvv -- --cap-lints warn -W clippy::internal -W clippy::pedantic -W clippy::nursery -W missing-doc-code-examples  -W absolute-paths-not-starting-with-crate -W bare-trait-objects -W box-pointers -W elided-lifetimes-in-paths -Wellipsis-inclusive-range-patterns -W keyword-idents -W macro-use-extern-crate -W missing-copy-implementations  -W missing-debug-implementations -W missing-docs -W single-use-lifetimes -W trivial-casts -W trivial-numeric-casts -W unreachable-pub -W unsafe-code -W unstable-features -W unused-extern-crates -W unused-import-braces -W unused-labels -Wunused-lifetimes -Wunused-qualifications -Wunused-results -Wvariant-size-differences

twice on a crate that depends on unicode-normalization 0.1.7

Possible Solution(s)

Notes
I'm not sure why loading the messages seems to eat so much ram while printing/storing them was not that excessive.

Output of cargo version:
cargo 1.41.0-nightly (626f0f4 2019-12-03)

@Mark-Simulacrum
Copy link
Member

Fix in #7737.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants