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

ICE: Trying to invalidate IncrCompSession #39508

Closed
Marwes opened this issue Feb 3, 2017 · 2 comments
Closed

ICE: Trying to invalidate IncrCompSession #39508

Marwes opened this issue Feb 3, 2017 · 2 comments
Labels
A-incr-comp Area: Incremental compilation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@Marwes
Copy link
Contributor

Marwes commented Feb 3, 2017

Tried to compile gluon with CARGO_INCREMENTAL but got a ICE when compiling the gluon_check crate (gluon_base and gluon_parser compile fine). I am unsure how to proceed to minimize the ICE.

Only special thing that comes to mind with check/tests/metadata.rs is that there is also base/parser/metadata.rs which I suppose might interfere?

$ RUST_BACKTRACE=1 CARGO_INCREMENTAL=1 cargo test --features test -p gluon_check
   Compiling gluon_check v0.2.2 (file:///home/markus/gluon/check)
error: failed to remove /home/markus/gluon/target/debug/deps/metadata-98e6f654f68aa8ae.metadata.o: No such file or directory (os error 2)

warning: Error finalizing incremental compilation session directory `/home/markus/gluon/target/debug/incremental/metadata-nbuiqqcxwr74/s-emsrkw6mlh-4u3ywp-working`: No such file or directory (os error 2)

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: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at '/buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc/session/mod.rs:457: Trying to invalidate IncrCompSession `InvalidBecauseOfErrors { session_directory: "/home/markus/gluon/target/debug/incremental/metadata-nbuiqqcxwr74/s-emsrkw6mlh-4u3ywp-working" }`', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc/session/mod.rs:789
stack backtrace:
   1:     0x7f88981dc45c - std::sys::imp::backtrace::tracing::imp::write::hf7294f5e24536b4a
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x7f88981ea90e - std::panicking::default_hook::{{closure}}::h9a07d0b00c43fbee
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:351
   3:     0x7f88981ea4b3 - std::panicking::default_hook::hf25feff2d08bf39b
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:361
   4:     0x7f88981eadab - std::panicking::rust_panic_with_hook::h4cb8c6fbb8386ccf
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:555
   5:     0x7f88951596c2 - std::panicking::begin_panic::h0ee9e71e3a889a8e
   6:     0x7f889530c0ec - rustc::session::opt_span_bug_fmt::{{closure}}::hb77f1c2804eeb101
   7:     0x7f889530bbc5 - rustc::session::opt_span_bug_fmt::h6020528146c503fb
   8:     0x7f889530b822 - rustc::session::bug_fmt::h80c5b006234b3146
   9:     0x7f88953084ab - rustc::session::Session::mark_incr_comp_session_as_invalid::h13d890b8522115b7
  10:     0x7f88975fb7ec - rustc_incremental::persist::fs::finalize_session_directory::h079689918703b64c
  11:     0x7f88985698c9 - rustc_driver::driver::compile_input::hab977ae496b3a6f1
  12:     0x7f88985b3a94 - rustc_driver::run_compiler::h81290683db66a63c
  13:     0x7f88984bfebb - std::panicking::try::do_call::h00942d7a5d04424f
  14:     0x7f88981f3bea - __rust_maybe_catch_panic
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98
  15:     0x7f88984e8122 - <F as alloc::boxed::FnBox<A>>::call_box::hd87f7ab2fccbd670
  16:     0x7f88981e9764 - std::sys::imp::thread::Thread::new::thread_start::hc16926852e47c008
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/liballoc/boxed.rs:624
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys_common/thread.rs:21
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/thread.rs:84
  17:     0x7f888ffa36a9 - start_thread
  18:     0x7f8897e9eeec - clone
  19:                0x0 - <unknown>

error: Could not compile `gluon_check`.
rustc 1.16.0-nightly (eedaa94e3 2017-02-02)
binary: rustc
commit-hash: eedaa94e330094a84f4df9aa52949515327f8e80
commit-date: 2017-02-02
host: x86_64-unknown-linux-gnu
release: 1.16.0-nightly
LLVM version: 3.9
@michaelwoerister michaelwoerister added A-incr-comp Area: Incremental compilation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Feb 4, 2017
@michaelwoerister
Copy link
Member

This really seems to be linked to the metadata file name somehow, but I don't understand how exactly yet.

frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 8, 2017
…ata, r=alexcrichton

Choose different name for metadata obj-file to avoid clashes with user-chosen names.

Fixes rust-lang#39585 and probably rust-lang#39508.
Incremental compilation assigns different names to obj-files than regular compilation. If a crate is called "metadata" this can lead to a clash between the root module's obj-file and the obj-file containing crate-metadata. This PR assigns a name to the metadata obj-file that cannot clash with other obj-file because it contains a `.` which is not allowed in a Rust module identifier.

r? @alexcrichton

cc @nikomatsakis
frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 9, 2017
…ata, r=alexcrichton

Choose different name for metadata obj-file to avoid clashes with user-chosen names.

Fixes rust-lang#39585 and probably rust-lang#39508.
Incremental compilation assigns different names to obj-files than regular compilation. If a crate is called "metadata" this can lead to a clash between the root module's obj-file and the obj-file containing crate-metadata. This PR assigns a name to the metadata obj-file that cannot clash with other obj-file because it contains a `.` which is not allowed in a Rust module identifier.

r? @alexcrichton

cc @nikomatsakis
@Marwes
Copy link
Contributor Author

Marwes commented Feb 13, 2017

This works now as well (as does running CARGO_INCREMENTAL on the rest of gluon). Awesome!

@Marwes Marwes closed this as completed Feb 13, 2017
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 I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants