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

Add parallel front end robustness test to ui tests #132051

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SparrowLii
Copy link
Member

@SparrowLii SparrowLii commented Oct 23, 2024

update #118698

Most of the issues of parallel front end are not reproducible, and are even fixed in compiler updates (#124423 is no longer reproducible after I updated the master branch)

This PR add all testable issues to UI tests to verify their irreproducibility. If no problems occur, and no feedback from other CI testing was received within a certain period of time, we can close the source PR

@rustbot
Copy link
Collaborator

rustbot commented Oct 23, 2024

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Oct 23, 2024
@rustbot
Copy link
Collaborator

rustbot commented Oct 23, 2024

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@SparrowLii SparrowLii added the WG-compiler-parallel Working group: Parallelizing the compiler label Oct 23, 2024
@jieyouxu
Copy link
Member

r? jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned wesleywiser Oct 23, 2024
@rust-log-analyzer

This comment has been minimized.

@SparrowLii
Copy link
Member Author

SparrowLii commented Oct 23, 2024

#120757 #129911 #129912 occured deadlock bugs, which we need to solve next
let's try again to see if it's reproducible

#[Edit] Look like it's reproducible, which is a good message

@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, this seems like a good improvement in test coverage for parallel front-end.

Could you please split the changes into at least two more-or-less atomic commits? I.e.

  • Commit 1 implements compiletest changes.
  • Commit 2 updates the tests.

As for the changes themselves, I noticed:

  • Many tests don't have much context (no explanation about what they're trying to check, no brief summary, no backlinks to issues). Are these just basic smoke tests for parallel frontend? If it seems overkill to add such comments to the individual tests, could you leave a basic SUMMARY.md inside tests/ui/parallel-frontend to summarize the categories of tests and what issues they're intending to check? This is so that if anyone ever tries to debug why the tests failed/passed, they can have some clues as guidance. The summaries don't have to be super detailed, but even a brief sentence for test intention can go a long way.

Please also refer to individual review comments. If you have any questions about bootstrap/compiletest/general test infra, I might be able to help.

src/tools/compiletest/src/runtest.rs Outdated Show resolved Hide resolved
Comment on lines +33 to +37
// Repeated testing due to instability in multithreaded environments.
for _ in 0..50 {
proc_res = self.compile_test(should_run, emit_metadata);
self.check_no_compiler_crash(&proc_res, false);
}
Copy link
Member

@jieyouxu jieyouxu Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: this is going to be expensive as running 50 times involves not only spawning multiple processes, but also more expensive is the compiling itself. Do we have any local benchmarks to see how much longer the test will take w/ the extra 49 runs compared to just running once? I'm not suggesting we shouldn't do this -- we should -- but I would like to have more info on the impact of this on test time and then make an informed decision to accept the cost.

Context: I'm primarily thinking about some tests that might take a long time to compile, e.g. tests that have deep recursive types.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't found a good benchmark yet, from what I've observed so far these tests don't noticeably extend the test time though. I think we can keep this comment until we get more information later

tests/ui/parallel-rustc/deadlock-issue-119785.rs Outdated Show resolved Hide resolved
tests/ui/parallel-rustc/deadlock-issue-119785.rs Outdated Show resolved Hide resolved
tests/ui/parallel-rustc/deadlock-issue-119785.rs Outdated Show resolved Hide resolved
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 23, 2024
@SparrowLii
Copy link
Member Author

Thanks for the reviewing! I gonna make the changes soon

@jieyouxu jieyouxu added the A-test-infra Area: test infrastructure (may span bootstrap/compiletest/more) label Oct 24, 2024
@SparrowLii
Copy link
Member Author

Just resubmitted the commits. Since these tests are used to test ice problems such as deadlock, we don't actually care about the error messages output. I deleted all error output to simplify the function and review

@SparrowLii SparrowLii changed the title Add parallel front end issues to ui tests Add parallel front end robustness test to ui tests Oct 26, 2024
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
------
 > importing cache manifest from ghcr.io/rust-lang/rust-ci-cache:c32c805632780b5c1de330e3f44561b336c2efe163bc0990acb392390157a8e1d9f855d75914a239aa40c49d77f4a837247d05d2f8d46f554b98e1f46712a3e3:
