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

compiler 1.52.0 error with dependency oracle="0.5" #85028

Closed
corentinway opened this issue May 7, 2021 · 2 comments
Closed

compiler 1.52.0 error with dependency oracle="0.5" #85028

corentinway opened this issue May 7, 2021 · 2 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@corentinway
Copy link

Note

  • It seems incremental build is failling because a cargo clean and a cargo build seems to solve the issue.
  • works fine for the 1st build with beta version

Code

use oracle::{Connection, Error};

fn main() {
    println!("Hello, world!");

    let user = "xxxx";
    let password = "xxxxx";
    let url = "aaaaa-aaaaa.us.ccccc.dddddd:12347/ABCDEF";

    let conn = Connection::connect(user, password, url).unwrap();
    println!("Connected !");

    let sql = "select id from aaaaa_bbb.person where id = '1254984536' ";

    let rows = conn.query_as::<String>( sql, &[&10]).unwrap();

    for row_result in rows {
        let (id) = row_result.unwrap();
        println!("{}", id);
    }
}

Meta

rustc --version --verbose:

rustc 1.52.0 (88f19c6da 2021-05-03)
binary: rustc
commit-hash: 88f19c6dab716c6281af7602e30f413e809c5974
commit-date: 2021-05-03
host: x86_64-unknown-linux-gnu
release: 1.52.0
LLVM version: 12.0.0

Oracle Instant Client installed : instantclient-basic-linux.x64-21.1.0.0.0

Error output

➜  oracle-select-test git:(master) ✗ cargo build --verbose    

       Fresh cc v1.0.67
       Fresh lazy_static v1.4.0
       Fresh proc-macro-hack v0.5.19
       Fresh paste-impl v0.1.18
       Fresh paste v0.1.18
       Fresh oracle v0.5.1
   Compiling oracle-select-test v0.1.0 (/home/engineer/workspace/rust_lang_testdrive/oracle-select-test)
     Running `rustc --crate-name oracle_select_test --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=aa2657c0d92fbaab -C extra-filename=-aa2657c0d92fbaab --out-dir /home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps -C incremental=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/incremental -L dependency=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps --extern oracle=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps/liboracle-4e3a2277aecdac45.rlib -L native=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/build/oracle-7bf949fc3679b243/out`
    Building [=======================>   ] 10/11: oracle-select-test(bin)                                                                                                         
warning: unused import: `Error`
 --> src/main.rs:1:26
  |
1 | use oracle::{Connection, Error};
  |                          ^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unnecessary parentheses around pattern
  --> src/main.rs:18:13
   |
18 |         let (id) = row_result.unwrap();
   |             ^^^^ help: remove these parentheses
   |
   = note: `#[warn(unused_parens)]` on by default

    Building [=======================>   ] 10/11: oracle-select-test(bin)                                                                                                         
thread 'rustc' panicked at 'found unstable fingerprints for predicates_of(core[b0ed]::ops::function::Fn): GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::ops::FnMut<Args>>)), /home/engineer/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:67:21: 67:32 (#0)), (Binder(TraitPredicate(<Args as std::marker::Sized>)), /home/engineer/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:67:14: 67:18 (#0)), (Binder(TraitPredicate(<Self as std::ops::Fn<Args>>)), /home/engineer/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:67:1: 67:32 (#0))] }', /rustc/88f19c6dab716c6281af7602e30f413e809c5974/compiler/rustc_query_system/src/query/plumbing.rs:593:5
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0 (88f19c6da 2021-05-03) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [predicates_of] computing predicates of `std::ops::Fn`
#1 [vtable_methods] finding all methods for trait std::ops::Fn
end of query stack
warning: 2 warnings emitted

error: could not compile `oracle-select-test`

Caused by:
  process didn't exit successfully: `rustc --crate-name oracle_select_test --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=aa2657c0d92fbaab -C extra-filename=-aa2657c0d92fbaab --out-dir /home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps -C incremental=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/incremental -L dependency=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps --extern oracle=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps/liboracle-4e3a2277aecdac45.rlib -L native=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/build/oracle-7bf949fc3679b243/out` (exit code: 101)
Backtrace

➜  oracle-select-test git:(master) ✗ RUST_BACKTRACE=1 cargo build --verbose
       Fresh cc v1.0.67
       Fresh lazy_static v1.4.0
       Fresh proc-macro-hack v0.5.19
       Fresh paste-impl v0.1.18
       Fresh paste v0.1.18
       Fresh oracle v0.5.1
   Compiling oracle-select-test v0.1.0 (/home/engineer/workspace/rust_lang_testdrive/oracle-select-test)
     Running `rustc --crate-name oracle_select_test --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=aa2657c0d92fbaab -C extra-filename=-aa2657c0d92fbaab --out-dir /home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps -C incremental=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/incremental -L dependency=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps --extern oracle=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps/liboracle-4e3a2277aecdac45.rlib -L native=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/build/oracle-7bf949fc3679b243/out`
