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

Cargo run stuck on "Building" Hangs For LONG Time #15032

Open
JimLynchCodes opened this issue Jan 8, 2025 · 2 comments
Open

Cargo run stuck on "Building" Hangs For LONG Time #15032

JimLynchCodes opened this issue Jan 8, 2025 · 2 comments
Labels
C-bug Category: bug S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.

Comments

@JimLynchCodes
Copy link

Problem

Sometimes when I try to compile Rust projects that used to work it will just hang forever (sometimes eventually finishes, 10 or 20 min later). This has happened on completely independent projects, some frontend games using Bevy and some Solana smart contracts using Anchor...

Sometimes fails with "Compute Task Pool" error

I feel like cargo makes my mac very slow like there are memory leaks or something with it...

Cargo is amazing when it works but very painful when it doesn't... 😅

cargo 1.79.0 (ffa9cf9 2024-06-03)
rustc 1.79.0 (129f3b996 2024-06-10)

thread 'Compute Task Pool (0)' panicked at /Users/jim/.cargo/registry/src/index.crates.io-6f17d22bba15001f/js-sys-0.3.72/src/lib.rs:creating background...
6046:9:

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version


@JimLynchCodes JimLynchCodes added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Jan 8, 2025
@weihanglo
Copy link
Member

Without any further information or reproducible examples, we cannot help you much.

“Compute Task Pool” looks like a thing created by bevy. I would recommend cutting an issue to bvey first, as it seems to be an application logic error.

https://github.com/bevyengine/bevy/blob/020d082617c9c61ddd78b8ced84f758db51a2bf9/crates/bevy_app/src/task_pool_plugin.rs#L253

@weihanglo weihanglo added S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. and removed S-triage Status: This issue is waiting on initial triage. labels Jan 8, 2025
@epage
Copy link
Contributor

epage commented Jan 8, 2025

Sometimes fails with "Compute Task Pool" error

Is the Compute Task Pool error when building bevy, solana, or both?

That error is coming from a js-sys build script which is outside of the control of Cargo.

I feel like cargo makes my mac very slow like there are memory leaks or something with it...

It makes your Mac slow because it is using all available resources to complete the build as fast as possible. You can limit the max parallel builds with --jobs -2 or so. We have #12912 for providing more limits on it.

Sometimes when I try to compile Rust projects that used to work it will just hang forever (sometimes eventually finishes, 10 or 20 min later). This has happened on completely independent projects, some frontend games using Bevy and some Solana smart contracts using Anchor...

A "hang" could be

  • A very long build which if you run with --verbose --verbose you can possibly narrow down what operation is taking a long time (interruptible) or use the --timings flag (non-interruptible)
  • A very long build from a parallel cargo run but this will provide a message saying whats going on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.
Projects
None yet
Development

No branches or pull requests

3 participants