Stream: t-compiler/rust-analyzer

Topic: Hangs/cargo lock contention


Dirkjan Ochtman (Nov 10 2020 at 20:35, on Zulip):

I'm seeing some issues today where RA processes seem to get stuck for a long time, ostensibly while holding the Cargo lock

Dirkjan Ochtman (Nov 10 2020 at 20:36, on Zulip):

even for quite a bit after closing my VS Code processes, I saw like 5-6 rust-analyzer-mac processes sitting around while the cargo check process I started in another terminal was sitting there waiting for the build lock

Dirkjan Ochtman (Nov 10 2020 at 20:36, on Zulip):

is this a known issue? any recent PRs that could be at fault?

Dirkjan Ochtman (Nov 10 2020 at 20:36, on Zulip):

(I can file an issue if desirable)

pksunkara (Nov 10 2020 at 20:41, on Zulip):

Was this during the start of the RA?

Dirkjan Ochtman (Nov 10 2020 at 20:44, on Zulip):

I initially saw it happening after using RA for a while I think

Dirkjan Ochtman (Nov 10 2020 at 20:45, on Zulip):

then I was trying to get out of it and reloading my VS Code windows and stuff

pksunkara (Nov 10 2020 at 20:46, on Zulip):

Might be the same issue as https://github.com/rust-analyzer/rust-analyzer/issues/4186. Try running rust-analyzer analysis-stats . in the project

Dirkjan Ochtman (Nov 10 2020 at 20:48, on Zulip):

Takes about 25s

pksunkara (Nov 11 2020 at 04:15, on Zulip):

https://www.reddit.com/r/rust/comments/jrpn83/help_with_rustanalyzer_locking_the_build/

Laurențiu (Nov 11 2020 at 08:14, on Zulip):

We run cargo check when saving files and when loading the project if proc macros are enabled, but it shouldn't actually slow down your console builds except maybe if you run cargo run when opening it. Maybe there's a hung cargo check?

Joshua Nelson (Nov 11 2020 at 08:23, on Zulip):

Laurențiu Nicola said:

except maybe if you run cargo run when opening it

I think that happens a lot on bigger projects

Joshua Nelson (Nov 11 2020 at 08:24, on Zulip):

definitely on rustc it's a giant problem https://github.com/rust-lang/rust/issues/76661

Joshua Nelson (Nov 11 2020 at 08:25, on Zulip):

(I need to get back to https://github.com/rust-lang/rust/pull/77779)

Last update: Jul 24 2021 at 20:45UTC