------
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
failures:

---- [ui] tests/ui/parallel-rustc/query-cycle-issue-129912.rs stdout ----

error: compiler terminated by signal
status: signal: 6 (SIGABRT) (core dumped)
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/parallel-rustc/query-cycle-issue-129912.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parallel-rustc/query-cycle-issue-129912" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parallel-rustc/query-cycle-issue-129912/auxiliary" "-Z" "threads=16"
--- stderr -------------------------------
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found reserved keyword `virtual`
##[error]  --> /checkout/tests/ui/parallel-rustc/query-cycle-issue-129912.rs:69:11
   |
---

error[E0423]: expected value, found trait `Sized`
##[error]  --> /checkout/tests/ui/parallel-rustc/query-cycle-issue-129912.rs:12:62
   |
LL |     if generator_sig() < 0 { None } else { Sized((option(i - Sized), i)) }

error[E0425]: cannot find value `i` in this scope
##[error]  --> /checkout/tests/ui/parallel-rustc/query-cycle-issue-129912.rs:50:8
   |
---

error[E0404]: expected trait, found function `generator_capture`
##[error]  --> /checkout/tests/ui/parallel-rustc/query-cycle-issue-129912.rs:65:29
   |
LL | fn generator_hold() -> impl generator_capture {

error[E0658]: yield syntax is experimental
##[error]  --> /checkout/tests/ui/parallel-rustc/query-cycle-issue-129912.rs:56:9
   |
   |
LL |         yield;
   |         ^^^^^
   |
   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
   = help: add `#![feature(coroutines)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: yield syntax is experimental
##[error]  --> /checkout/tests/ui/parallel-rustc/query-cycle-issue-129912.rs:68:9
   |
LL |         yield;
LL |         yield;
   |         ^^^^^
   |
   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
   = help: add `#![feature(coroutines)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0562]: `impl Trait` is not allowed in cast expression types
##[error]  --> /checkout/tests/ui/parallel-rustc/query-cycle-issue-129912.rs:24:22
   |
LL |     &ptr() as *const impl Sized
---
LL |         yield;
   |         ^^^^^
   |
   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
   = help: add `#![feature(coroutines)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks
##[error]  --> /checkout/tests/ui/parallel-rustc/query-cycle-issue-129912.rs:56:9
LL |         yield;
   |         ^^^^^
   |
   |
help: use `#[coroutine]` to make this closure a coroutine
   |
LL |     #[coroutine] move || {

error[E0658]: yield syntax is experimental
##[error]  --> /checkout/tests/ui/parallel-rustc/query-cycle-issue-129912.rs:68:9
   |
   |
LL |         yield;
   |         ^^^^^
   |
   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
   = help: add `#![feature(coroutines)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error: `yield` can only be used in `#[coroutine]` closures, or `gen` blocks
##[error]  --> /checkout/tests/ui/parallel-rustc/query-cycle-issue-129912.rs:68:9
LL |         yield;
   |         ^^^^^
   |
   |
help: use `#[coroutine]` to make this closure a coroutine
   |
LL |     #[coroutine] move || {


thread 'rustc query cycle handler' panicked at compiler/rustc_query_system/src/query/job.rs:51:24:
called `Option::unwrap()` on a `None` value
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: core::option::unwrap_failed
   3: core::option::unwrap_failed
   4: rustc_query_system::query::job::cycle_check
   5: rustc_query_system::query::job::cycle_check
   6: rustc_query_system::query::job::cycle_check
   7: rustc_query_system::query::job::break_query_cycles

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.84.0-nightly (b76a3349d 2024-10-26) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z threads=16
query stack during panic:
end of query stack
query cycle handler thread panicked, aborting process
------------------------------------------
------------------------------------------


---- [ui] tests/ui/parallel-rustc/deadlock-issue-129911.rs stdout ----

error: compiler terminated by signal
status: signal: 6 (SIGABRT) (core dumped)
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parallel-rustc/deadlock-issue-129911" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parallel-rustc/deadlock-issue-129911/auxiliary" "-Z" "threads=16"
--- stderr -------------------------------
error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:23:32
   |
   |
LL |                       type Frc = Frc<
   |  ________________________________^^^-
   | |                                expected 0 generic arguments
LL | |                         {
LL | |                             {
LL | |                                 {
---
   |
note: type alias defined here, with 0 generic parameters
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:23:26
   |
LL |                     type Frc = Frc<

error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:13:28
   |
   |
LL |                 type Frc = Frc<{}>::Arc;;
   |                            ^^^---- help: remove the unnecessary generics
   |                            expected 0 generic arguments
   |
note: type alias defined here, with 0 generic parameters
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:13:22
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:13:22
   |
LL |                 type Frc = Frc<{}>::Arc;;

error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:39:48
   |
   |
LL |   ...                   type Frc = Frc<
   |  __________________________________^^^-
   | |                                  expected 0 generic arguments
LL | | ...                       {
LL | | ...                           {
LL | | ...                               {
---
   |
note: type alias defined here, with 0 generic parameters
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:39:42
   |
LL | ...                   type Frc = Frc<

error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:49:56
   |
   |
LL |   ...                   type Frc = Frc<
   |  __________________________________^^^-
   | |                                  expected 0 generic arguments
LL | | ...                       {
LL | | ...                           {
LL | | ...                               {
---
   |
note: type alias defined here, with 0 generic parameters
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:49:50
   |
LL | ...                   type Frc = Frc<

error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:56:64
   |
   |
LL | ...                   type Frc = Frc<{}>::Arc;;
   |                                  ^^^---- help: remove the unnecessary generics
   |                                  expected 0 generic arguments
   |
note: type alias defined here, with 0 generic parameters
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:56:58
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:56:58
   |
LL | ...                   type Frc = Frc<{}>::Arc;;

error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:15:24
   |
   |
LL |               type Frc = Frc<
   |  ________________________^^^-
   | |                        expected 0 generic arguments
LL | |                 {
LL | |                     {
LL | |                         {
---
   |
note: type alias defined here, with 0 generic parameters
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:15:18
   |
LL |             type Frc = Frc<

error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:21:36
   |
   |
LL |                         type Frc = Frc<{}>::Arc;;
   |                                    ^^^---- help: remove the unnecessary generics
   |                                    expected 0 generic arguments
   |
note: type alias defined here, with 0 generic parameters
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:21:30
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:21:30
   |
LL |                         type Frc = Frc<{}>::Arc;;

error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:46:64
   |
   |
LL | ...                   type Frc = Frc<{}>::Arc;;
   |                                  ^^^---- help: remove the unnecessary generics
   |                                  expected 0 generic arguments
   |
note: type alias defined here, with 0 generic parameters
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:46:58
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:46:58
   |
LL | ...                   type Frc = Frc<{}>::Arc;;

error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:37:52
   |
   |
LL | ...                   type Frc = Frc<{}>::Arc;;
   |                                  ^^^---- help: remove the unnecessary generics
   |                                  expected 0 generic arguments
   |
note: type alias defined here, with 0 generic parameters
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:37:46
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:37:46
   |
LL | ...                   type Frc = Frc<{}>::Arc;;

error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:29:44
   |
   |
LL | ...                   type Frc = Frc<{}>::Arc;;
   |                                  ^^^---- help: remove the unnecessary generics
   |                                  expected 0 generic arguments
   |
note: type alias defined here, with 0 generic parameters
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:29:38
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:29:38
   |
LL | ...                   type Frc = Frc<{}>::Arc;;

error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:31:40
   |
   |
LL |   ...                   type Frc = Frc<
   |  __________________________________^^^-
   | |                                  expected 0 generic arguments
LL | | ...                       {
LL | | ...                           {
LL | | ...                               {
---
   |
note: type alias defined here, with 0 generic parameters
  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-129911.rs:31:34
   |
LL | ...                   type Frc = Frc<


error[E0391]: cycle detected when expanding type alias `main::KooArc::{constant#0}::Frc`
   |
   |
LL |               type Frc = Frc<
LL | |                 {
LL | |                     {
LL | |                         {
...  |
...  |
LL | |                 },
LL | |             >::Arc;;
   | |_____________^
   |
   = note: ...which immediately requires expanding type alias `main::KooArc::{constant#0}::Frc` again
   = help: consider using a struct, enum, or union instead to break the cycle
   = help: see <https://doc.rust-lang.org/reference/types.html#recursive-types> for more information
   = help: see <https://doc.rust-lang.org/reference/types.html#recursive-types> for more information
note: cycle used when checking that `main::KooArc::{constant#0}::Frc` is well-formed
   |
   |
LL |             type Frc = Frc<
   |             ^^^^^^^^
   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error[E0391]: cycle detected when expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc`
   |
   |
LL |   ...                   type Frc = Frc<
LL | | ...                       {
LL | | ...                           {
LL | | ...                               {
...  |
...  |
LL | | ...                       },
LL | | ...                   >::Arc;;
   | |_______________________^
   |
   = note: ...which immediately requires expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc` again
   = help: consider using a struct, enum, or union instead to break the cycle
   = help: see <https://doc.rust-lang.org/reference/types.html#recursive-types> for more information
   = help: see <https://doc.rust-lang.org/reference/types.html#recursive-types> for more information
note: cycle used when checking that `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc` is well-formed
   |
   |
LL | ...                   type Frc = Frc<
   |                       ^^^^^^^^
   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

thread 'rustc query cycle handler' panicked at compiler/rustc_query_system/src/query/job.rs:535:9:
deadlock detected as we're unable to find a query cycle to break
current query map:
    QueryJobId(
        9314,
        9314,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc` is well-formed",
                Span {
                    lo: BytePos(
                        751,
                    ),
---
                variant: 201,
            },
            hash: 5930773722237839161,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9310,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc`",
                Span {
                    lo: BytePos(
                        471,
                    ),
---
                variant: 19,
            },
            hash: 589729714458673777,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
                QueryJobId(
                    9308,
                ),
            ),
            latch: Some(
                QueryLatch {
                    info: Mutex {
                        data: QueryLatchInfo {
                            waiters: [],
                        },
                    },
                },
                },
            ),
        },
    },
    QueryJobId(
        9256,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that types are well-formed in top-level module",
                Span {
                    lo: BytePos(
                        120,
                    ),
---
                variant: 111,
            },
            hash: 522625942680904526,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9302,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc`",
                Span {
                    lo: BytePos(
                        1736,
                    ),
---
                variant: 19,
            },
            hash: 10704164903713946813,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
                QueryJobId(
                    9299,
                ),
            ),
            latch: Some(
                QueryLatch {
                    info: Mutex {
                        data: QueryLatchInfo {
                            waiters: [],
                        },
                    },
                },
                },
            ),
        },
    },
    QueryJobId(
        9298,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc`",
                Span {
                    lo: BytePos(
                        1095,
                    ),
---
                variant: 19,
            },
            hash: 9909558486612163528,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
                QueryJobId(
                    9295,
                ),
            ),
            latch: Some(
                QueryLatch {
                    info: Mutex {
                        data: QueryLatchInfo {
                            waiters: [],
                        },
                    },
                },
                },
            ),
        },
    },
    QueryJobId(
        9287,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that `main::KooArc::{constant#0}::Frc` is well-formed",
                Span {
                    lo: BytePos(
                        255,
                    ),
---
                variant: 201,
            },
            hash: 15263988045247655527,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9290,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc` is well-formed",
                Span {
                    lo: BytePos(
                        1195,
                    ),
---
                variant: 201,
            },
            hash: 10331425144759969981,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9313,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc`",
                Span {
                    lo: BytePos(
                        1569,
                    ),
---
                variant: 19,
            },
            hash: 8492040894720394232,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
                QueryJobId(
                    9311,
                ),
            ),
            latch: Some(
                QueryLatch {
                    info: Mutex {
                        data: QueryLatchInfo {
                            waiters: [],
                        },
                    },
                },
                },
            ),
        },
    },
    QueryJobId(
        9259,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc`",
                Span {
                    lo: BytePos(
                        539,
                    ),
---
                variant: 19,
            },
            hash: 3410225225416448060,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
                QueryJobId(
                    9257,
                ),
            ),
            latch: Some(
                QueryLatch {
                    info: Mutex {
                        data: QueryLatchInfo {
                            waiters: [],
                        },
                    },
                },
                },
            ),
        },
    },
    QueryJobId(
        9301,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc` is well-formed",
                Span {
                    lo: BytePos(
                        2143,
                    ),
---
                variant: 201,
            },
            hash: 14538639933894581939,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9297,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc`",
                Span {
                    lo: BytePos(
                        835,
                    ),
---
                variant: 19,
            },
            hash: 12049532681565378677,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
                QueryJobId(
                    9293,
                ),
            ),
            latch: Some(
                QueryLatch {
                    info: Mutex {
                        data: QueryLatchInfo {
                            waiters: [],
                        },
                    },
                },
                },
            ),
        },
    },
    QueryJobId(
        9293,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc` is well-formed",
                Span {
                    lo: BytePos(
                        835,
                    ),
---
                variant: 201,
            },
            hash: 14791499674461577936,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9289,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "expanding type alias `main::KooArc::{constant#0}::Frc`",
                Span {
                    lo: BytePos(
                        255,
                    ),
---
                variant: 19,
            },
            hash: 6378137570266474301,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
                QueryJobId(
                    9287,
                ),
            ),
            latch: Some(
                QueryLatch {
                    info: Mutex {
                        data: QueryLatchInfo {
                            waiters: [],
                        },
                    },
                },
                },
            ),
        },
    },
    QueryJobId(
        9316,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc`",
                Span {
                    lo: BytePos(
                        751,
                    ),
---
                variant: 19,
            },
            hash: 7799405696177668938,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
                QueryJobId(
                    9314,
                ),
            ),
            latch: Some(
                QueryLatch {
                    info: Mutex {
                        data: QueryLatchInfo {
                            waiters: [],
                        },
                    },
                },
                },
            ),
        },
    },
    QueryJobId(
        9308,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that `main::KooArc::{constant#0}::Frc::{constant#0}::Frc` is well-formed",
                Span {
                    lo: BytePos(
                        471,
                    ),
---
                variant: 201,
            },
            hash: 4867681123714217731,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9304,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc`",
                Span {
                    lo: BytePos(
                        2143,
                    ),
---
                variant: 19,
            },
            hash: 16717812923765035421,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
                QueryJobId(
                    9301,
                ),
            ),
            latch: Some(
                QueryLatch {
                    info: Mutex {
                        data: QueryLatchInfo {
                            waiters: [],
                        },
                    },
                },
                },
            ),
        },
    },
    QueryJobId(
        9292,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc`",
                Span {
                    lo: BytePos(
                        1195,
                    ),
---
                variant: 19,
            },
            hash: 1430442374854817869,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
                QueryJobId(
                    9290,
                ),
            ),
            latch: Some(
                QueryLatch {
                    info: Mutex {
                        data: QueryLatchInfo {
                            waiters: [],
                        },
                    },
                },
                },
            ),
        },
    },
    QueryJobId(
        9311,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc` is well-formed",
                Span {
                    lo: BytePos(
                        1569,
                    ),
---
                variant: 201,
            },
            hash: 6347061318832372098,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9257,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that `main::KooArc::{constant#0}::Frc::{constant#0}::Frc` is well-formed",
                Span {
                    lo: BytePos(
                        539,
                    ),
---
                variant: 201,
            },
            hash: 17984583306803524302,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9299,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc` is well-formed",
                Span {
                    lo: BytePos(
                        1736,
                    ),
---
                variant: 201,
            },
            hash: 10642117773952088996,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9295,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc` is well-formed",
                Span {
                    lo: BytePos(
                        1095,
                    ),
---
                variant: 201,
            },
            hash: 4939610403681264514,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9114,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "running analysis passes on this crate",
                Span {
                    lo: BytePos(
                        0,
                    ),
---
                variant: 25,
            },
            hash: 5462938028500440564,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
}
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: rustc_query_system::query::job::break_query_cycles

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.84.0-nightly (b76a3349d 2024-10-26) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z threads=16
query stack during panic:
end of query stack
end of query stack
error[E0391]: cycle detected when expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc`
   |
   |
LL | ...                   type Frc = Frc<{}>::Arc;;
   |
   |
   = note: ...which immediately requires expanding type alias `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc` again
   = help: consider using a struct, enum, or union instead to break the cycle
   = help: see <https://doc.rust-lang.org/reference/types.html#recursive-types> for more information
   = help: see <https://doc.rust-lang.org/reference/types.html#recursive-types> for more information
note: cycle used when checking that `main::KooArc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc::{constant#0}::Frc` is well-formed
   |
   |
LL | ...                   type Frc = Frc<{}>::Arc;;
   |                       ^^^^^^^^
   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
query cycle handler thread panicked, aborting process
query cycle handler thread panicked, aborting process
thread 'rustc query cycle handler' panicked at compiler/rustc_query_system/src/query/job.rs:535:9:


---- [ui] tests/ui/parallel-rustc/deadlock-issue-120757.rs stdout ----


error: compiler terminated by signal
status: signal: 6 (SIGABRT) (core dumped)
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/parallel-rustc/deadlock-issue-120757.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parallel-rustc/deadlock-issue-120757" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parallel-rustc/deadlock-issue-120757/auxiliary" "-Z" "threads=50"
--- stderr -------------------------------
--- stderr -------------------------------
error[E0425]: cannot find value `ns_window` in this scope
   |
   |
LL |         self.reference.bget(index).map(ns_window)

warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
##[warning]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-120757.rs:6:12
   |
---

error[E0308]: method not compatible with trait
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-120757.rs:82:5
   |
LL |     fn size(&self) -> [usize; DIM] {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
   = note: expected constant `Self::DIM`
              found constant `DIM`

error[E0308]: method not compatible with trait
error[E0308]: method not compatible with trait
##[error]  --> /checkout/tests/ui/parallel-rustc/deadlock-issue-120757.rs:90:5
   |
LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
   = note: expected constant `Self::DIM`
              found constant `DIM`


error[E0391]: cycle detected when resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`
   |
   |
LL |     const DIM: usize;
   |
   |
note: ...which requires computing candidate for `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>`...
   |
LL | trait TensorDimension {
   | ^^^^^^^^^^^^^^^^^^^^^
   | ^^^^^^^^^^^^^^^^^^^^^
   = note: ...which again requires resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`, completing the cycle
note: cycle used when checking that `<impl at /checkout/tests/ui/parallel-rustc/deadlock-issue-120757.rs:55:1: 55:97>` is well-formed
   |
   |
LL | impl<'a, T: Broadcastable, const DIM: usize> Broadcastable for LazyUpdim<'a, T, { T::DIM }, DIM> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error[E0391]: cycle detected when resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`
   |
   |
LL |     const DIM: usize;
   |
   |
note: ...which requires computing candidate for `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>`...
   |
LL | trait TensorDimension {
   | ^^^^^^^^^^^^^^^^^^^^^
   | ^^^^^^^^^^^^^^^^^^^^^
   = note: ...which again requires resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`, completing the cycle
note: cycle used when computing candidate for `<LazyUpdim<'_, T, { T::DIM }, DIM> as TensorDimension>`
   |
LL | trait TensorDimension {
   | ^^^^^^^^^^^^^^^^^^^^^
   | ^^^^^^^^^^^^^^^^^^^^^
   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

thread 'rustc query cycle handler' panicked at compiler/rustc_query_system/src/query/job.rs:535:9:
deadlock detected as we're unable to find a query cycle to break
current query map:
    QueryJobId(
        9535,
        9535,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that types are well-formed in top-level module",
                Span {
                    lo: BytePos(
                        120,
                    ),
---
                variant: 111,
            },
            hash: 16226592176560015743,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        10639,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "computing candidate for `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>`",
                Span {
                    lo: BytePos(
                        167,
                    ),
---
                variant: 163,
            },
            hash: 15357681497449963340,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        9125,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "running analysis passes on this crate",
                Span {
                    lo: BytePos(
                        0,
                    ),
---
                variant: 25,
            },
            hash: 5462938028500440564,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        10483,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "const-evaluating + checking `TensorSize::size::{constant#0}`",
                Span {
                    lo: BytePos(
                        388,
                    ),
---
                variant: 125,
            },
            hash: 7861261890985586392,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        10637,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`",
                Span {
                    lo: BytePos(
                        195,
                    ),
---
                variant: 286,
            },
            hash: 16809931162449519825,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
                QueryJobId(
                    10636,
                ),
            ),
            latch: Some(
                QueryLatch {
                    info: Mutex {
                        data: QueryLatchInfo {
                            waiters: [],
                        },
                    },
                },
                },
            ),
        },
    },
    QueryJobId(
        10635,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "resolving instance `<LazyUpdim<'_, T, { T::DIM }, DIM> as TensorDimension>::DIM`",
                Span {
                    lo: BytePos(
                        195,
                    ),
---
                variant: 286,
            },
            hash: 13574905619710754955,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        10636,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "computing candidate for `<LazyUpdim<'_, T, { T::DIM }, DIM> as TensorDimension>`",
                Span {
                    lo: BytePos(
                        167,
                    ),
---
                variant: 163,
            },
            hash: 5325838979781148767,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
        },
    },
    QueryJobId(
        10482,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "evaluating type-level constant",
                Span {
                    lo: BytePos(
                        388,
                    ),
---
                variant: 128,
            },
            hash: 2543296614177352984,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    1542,
---
        },
    },
    QueryJobId(
        9691,
    ): QueryJobInfo {
        query: QueryStackFrame {
            description: "checking that `<impl at /checkout/tests/ui/parallel-rustc/deadlock-issue-120757.rs:50:1: 50:94>` is well-formed",
                Span {
                    lo: BytePos(
                        1442,
                    ),
---
                variant: 201,
            },
            hash: 12818833106808875179,
        },
        job: QueryJob {
            id: QueryJobId(
            ),
            span: Span {
                lo: BytePos(
                    0,
---
}
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: rustc_query_system::query::job::break_query_cycles

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.84.0-nightly (b76a3349d 2024-10-26) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z threads=50
query stack during panic:
end of query stack
error: aborting due to 5 previous errors; 1 warning emitted

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the other parts look fine, just one question

Comment on lines -1352 to -1354
// Use a single thread for efficiency and a deterministic error message order
rustc.arg("-Zthreads=1");

Copy link
Member

@jieyouxu jieyouxu Oct 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: though if we no longer have the -Z threads=1, would other non-parallel tests potentially become flaky? Or is the parallel front-end currently such that by default is only -Z threads=1? Or rather, is that an intended feature (that we may discover some ui tests being flaky and thus expose bugs in current parallel rustc infra?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thread of parallel front end is always 1 only if users pass -Zthreads=n mannually. On the other hand, the user can easily break the limit by passing the -Z threads option(Later option will reset the previous one, we may need to improve on this), so this code doesn't make much sense.

Defaulting the number of threads to be greater than 1 is intended but will not be implemented for a short time. When we do, I think we still don't need to manually limit -Z threads=1 in test suit, but change the it to fit the output of a multithreaded environment.

//@ compile-flags: -Z threads=50

#![feature(generic_const_exprs)]
//~^ WARNING
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: stray warning?

@jieyouxu
Copy link
Member

Also, we may want to open a #t-compiler thread (and maybe in libs/bootstrap) for awareness (esp. for reviewers) about parallel rustc tests and what to do if they ever encounter a related ICE.

@bors
Copy link
Contributor

bors commented Oct 29, 2024

☔ The latest upstream changes (presumably #132317) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-test-infra Area: test infrastructure (may span bootstrap/compiletest/more) A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-compiler-parallel Working group: Parallelizing the compiler WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants