-
Notifications
You must be signed in to change notification settings - Fork 13.4k
thread 'rustc' panicked at 'already borrowed: BorrowMutError', libcore/result.rs:945:5 #47972
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Ok, I now have more info about the bug and I'm able to reproduce it with rust nightly
To reproduce: cd /tmp
git clone https://github.com/PaulGrandperrin/reactfs.git
cd reactfs/
git checkout rustc-issue-47972
cargo run --features "instrumentation"
git checkout HEAD^ # remove a comment, see commit below
cargo run --features "instrumentation"
# BOOM rustc panic
cargo clean
cargo run --features "instrumentation"
# no panics Here is the commit that we remove at |
cc @nikomatsakis @michaelwoerister Seems to be incremental-related. |
Thanks for the detailed bug report. This indeed looks it's related to incremental compilation. |
Looks like this happens due to a recursive invocation of |
Nominating for prioritization. |
I'll probably have a fix soon, I vote for P-high. |
triage: P-high Assigning to the indomitable @michaelwoerister |
…coding, r=nikomatsakis incr.comp.: Don't keep RefCells in on-disk-cache borrowed in order to allow for recursive invocations. Fixes rust-lang#47972. r? @nikomatsakis
…coding, r=nikomatsakis incr.comp.: Don't keep RefCells in on-disk-cache borrowed in order to allow for recursive invocations. Fixes rust-lang#47972. r? @nikomatsakis
…coding, r=nikomatsakis incr.comp.: Don't keep RefCells in on-disk-cache borrowed in order to allow for recursive invocations. Fixes rust-lang#47972. r? @nikomatsakis
Hi, I'm hitting a kind of transient bug:
cargo clean
It's the second time I'm hitting it. The first time I made by mistake a change to my environment and the bug disappeared before I could get a backtrace of it. I don't remember exactly how and when it first appeared but I think it was unrelated to this new instance.
I would say it looks like it's related to incremental compilation.
I made a huge
tar
of my environment (.rustup .cargo and project) before doing acargo clean
, so if needed I can share it somewhere to reproduce.I was using a locally compiled rustc from #47828 at the time, but the other time I got it, it was with a recent official nightly.
cc: @eddyb because we spoke about it on IRC
Here is the full backtrace:
The text was updated successfully, but these errors were encountered: