Skip to content

Already borrowed panic (BorrowMutErr) during cargo update #13658

Closed

Description

@TheLostLambda

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]

Activity

  1. added
    C-bugCategory: bug
    S-triageStatus: This issue is waiting on initial triage.
    on Mar 26, 2024
  2. TheLostLambda commented on Mar 26, 2024

    @TheLostLambda
    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]
    
  3. TheLostLambda commented on Mar 26, 2024

    @TheLostLambda
    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!

  4. epage commented on Mar 26, 2024

    @epage
    Contributor

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

  5. TheLostLambda commented on Mar 26, 2024

    @TheLostLambda
    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!

  6. TheLostLambda commented on Mar 26, 2024

    @TheLostLambda
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions