Skip to content

ICE when running kcov with proptest as dev-dependency #60372

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Byter09 opened this issue Apr 29, 2019 · 7 comments
Closed

ICE when running kcov with proptest as dev-dependency #60372

Byter09 opened this issue Apr 29, 2019 · 7 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Byter09
Copy link

Byter09 commented Apr 29, 2019

At this time, this is the latest job that has this problem:
https://gitlab.com/bit-refined/rsctp/-/jobs/204421934

Note, that the pipeline uses the stable toolchain, but I tested it in nightly with:
RUST_BACKTRACE=1 cargo +nightly kcov --verbose -- --include-path=$PWD/src --exclude-region="mod tests"
and this is the result:

backtrace

error: internal compiler error: src/librustc/traits/codegen/mod.rs:56: Encountered error `Unimplemented` selecting `Binder(<core::char::DecodeUtf16<<std::vec::Vec<u16> as core::iter::IntoIterator>::IntoIter> as arbitrary::traits::Arbitrary>)` during codegen

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:636:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   6: std::panicking::begin_panic
   7: rustc_errors::Handler::bug
   8: rustc::util::bug::opt_span_bug_fmt::{{closure}}
   9: rustc::ty::context::tls::with_opt::{{closure}}
  10: rustc::ty::context::tls::with_context_opt
  11: rustc::ty::context::tls::with_opt
  12: rustc::util::bug::opt_span_bug_fmt
  13: rustc::util::bug::bug_fmt
  14: rustc::ty::context::GlobalCtxt::enter_local
  15: rustc::traits::codegen::codegen_fulfill_obligation
  16: rustc::ty::query::__query_compute::codegen_fulfill_obligation
  17: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::codegen_fulfill_obligation>::compute
  18: rustc::dep_graph::graph::DepGraph::with_task_impl
  19: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  20: rustc::ty::instance::Instance::resolve
  21: <rustc_mir::monomorphize::collector::RootCollector as rustc::hir::itemlikevisit::ItemLikeVisitor>::visit_item
  22: rustc::hir::Crate::visit_all_item_likes
  23: rustc_mir::monomorphize::collector::collect_roots
  24: rustc::util::common::time
  25: rustc_mir::monomorphize::collector::collect_crate_mono_items
  26: rustc::util::common::time
  27: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items
  28: rustc::ty::query::__query_compute::collect_and_partition_mono_items
  29: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::collect_and_partition_mono_items>::compute
  30: rustc::dep_graph::graph::DepGraph::with_task_impl
  31: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  32: rustc_codegen_ssa::back::symbol_export::exported_symbols_provider_local
  33: rustc::ty::query::__query_compute::exported_symbols
  34: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::exported_symbols>::compute
  35: rustc::dep_graph::graph::DepGraph::with_task_impl
  36: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  37: rustc_metadata::encoder::encode_metadata
  38: rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore for rustc_metadata::cstore::CStore>::encode_metadata
  39: rustc::ty::context::TyCtxt::encode_metadata
  40: rustc_codegen_llvm::base::write_metadata
  41: rustc::util::common::time
  42: rustc_codegen_ssa::base::codegen_crate
  43: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate
  44: rustc::util::common::time
  45: rustc_interface::passes::start_codegen
  46: rustc::ty::context::tls::enter_global
  47: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  48: rustc_interface::passes::create_global_ctxt::{{closure}}
  49: rustc_interface::passes::BoxedGlobalCtxt::enter
  50: rustc_interface::queries::Query<T>::compute
  51: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::ongoing_codegen
  52: rustc_interface::interface::run_compiler_in_existing_thread_pool
  53: std::thread::local::LocalKey<T>::with
  54: scoped_tls::ScopedKey<T>::set
  55: syntax::with_globals
query stack during panic:
#0 [codegen_fulfill_obligation] checking if `arbitrary::traits::Arbitrary` fulfills its obligations
#1 [collect_and_partition_mono_items] collect_and_partition_mono_items
#2 [exported_symbols] exported_symbols
end of query stack
error: aborting due to previous error


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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.36.0-nightly (272000c94 2019-04-28) running on x86_64-unknown-linux-gnu

note: compiler flags: -C codegen-units=16 -C debuginfo=2 -C link-dead-code --crate-type lib

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

error: Could not compile `proptest`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name proptest /usr/local/cargo/registry/src/github.heygears.com-1ecc6299db9ec823/proptest-0.9.3/src/lib.rs --color never --crate-type lib --emit=dep-info,link -C codegen-units=16 -C debuginfo=2 --cfg 'feature="bit-set"' --cfg 'feature="break-dead-code"' --cfg 'feature="byteorder"' --cfg 'feature="default"' --cfg 'feature="fork"' --cfg 'feature="lazy_static"' --cfg 'feature="num-traits"' --cfg 'feature="quick-error"' --cfg 'feature="rand"' --cfg 'feature="regex-syntax"' --cfg 'feature="rusty-fork"' --cfg 'feature="std"' --cfg 'feature="tempfile"' --cfg 'feature="timeout"' -C metadata=7342cf64d0033a13 -C extra-filename=-7342cf64d0033a13 --out-dir /build/rsctp/target/debug/deps -L dependency=/build/rsctp/target/debug/deps --extern bit_set=/build/rsctp/target/debug/deps/libbit_set-2dedd0970b1d5ea6.rlib --extern bitflags=/build/rsctp/target/debug/deps/libbitflags-7a01429ff838a441.rlib --extern byteorder=/build/rsctp/target/debug/deps/libbyteorder-3dae078ba72e0c6d.rlib --extern lazy_static=/build/rsctp/target/debug/deps/liblazy_static-9604252fe6b354e3.rlib --extern num_traits=/build/rsctp/target/debug/deps/libnum_traits-b33f936061b6eb49.rlib --extern quick_error=/build/rsctp/target/debug/deps/libquick_error-7fd102d578c2cda7.rlib --extern rand=/build/rsctp/target/debug/deps/librand-4f4f30a398bff901.rlib --extern rand_chacha=/build/rsctp/target/debug/deps/librand_chacha-61b717f4d0522db9.rlib --extern rand_xorshift=/build/rsctp/target/debug/deps/librand_xorshift-444cb375d4aea880.rlib --extern regex_syntax=/build/rsctp/target/debug/deps/libregex_syntax-3c916e061fa848c4.rlib --extern rusty_fork=/build/rsctp/target/debug/deps/librusty_fork-cab0c95269f5c71c.rlib --extern tempfile=/build/rsctp/target/debug/deps/libtempfile-e551b207f6f43885.rlib --cap-lints allow -C link-dead-code` (exit code: 101)

We're using a self-built image: https://gitlab.com/bit-refined/docker-rust-tools
You can run it with: sudo docker run -it registry.gitlab.com/bit-refined/docker-rust-tools /bin/bash

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 29, 2019
@Centril
Copy link
Contributor

Centril commented Apr 29, 2019

cc #52478 #58375

@pnkfelix
Copy link
Member

pnkfelix commented May 2, 2019

this is probably a duplicate of #58375. For triage purposes, I'm going to focus on how we're going to address that.

triage: P-high, with a focus on confirming that this is a duplicate of #58375.

@pnkfelix pnkfelix added P-high High priority and removed I-nominated labels May 2, 2019
@pnkfelix
Copy link
Member

pnkfelix commented Jul 4, 2019

triage: assigning to self.

@pnkfelix pnkfelix self-assigned this Jul 4, 2019
@pnkfelix
Copy link
Member

Unfortunately I did not manage to find the time to look into this.

At this point I'm going to be taking a break for a few months, so I am unassigning myself from this issue.

However, it does seem like progress has been made on #58375 (comment)

@pnkfelix pnkfelix removed their assignment Jul 12, 2019
@pnkfelix
Copy link
Member

Since #58375 is now fixed: @Byter09 , can you check if this bug is also fixed?

@Byter09
Copy link
Author

Byter09 commented Sep 12, 2019

@pnkfelix Building a new image here: https://gitlab.com/bit-refined/docker-rust-tools/-/jobs/293949707
Running the pipeline here: https://gitlab.com/bit-refined/rsctp/-/jobs/293993236

If it succeeds, I will close this issue.

@Byter09
Copy link
Author

Byter09 commented Sep 12, 2019

Even though an unrelated issue failed the pipeline, the coverage report was successfully generated.

Thanks to everyone involved in fixing it!

@Byter09 Byter09 closed this as completed Sep 12, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority 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