warning: unused import: `Error`
 --> src/main.rs:1:26
  |
1 | use oracle::{Connection, Error};
  |                          ^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unnecessary parentheses around pattern
  --> src/main.rs:18:13
   |
18 |         let (id) = row_result.unwrap();
   |             ^^^^ help: remove these parentheses
   |
   = note: `#[warn(unused_parens)]` on by default

thread 'rustc' panicked at 'found unstable fingerprints for predicates_of(core[b0ed]::ops::function::Fn): GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::ops::FnMut<Args>>)), /home/engineer/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:67:21: 67:32 (#0)), (Binder(TraitPredicate(<Args as std::marker::Sized>)), /home/engineer/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:67:14: 67:18 (#0)), (Binder(TraitPredicate(<Self as std::ops::Fn<Args>>)), /home/engineer/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:67:1: 67:32 (#0))] }', /rustc/88f19c6dab716c6281af7602e30f413e809c5974/compiler/rustc_query_system/src/query/plumbing.rs:593:5
stack backtrace:
   0: rust_begin_unwind
             at /rustc/88f19c6dab716c6281af7602e30f413e809c5974/library/std/src/panicking.rs:493:5
   1: std::panicking::begin_panic_fmt
             at /rustc/88f19c6dab716c6281af7602e30f413e809c5974/library/std/src/panicking.rs:435:5
   2: rustc_query_system::query::plumbing::incremental_verify_ich
   3: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory
   4: rustc_query_system::query::plumbing::get_query_impl
   5: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::predicates_of
   6: rustc_middle::ty::generics::GenericPredicates::instantiate_identity_into
   7: rustc_middle::ty::generics::GenericPredicates::instantiate_identity
   8: rustc_trait_selection::traits::object_safety::generics_require_sized_self
   9: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
  10: <core::iter::adapters::flatten::FlatMap<I,U,F> as core::iter::traits::iterator::Iterator>::next
  11: <smallvec::SmallVec<A> as core::iter::traits::collect::Extend<<A as smallvec::Array>::Item>>::extend
  12: rustc_arena::cold_path
  13: rustc_middle::arena::Arena::alloc_from_iter
  14: rustc_trait_selection::traits::vtable_methods
  15: rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::vtable_methods>::compute
  16: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  17: rustc_query_system::dep_graph::graph::DepGraph<K>::with_ignore
  18: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory
  19: rustc_data_structures::stack::ensure_sufficient_stack
  20: rustc_query_system::query::plumbing::get_query_impl
  21: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::vtable_methods
  22: <rustc_mir::monomorphize::collector::MirNeighborCollector as rustc_middle::mir::visit::Visitor>::visit_rvalue
  23: rustc_mir::monomorphize::collector::collect_neighbours
  24: rustc_mir::monomorphize::collector::collect_items_rec
  25: rustc_mir::monomorphize::collector::collect_crate_mono_items
  26: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items
  27: rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::collect_and_partition_mono_items>::compute
  28: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  29: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  30: rustc_data_structures::stack::ensure_sufficient_stack
  31: rustc_query_system::query::plumbing::force_query_with_job
  32: rustc_query_system::query::plumbing::get_query_impl
  33: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_and_partition_mono_items
  34: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  35: rustc_interface::passes::QueryContext::enter
  36: rustc_interface::queries::Queries::ongoing_codegen
  37: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  38: rustc_span::with_source_map
  39: rustc_interface::interface::create_compiler_and_run
  40: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0 (88f19c6da 2021-05-03) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [predicates_of] computing predicates of `std::ops::Fn`
#1 [vtable_methods] finding all methods for trait std::ops::Fn
#2 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
warning: 2 warnings emitted

error: could not compile `oracle-select-test`

Caused by:
  process didn't exit successfully: `rustc --crate-name oracle_select_test --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=aa2657c0d92fbaab -C extra-filename=-aa2657c0d92fbaab --out-dir /home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps -C incremental=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/incremental -L dependency=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps --extern oracle=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/deps/liboracle-4e3a2277aecdac45.rlib -L native=/home/engineer/workspace/rust_lang_testdrive/oracle-select-test/target/debug/build/oracle-7bf949fc3679b243/out` (exit code: 101)

@corentinway corentinway added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 7, 2021
@nagisa nagisa added the A-incr-comp Area: Incremental compilation label May 7, 2021
@mautamu
Copy link
Contributor

mautamu commented May 7, 2021

Related? #85025, #85003, #83291:

Quoting @Aaron1011 :

This is a known issue - unfortunately, there isn't a fix for it at the moment. As a workaround, you can run cargo clean -p <your_crate_name>, which will allow you to compile it.

#85003 (comment)

@wesleywiser
Copy link
Member

Thanks for filing the bug report! We are currently triaging issues related to #84970 to ensure each underlying problem gets resolved. Since this appears to be a duplicate of #83259 so I'm going to close in favor of that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants