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

Panic while running rustdoc on polonius-engine #63765

Closed
Nashenas88 opened this issue Aug 21, 2019 · 7 comments
Closed

Panic while running rustdoc on polonius-engine #63765

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

Comments

@Nashenas88
Copy link
Contributor

Nashenas88 commented Aug 21, 2019

I get a panic in beta at least as far back as 1.31 while attempting to compile the documentation in rust-lang/polonius (seems to stem from polonius-engine)

$ RUST_BACKTRACE=full cargo doc --open
 Documenting polonius-engine v0.9.0 (/home/pfaria/projects/polonius/polonius-engine)
thread 'rustc' panicked at 'assertion failed: output.is_none()', src/librustdoc/clean/simplify.rs:100:21
stack backtrace:
   0:     0x7f8b6ad6367b - backtrace::backtrace::libunwind::trace::h23ae608c8b906c69
                               at /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/backtrace-0.3.34/src/backtrace/libunwind.rs:88
   1:     0x7f8b6ad6367b - backtrace::backtrace::trace_unsynchronized::h65b3ea295a85fd48
                               at /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/backtrace-0.3.34/src/backtrace/mod.rs:66
   2:     0x7f8b6ad6367b - std::sys_common::backtrace::_print::h24f527b44b6cfc06
                               at src/libstd/sys_common/backtrace.rs:47
   3:     0x7f8b6ad6367b - std::sys_common::backtrace::print::h712608e4347fd64a
                               at src/libstd/sys_common/backtrace.rs:36
   4:     0x7f8b6ad6367b - std::panicking::default_hook::{{closure}}::h6c3d570c2b500048
                               at src/libstd/panicking.rs:200
   5:     0x7f8b6ad63356 - std::panicking::default_hook::hb29963fb4747e0dd
                               at src/libstd/panicking.rs:214
   6:     0x7f8b6ad63ded - std::panicking::rust_panic_with_hook::hd1236c3083de823a
                               at src/libstd/panicking.rs:477
   7:     0x555c7a33b4a5 - std::panicking::begin_panic::heed8af319fcd6c2a
   8:     0x555c7a4d5757 - core::iter::traits::iterator::Iterator::try_for_each::{{closure}}::h42882a57d6bf8766
   9:     0x555c7a4d7851 - alloc::vec::Vec<T>::retain::h6e52bbc7ffae7b67
  10:     0x555c7a3563e4 - rustdoc::clean::simplify::where_clauses::hf153712a597c92b9
  11:     0x555c7a2d4f46 - <(&rustc::ty::Generics, &&rustc::ty::GenericPredicates) as rustdoc::clean::Clean<rustdoc::clean::Generics>>::clean::h1be883588480622d
  12:     0x555c7a3a6a6d - rustdoc::clean::inline::build_impl::hd21e5948bd391407
  13:     0x555c7a563281 - rustdoc::passes::collect_trait_impls::collect_trait_impls::h15ae7974c39a35b1
  14:     0x555c7a3740d2 - rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}::h7cc9e6b09c3a0441
  15:     0x7f8b6b611f6a - rustc_interface::passes::create_global_ctxt::{{closure}}::h90d4aa14bb25536b
  16:     0x555c7a37580c - rustc_interface::interface::run_compiler_in_existing_thread_pool::h2f8fb4b935eb9b1e
  17:     0x555c7a46a6dd - rustdoc::core::run_core::h9ab6224a05c1e696
  18:     0x555c7a3fef00 - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h8455614fc1319e90
  19:     0x555c7a33b54b - std::panicking::try::do_call::h64a711640202dd20
  20:     0x7f8b6ad747ca - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:80
  21:     0x555c7a3ffe13 - rustc_driver::report_ices_to_stderr_if_any::h84f5ff2d8d681158
  22:     0x555c7a2f38ab - rustdoc::main_options::h9e5497ce4a610df0
  23:     0x555c7a36c6d5 - std::thread::local::LocalKey<T>::with::h1073a33ac58fb4f7
  24:     0x555c7a37110e - scoped_tls::ScopedKey<T>::set::ha4d788bb2db4bca7
  25:     0x555c7a34f7e2 - syntax::with_globals::ha81ddbe58a4509bc
  26:     0x555c7a4007e3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h49ade963400fb398
  27:     0x7f8b6ad747ca - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:80
  28:     0x555c7a530a19 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h8f2eec79e922f5a6
  29:     0x7f8b6ad4733f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hb5396a93648ae250
                               at /rustc/e450539c2a8d7f791268d699cbe45ab3e57d43a1/src/liballoc/boxed.rs:787
  30:     0x7f8b6ad73450 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h92593001847bb63e
                               at /rustc/e450539c2a8d7f791268d699cbe45ab3e57d43a1/src/liballoc/boxed.rs:787
  31:     0x7f8b6ad73450 - std::sys_common::thread::start_thread::h569f3ccc0d5dcd83
                               at src/libstd/sys_common/thread.rs:13
  32:     0x7f8b6ad73450 - std::sys::unix::thread::Thread::new::thread_start::hd9ff46fad032d886
                               at src/libstd/sys/unix/thread.rs:79
  33:     0x7f8b6acc9182 - start_thread
  34:     0x7f8b6abd6b1f - __clone
  35:                0x0 - <unknown>

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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.38.0-beta.1 (e450539c2 2019-08-13) running on x86_64-unknown-linux-gnu

error: Could not document `polonius-engine`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name polonius_engine polonius-engine/src/lib.rs -o /home/pfaria/projects/polonius/target/doc --color always -L dependency=/home/pfaria/projects/polonius/target/debug/deps --extern datafrog=/home/pfaria/projects/polonius/target/debug/deps/libdatafrog-875e92c848fe69da.rmeta --extern log=/home/pfaria/projects/polonius/target/debug/deps/liblog-4bbcdf3931b319c3.rmeta --extern rustc_hash=/home/pfaria/projects/polonius/target/debug/deps/librustc_hash-15dc0f86c5246892.rmeta` (exit code: 1)
@csmoe csmoe added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 21, 2019
@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 labels Aug 21, 2019
@Nashenas88
Copy link
Contributor Author

Going to take a look at this during RustConf :)

@Nashenas88
Copy link
Contributor Author

Something in a recent nightly compiler fixes this. When I rebased the PR above to master, I was no longer able to reproduce the issue. Should this be closed or should we identify which change fixed this issue?

@Mark-Simulacrum
Copy link
Member

Doesn't seem too important to track down presuming this isn't a regression (which seems true). Closing.

@Nashenas88
Copy link
Contributor Author

So... seems I made a mistake and this is not actually fixed. I had made a fix to the compiler, built the docs, rebased the rustc PR, rebuilt rustdoc, then added the original error back, and tried to build the docs again. I didn't wipe the existing docs, so I assume this means it used the cached results since the code the docs were based on hadn't changed, but the rustdoc tool had. This is still occurring in nightly.

@Nashenas88
Copy link
Contributor Author

@QuietMisdreavus summary of what we've discovered so far:
This impl https://github.com/rust-lang/datafrog/blob/master/src/treefrog.rs#L592-L598 has possible two issues: Key: Ord in the angle brackets and Key: Ord + 'leap in the where clause. It could also be possibly related to the duplicate bounds on the Func generic param: Func: Fn(&Tuple) -> (Key, Val) in both the angle brackets and the where clause.

This only occurs when datafrog is a dependency of polonius-engine and not when rustdoc is run directly on datafrog.

@Nashenas88
Copy link
Contributor Author

Another important detail is that this occurs on stable at least as far back as 1.31. Any release before that can't compile this version of polonius because of the 2018 edition changes.

@Nashenas88
Copy link
Contributor Author

After more research, this is a duplicate of #57180

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

Successfully merging a pull request may close this issue.

4 participants