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 'rustc' panicked at 'forcing query with already existing DepNode #10620

Closed
kwannoel opened this issue Apr 10, 2023 · 6 comments
Closed
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@kwannoel
Copy link

kwannoel commented Apr 10, 2023

Summary

This bug seems to disappear on the branch after I run cargo clean.

Error log
Running cargo clippy checks
    Checking risingwave_common v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/common)
    Checking risingwave_hummock_sdk v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/storage/hummock_sdk)
    Checking risingwave_object_store v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/object_store)
    Checking risingwave_expr v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/expr)
    Checking pgwire v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/utils/pgwire)
    Checking risingwave_rpc_client v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/rpc_client)
    Checking risingwave_backup v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/storage/backup)
    Checking risingwave_common_service v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/common/common_service)
    Checking risingwave_storage v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/storage)
    Checking risingwave_connector v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/connector)
    Checking risingwave_compactor v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/storage/compactor)
    Checking risingwave_bench v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/bench)
    Checking risingwave_java_binding v0.1.0 (/Users/noelkwan/projects/risingwave/src/java_binding)
    Checking risingwave_source v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/source)
    Checking risingwave_meta v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/meta)
    Checking risingwave_batch v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/batch)
    Checking risingwave_stream v1.0.0-alpha (/Users/noelkwan/projects/risingwave/src/stream)
thread 'rustc' panicked at 'forcing query with already existing `DepNode`
- query-key: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [Binder(ProjectionPredicate(AliasTy { substs: [E], def_id: DefId(0:2402 ~ risingwave_stream[0142]::executor::hash_agg::Emitter::StateStore) }, Term::Ty(S)), []), Binder(TraitPredicate(<E as executor::hash_agg::Emitter>, polarity:Positive), []), Binder(TraitPredicate(<E as std::marker::Sized>, polarity:Positive), []), Binder(TraitPredicate(<S as risingwave_storage::StateStore>, polarity:Positive), []), Binder(TraitPredicate(<S as std::clone::Clone>, polarity:Positive), []), Binder(TraitPredicate(<S as risingwave_storage::store::StaticSendSync>, polarity:Positive), []), Binder(TraitPredicate(<S as std::marker::Sync>, polarity:Positive), []), Binder(TraitPredicate(<S as std::marker::Send>, polarity:Positive), []), Binder(TraitPredicate(<S as risingwave_storage::store::StateStoreRead>, polarity:Positive), []), Binder(TraitPredicate(<K as risingwave_common::hash::HashKey>, polarity:Positive), []), Binder(TraitPredicate(<K as std::marker::Sync>, polarity:Positive), []), Binder(TraitPredicate(<K as std::marker::Send>, polarity:Positive), []), Binder(TraitPredicate(<K as std::cmp::Eq>, polarity:Positive), []), Binder(TraitPredicate(<K as std::cmp::PartialEq>, polarity:Positive), []), Binder(TraitPredicate(<K as std::hash::Hash>, polarity:Positive), []), Binder(TraitPredicate(<K as std::fmt::Debug>, polarity:Positive), []), Binder(TraitPredicate(<K as std::clone::Clone>, polarity:Positive), []), Binder(TraitPredicate(<K as risingwave_common::collection::estimate_size::EstimateSize>, polarity:Positive), []), Binder(TraitPredicate(<S as std::marker::Sized>, polarity:Positive), []), Binder(TraitPredicate(<K as std::marker::Sized>, polarity:Positive), []), Binder(OutlivesPredicate(S, ReStatic), []), Binder(OutlivesPredicate(K, ReStatic), [])], reveal: UserFacing, constness: NotConst }, value: Normalize { value: [async fn body@src/stream/src/executor/hash_agg.rs:420:35: 497:6] } } }
- dep-node: type_op_normalize_ty(20ce120d73d78a24-f518ab5445841a62)', /rustc/31f858d9a511f24fedb8ed997b28304fec809630/compiler/rustc_query_system/src/dep_graph/graph.rs:319:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.69 (31f858d9 2023-02-28)

query stack during panic:
#0 [type_op_normalize_ty] normalizing `[async fn body@src/stream/src/executor/hash_agg.rs:420:35: 497:6]`
#1 [mir_borrowck] borrow-checking `executor::hash_agg::<impl at src/stream/src/executor/hash_agg.rs:308:1: 308:54>::apply_chunk::{closure#0}`
end of query stack
encountered while trying to mark dependency green: mir_borrowck(1423451387c6e34-87aa62c903e43ca2)
encountered while trying to mark dependency green: type_of(1423451387c6e34-766e64a8d0b83c88)
error: could not compile `risingwave_stream`
warning: build failed, waiting for other jobs to finish...
thread 'rustc' panicked at 'forcing query with already existing `DepNode`
- query-key: Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [Binder(TraitPredicate(<K as std::marker::Sync>, polarity:Positive), []), Binder(TraitPredicate(<K as std::marker::Send>, polarity:Positive), []), Binder(TraitPredicate(<K as risingwave_common::hash::HashKey>, polarity:Positive), []), Binder(TraitPredicate(<K as std::cmp::Eq>, polarity:Positive), []), Binder(TraitPredicate(<K as std::cmp::PartialEq>, polarity:Positive), []), Binder(TraitPredicate(<K as std::hash::Hash>, polarity:Positive), []), Binder(TraitPredicate(<K as std::fmt::Debug>, polarity:Positive), []), Binder(TraitPredicate(<K as std::clone::Clone>, polarity:Positive), []), Binder(TraitPredicate(<K as risingwave_common::collection::estimate_size::EstimateSize>, polarity:Positive), []), Binder(TraitPredicate(<K as std::marker::Sized>, polarity:Positive), []), Binder(OutlivesPredicate(K, ReStatic), [])], reveal: UserFacing, constness: NotConst }, value: [static generator@src/batch/src/executor/hash_agg.rs:196:5: 196:58] } }
- dep-node: dropck_outlives(c47a8f99278efe4a-4781155a839ca703)', /rustc/31f858d9a511f24fedb8ed997b28304fec809630/compiler/rustc_query_system/src/dep_graph/graph.rs:319:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.69 (31f858d9 2023-02-28)

query stack during panic:
#0 [dropck_outlives] computing dropck types for `[static generator@src/batch/src/executor/hash_agg.rs:196:5: 196:58]`
#1 [mir_borrowck] borrow-checking `executor::hash_agg::<impl at src/batch/src/executor/hash_agg.rs:195:1: 195:50>::do_execute`
end of query stack
error: could not compile `risingwave_batch`
thread 'rustc' panicked at 'forcing query with already existing `DepNode`
- query-key: Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [Binder(TraitPredicate(<K as std::marker::Sync>, polarity:Positive), []), Binder(TraitPredicate(<K as std::marker::Send>, polarity:Positive), []), Binder(TraitPredicate(<K as risingwave_common::hash::HashKey>, polarity:Positive), []), Binder(TraitPredicate(<K as std::cmp::Eq>, polarity:Positive), []), Binder(TraitPredicate(<K as std::cmp::PartialEq>, polarity:Positive), []), Binder(TraitPredicate(<K as std::hash::Hash>, polarity:Positive), []), Binder(TraitPredicate(<K as std::fmt::Debug>, polarity:Positive), []), Binder(TraitPredicate(<K as std::clone::Clone>, polarity:Positive), []), Binder(TraitPredicate(<K as risingwave_common::collection::estimate_size::EstimateSize>, polarity:Positive), []), Binder(TraitPredicate(<K as std::marker::Sized>, polarity:Positive), []), Binder(OutlivesPredicate(K, ReStatic), [])], reveal: UserFacing, constness: NotConst }, value: [static generator@src/batch/src/executor/hash_agg.rs:196:5: 196:58] } }
- dep-node: dropck_outlives(288793f102966e90-ebfd80a6c2cc7d5f)', /rustc/31f858d9a511f24fedb8ed997b28304fec809630/compiler/rustc_query_system/src/dep_graph/graph.rs:319:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new

note: Clippy version: clippy 0.1.69 (31f858d9 2023-02-28)

query stack during panic:
#0 [dropck_outlives] computing dropck types for `[static generator@src/batch/src/executor/hash_agg.rs:196:5: 196:58]`
#1 [mir_borrowck] borrow-checking `executor::hash_agg::<impl at src/batch/src/executor/hash_agg.rs:195:1: 195:50>::do_execute`
end of query stack
error: could not compile `risingwave_batch`
If cargo clippy check failed or generates warning, you may run cargo clippy --workspace --all-targets --fix to fix it. Note that clippy fix requires manual review, as not all auto fixes are guaranteed to be reasonable.
Alternately, you may run ./risedev cf {package_names} to fix those packages (e.g. frontend, meta).

Reproducer

Here's the branch which fails: https://github.com/risingwavelabs/risingwave/tree/repro-1.

Will add more information if I discover anything further.

Version

rustc 1.69.0-nightly (31f858d9a 2023-02-28)
binary: rustc
commit-hash: 31f858d9a511f24fedb8ed997b28304fec809630
commit-date: 2023-02-28
host: aarch64-apple-darwin
release: 1.69.0-nightly
LLVM version: 15.0.7

Additional Labels

No response

@kwannoel kwannoel added the C-bug Category: Clippy is not doing the correct thing label Apr 10, 2023
@kwannoel
Copy link
Author

Probably duplicate of #10298. May already be resolved. Can be closed if unable to reproduce.

@kwannoel
Copy link
Author

Btw duplicate of multiple issues likely, adding a link here for easy reference: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+forcing+query+with+already+existing+DepNode

@bgeron
Copy link

bgeron commented Apr 11, 2023

I got the same error independently on a different codebase, Intel mac, rust 1.68.2 from rustup.

@bgeron
Copy link

bgeron commented Apr 11, 2023

Likely duplicate of rust-lang/rust#83085 and not in clippy itself.

Indeed this error went away for me after cleaning, suggesting it's an issue with incremental compilation like in rust-lang/rust#83085 .

@bgeron
Copy link

bgeron commented Apr 11, 2023

Workaround: CARGO_INCREMENTAL=0 cargo clippy

@kwannoel
Copy link
Author

Cool, thanks very much for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

No branches or pull requests

2 participants