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

thread 'main' panicked (already borrowed: BorrowMutError) #123104

Closed
AntoniosBarotsis opened this issue Mar 26, 2024 · 3 comments
Closed

thread 'main' panicked (already borrowed: BorrowMutError) #123104

AntoniosBarotsis opened this issue Mar 26, 2024 · 3 comments
Labels
C-bug Category: This is a bug. T-cargo Relevant to the cargo team, which will review and decide on the PR/issue.

Comments

@AntoniosBarotsis
Copy link
Contributor

I tried running cargo update in this repository which resulted in the following error (with full stacktrace):

$ cargo update
    Updating crates.io index
    Updating accesskit v0.12.1 -> v0.12.3
    Updating accesskit_unix v0.6.1 -> v0.6.2 (latest: v0.7.5)
    Updating ahash v0.8.6 -> v0.8.11
    Updating aho-corasick v1.1.2 -> v1.1.3
    Updating arboard v3.3.0 -> v3.3.2
    Removing async-channel v1.9.0
    Removing async-channel v2.1.1
      Adding async-channel v2.2.0
    Updating async-io v2.2.2 -> v2.3.2
    Updating async-lock v3.2.0 -> v3.3.0
    Updating async-recursion v1.0.5 -> v1.1.0
    Updating async-task v4.5.0 -> v4.7.0
    Updating async-trait v0.1.74 -> v0.1.79
    Updating autocfg v1.1.0 -> v1.2.0
    Updating bitflags v2.4.1 -> v2.5.0
    Updating bumpalo v3.14.0 -> v3.15.4
    Updating bytemuck v1.14.0 -> v1.15.0
    Updating bytemuck_derive v1.5.0 -> v1.6.0
    Updating bytes v1.5.0 -> v1.6.0
    Updating cc v1.0.83 -> v1.0.90
    Updating clipboard-win v4.5.0 -> v5.3.0
    Updating cpufeatures v0.2.11 -> v0.2.12
    Updating crc32fast v1.3.2 -> v1.4.0
    Updating crossbeam-utils v0.8.16 -> v0.8.19
    Updating ctrlc v3.4.1 -> v3.4.4
    Updating egui_plot v0.24.1 -> v0.24.2 (latest: v0.27.0)
    Updating enumflags2 v0.7.8 -> v0.7.9
    Updating enumflags2_derive v0.7.8 -> v0.7.9
    Updating enumn v0.1.12 -> v0.1.13
    Updating error-code v2.3.1 -> v3.2.0
    Removing event-listener v4.0.0
      Adding event-listener v4.0.3 (latest: v5.2.0)
      Adding event-listener v5.2.0
      Adding event-listener-strategy v0.5.0
    Updating fastrand v2.0.1 -> v2.0.2
    Updating fdeflate v0.3.1 -> v0.3.4
    Updating futures-core v0.3.29 -> v0.3.30
    Updating futures-io v0.3.29 -> v0.3.30
    Updating futures-lite v2.1.0 -> v2.3.0
    Updating futures-sink v0.3.29 -> v0.3.30
    Updating futures-task v0.3.29 -> v0.3.30
    Updating futures-util v0.3.29 -> v0.3.30
    Updating gethostname v0.3.0 -> v0.4.3
    Updating getrandom v0.2.11 -> v0.2.12
    Updating gilrs v0.10.4 -> v0.10.6
    Updating gilrs-core v0.5.9 -> v0.5.11
    Updating hermit-abi v0.3.3 -> v0.3.9
    Updating home v0.5.5 -> v0.5.9
    Updating image v0.24.7 -> v0.24.9 (latest: v0.25.0)
    Updating indexmap v2.1.0 -> v2.2.6
    Updating io-kit-sys v0.4.0 -> v0.4.1
    Updating jobserver v0.1.27 -> v0.1.28
    Updating js-sys v0.3.66 -> v0.3.69
    Updating libc v0.2.151 -> v0.2.153
    Updating libloading v0.8.1 -> v0.8.3
    Updating linux-raw-sys v0.4.12 -> v0.4.13 (latest: v0.6.4)
    Updating log v0.4.20 -> v0.4.21
    Updating mach2 v0.4.1 -> v0.4.2
    Updating memchr v2.6.4 -> v2.7.1
      Adding memoffset v0.9.0
    Updating miniz_oxide v0.7.1 -> v0.7.2
    Updating mio v0.8.10 -> v0.8.11
    Updating nix v0.27.1 -> v0.28.0
    Removing num-integer v0.1.45
    Removing num-rational v0.4.1
    Updating num-traits v0.2.17 -> v0.2.18
    Updating pkg-config v0.3.27 -> v0.3.30
    Updating png v0.17.10 -> v0.17.13
    Updating polling v3.3.1 -> v3.6.0
    Updating proc-macro2 v1.0.70 -> v1.0.79
    Updating quote v1.0.33 -> v1.0.35
    Updating regex v1.10.2 -> v1.10.4
    Updating regex-automata v0.4.3 -> v0.4.6
    Updating regex-syntax v0.8.2 -> v0.8.3
    Updating rustix v0.38.28 -> v0.38.32
    Updating rusty-xinput v1.2.1 -> v1.3.0
    Updating serde v1.0.193 -> v1.0.197
    Updating serde_derive v1.0.193 -> v1.0.197
    Updating serde_repr v0.1.17 -> v0.1.18
    Updating smallvec v1.11.2 -> v1.13.2
