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

Already borrowed panic (BorrowMutErr) during cargo update #13658

Closed
TheLostLambda opened this issue Mar 26, 2024 · 5 comments
Closed

Already borrowed panic (BorrowMutErr) during cargo update #13658

TheLostLambda opened this issue Mar 26, 2024 · 5 comments
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.

Comments

@TheLostLambda
Copy link

Problem

When running cargo update, I encountered the following crash:
image

With the error being:

thread 'main' panicked at src/cargo/util/context/mod.rs:412:20:
already borrowed: BorrowMutError

Steps

  1. Clone this repo: https://github.com/TheLostLambda/smithereens
  2. Switch to the cargo-bug branch
  3. Run cargo update
  4. Crash!

Possible Solution(s)

No response

Notes

Happy to help debug and gather more information if there are any issues reproducing!

Version

cargo 1.79.0-nightly (a510712d0 2024-03-25)
release: 1.79.0-nightly
commit-hash: a510712d05c6c98f987af24dd73cdfafee8922e6
commit-date: 2024-03-25
host: x86_64-unknown-linux-gnu
libgit2: 1.7.2 (sys:0.18.2 vendored)
libcurl: 8.6.0-DEV (sys:0.4.72+curl-8.6.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Arch Linux Rolling Release [64-bit]
@TheLostLambda TheLostLambda added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Mar 26, 2024
@TheLostLambda
Copy link
Author

Also, I've just tested with the beta release of cargo, and it works fine! It would seem that the bug has been introduced / exposed between this version and now:

cargo 1.78.0-beta.2 (2fe739fcf 2024-03-15)
release: 1.78.0-beta.2
commit-hash: 2fe739fcf16c5bf8c2064ab9d357f4a0e6c8539b
commit-date: 2024-03-15
host: x86_64-unknown-linux-gnu
libgit2: 1.7.2 (sys:0.18.2 vendored)
libcurl: 8.6.0-DEV (sys:0.4.72+curl-8.6.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Arch Linux Rolling Release [64-bit]

@TheLostLambda
Copy link
Author

And I think that makes this the diff containing potential trouble-makers...
2fe739f...a510712

It's a big one, so perhaps someone with a bit more time / knowledge of the cargo internals will have to git bisect!

@epage
Copy link
Contributor

epage commented Mar 26, 2024

This was likely a duplicate of #13646 and fixed in #13647.

@TheLostLambda
Copy link
Author

@epage I think you're probably right — I'll try with the current git version and let you know!
If it is fixed, then I'll close this!

@TheLostLambda
Copy link
Author

Looks to be fixed! Thanks for the rapid response @epage !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

2 participants