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

rustc v1.64.0 hangs for a crate with a syntax error #103823

Closed
tdyas opened this issue Nov 1, 2022 · 3 comments
Closed

rustc v1.64.0 hangs for a crate with a syntax error #103823

tdyas opened this issue Nov 1, 2022 · 3 comments
Labels
C-bug Category: This is a bug.

Comments

@tdyas
Copy link

tdyas commented Nov 1, 2022

Issue: rustc v1.64.0 hangs on a crate with a syntax error without reporting the error.

I was making this change to a Rust project where one of the non-default workspace crates ended up with an error due to the signature of a function in another crate in the workspace changing. Normally, this crate compiles relatively quickly, but after making the change, rustc ran indefinitely instead of showing the error. Fixing the error (or not making the change in the first place) allows the crate to compile normally again.

Seems to build fine on nightly as of today.

Commits:

Reproduces on both Linux and macOS/ARM with Rust v1.64.0. Nightly appears to build without a hang and then displays the expected syntax error.

How to reproduce:

  1. Clone my fork of the https://github.com/pantsbuild/pants/ repository.
  2. Checkout the commit: git checkout 0f7dd58f884300740aa9f0e2fd96637b8fe2616e
  3. Build the crate at issue:
cd src/rust/engine/process_executor
cargo build
  1. The build should hang. Reproduces on both Linux and macOS/ARM with Rust v1.64.0.

Traces:

Meta

rustc --version --verbose:

rustc 1.64.0 (a55dd71d5 2022-09-19)
binary: rustc
commit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52
commit-date: 2022-09-19
host: aarch64-apple-darwin
release: 1.64.0
LLVM version: 14.0.6

Nightly version info on which there is no hang:

rustc 1.67.0-nightly (77e57db38 2022-10-30)
binary: rustc
commit-hash: 77e57db384aca99444c3b5f6a9c86bc58a804d89
commit-date: 2022-10-30
host: aarch64-apple-darwin
release: 1.67.0-nightly
LLVM version: 15.0.4
@tdyas tdyas added the C-bug Category: This is a bug. label Nov 1, 2022
@saethlin
Copy link
Member

saethlin commented Nov 1, 2022

Based on the profile, this loop seems relevant and also suspicious, but I'm miles out of my depth:

@compiler-errors
Copy link
Member

Since it's not hanging on nightly, this probably can't be fixed, since Rust 1.65 comes out in a just few days.

@chenyukang
Copy link
Member

It's same issue with #100478, fixed by #100502

@tdyas tdyas closed this as completed Nov 1, 2022
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.
Projects
None yet
Development

No branches or pull requests

4 participants