thread 'main' panicked at src/cargo\util\context\mod.rs:412:20:
already borrowed: BorrowMutError
stack backtrace:
   0:     0x7ff6085c650a - git_midx_writer_dump
   1:     0x7ff6085efb99 - git_midx_writer_dump
   2:     0x7ff6085bfb11 - git_midx_writer_dump
   3:     0x7ff6085c62f6 - git_midx_writer_dump
   4:     0x7ff6085c90e8 - git_midx_writer_dump
   5:     0x7ff6085c8d87 - git_midx_writer_dump
   6:     0x7ff6085c962d - git_midx_writer_dump
   7:     0x7ff6085c94e9 - git_midx_writer_dump
   8:     0x7ff6085c6e1f - git_midx_writer_dump
   9:     0x7ff6085c9198 - git_midx_writer_dump
  10:     0x7ff608679767 - git_midx_writer_dump
  11:     0x7ff608679684 - git_midx_writer_dump
  12:     0x7ff607de3f4b - git_filter_source_path
  13:     0x7ff607cfa4e1 - git_odb_object_id
  14:     0x7ff607d133c1 - git_odb_object_id
  15:     0x7ff607d1434c - git_filter_source_path
  16:     0x7ff607b5d931 - git_filter_source_repo
  17:     0x7ff607c0677e - git_filter_source_repo
  18:     0x7ff607c01b22 - git_filter_source_repo
  19:     0x7ff607581d65 - git_filter_source_repo
  20:     0x7ff60759527e - git_filter_source_repo
  21:     0x7ff607587f44 - git_filter_source_repo
  22:     0x7ff6074e5956 - <unknown>
  23:     0x7ff6074fb57c - <unknown>
  24:     0x7ff6085b6382 - git_midx_writer_dump
  25:     0x7ff60759d3dc - git_filter_source_repo
  26:     0x7ff6085f81ac - git_midx_writer_dump
  27:     0x7ffc4001257d - BaseThreadInitThunk
  28:     0x7ffc415eaa58 - RtlUserThreadStart

Meta

rustc --version --verbose:

rustc 1.79.0-nightly (5f2c7d2bf 2024-03-25)
binary: rustc
commit-hash: 5f2c7d2bfd46cad00352ab7cd66242077e2e518c
commit-date: 2024-03-25
host: x86_64-pc-windows-msvc
release: 1.79.0-nightly
LLVM version: 18.1.2

The crash is present in nightly but not in beta, as in beta works fine.

Something that might be important is that running cargo build results in the following error:

error[E0635]: unknown feature `stdsimd`
  --> C:\Users\anton\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ahash-0.8.6\src/lib.rs:99:42
   |
99 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
   |                                          ^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `ahash` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Found this thread that explains the error.

This is not an issue for me as I manually bumped the versions of some of my dependencies which fixed both issues but this seems like a weird edge case in cargo (unless I missed something).

@AntoniosBarotsis AntoniosBarotsis added the C-bug Category: This is a bug. label Mar 26, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 26, 2024
@jieyouxu jieyouxu added the T-cargo Relevant to the cargo team, which will review and decide on the PR/issue. label Mar 26, 2024
@weihanglo
Copy link
Member

This has been fixed and is expected to release with the next nightly. See rust-lang/cargo#13646.

@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 26, 2024
@jieyouxu
Copy link
Member

Closing with rust-lang/cargo#13646 as the root cause.

@AntoniosBarotsis
Copy link
Contributor Author

Ah nice! I didn't see the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-cargo Relevant to the cargo team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants