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

internal compiler error: Cannot create local mono-item for DefId #54427

Closed
lovasoa opened this issue Sep 21, 2018 · 4 comments
Closed

internal compiler error: Cannot create local mono-item for DefId #54427

lovasoa opened this issue Sep 21, 2018 · 4 comments
Labels
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

@lovasoa
Copy link
Contributor

lovasoa commented Sep 21, 2018

I was trying to build https://github.com/lovasoa/wikipedia-externallinks-fast-extraction

I am not sure whether this is important, but I launched cargo test, and in another terminal window cargo build --release (before cargo test completed).

The compiler crashed with :

Full log with stacktrace
$ RUST_BACKTRACE=1 cargo build --release --verbose
       Fresh version_check v0.1.4
       Fresh nodrop v0.1.12
       Fresh unicode-xid v0.1.0
       Fresh cfg-if v0.1.5
       Fresh scopeguard v0.3.3
       Fresh memoffset v0.2.1
       Fresh libc v0.2.43
       Fresh either v1.5.0
       Fresh arrayvec v0.4.7
       Fresh crossbeam-utils v0.2.2
       Fresh num_cpus v1.8.0
       Fresh memchr v1.0.2
       Fresh proc-macro2 v0.4.19
       Fresh serde v1.0.79
       Fresh nom v3.2.1
       Fresh lazy_static v1.1.0
       Fresh quote v0.6.8
       Fresh crossbeam-epoch v0.3.1
       Fresh syn v0.15.4
       Fresh crossbeam-deque v0.2.0
       Fresh serde_derive v1.0.79
       Fresh rayon-core v1.4.1
       Fresh nom-sql v0.0.4 (https://github.com/lovasoa/nom-sql?branch=develop#a0e27acb)
       Fresh rayon v1.0.2
   Compiling wikipedia-externallinks-fast-extraction v0.1.3 (file:///data/olojkine/wikipedia-externallinks-fast-extraction)
     Running `rustc --crate-name wikipedia_externallinks_fast_extraction src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=b66fbcfb43546d83 -C extra-filename=-b66fbcfb43546d83 --out-dir /data/olojkine/wikipedia-externallinks-fast-extraction/target/release/deps -L dependency=/data/olojkine/wikipedia-externallinks-fast-extraction/target/release/deps --extern nom_sql=/data/olojkine/wikipedia-externallinks-fast-extraction/target/release/deps/libnom_sql-d06d0df88b968b4e.rlib --extern rayon=/data/olojkine/wikipedia-externallinks-fast-extraction/target/release/deps/librayon-f094e027f22037a8.rlib --extern wikipedia_externallinks_fast_extraction=/data/olojkine/wikipedia-externallinks-fast-extraction/target/release/deps/libwikipedia_externallinks_fast_extraction-4acd52c179b5a259.rlib`
error: internal compiler error: librustc_mir/monomorphize/collector.rs:765: Cannot create local mono-item for DefId(9/0:26 ~ wikipedia_externallinks_fast_extraction[5af3]::extract_target_string[0])

thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:554:9
stack backtrace:
   0: rust_metadata_std_98e61318516cc0b04529352b797fb4de
   1: rust_metadata_std_98e61318516cc0b04529352b797fb4de
   2: rust_metadata_std_98e61318516cc0b04529352b797fb4de
   3: rust_metadata_std_98e61318516cc0b04529352b797fb4de
   4: <unknown>
   5: std::panicking::rust_panic_with_hook
   6: <unknown>
   7: rustc_errors::Handler::bug
   8: rust_metadata_rustc_da44138ed4d62c00cdcce762e2a2cb27
   9: rust_metadata_rustc_da44138ed4d62c00cdcce762e2a2cb27
  10: rust_metadata_rustc_da44138ed4d62c00cdcce762e2a2cb27
  11: rust_metadata_rustc_da44138ed4d62c00cdcce762e2a2cb27
  12: rust_metadata_rustc_da44138ed4d62c00cdcce762e2a2cb27
  13: rustc::session::bug_fmt
  14: <unknown>
  15: <unknown>
  16: <rustc_mir::monomorphize::collector::MirNeighborCollector<'a, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_terminator_kind
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: <unknown>
  26: <unknown>
  27: <unknown>
  28: <unknown>
  29: <unknown>
  30: <unknown>
  31: <unknown>
  32: <unknown>
  33: <unknown>
  34: <unknown>
  35: <unknown>
  36: <unknown>
  37: <unknown>
  38: <unknown>
  39: <unknown>
  40: <unknown>
  41: <unknown>
  42: <unknown>
  43: <unknown>
  44: <unknown>
  45: <unknown>
  46: <unknown>
  47: <unknown>
  48: <unknown>
  49: <unknown>
  50: <unknown>
  51: <unknown>
  52: <unknown>
  53: rustc_mir::monomorphize::collector::collect_crate_mono_items
  54: rust_metadata_rustc_codegen_llvm_4192c42b4015d62d2dcff2cfca94eaa0
  55: <unknown>
  56: rust_metadata_rustc_da44138ed4d62c00cdcce762e2a2cb27
  57: rust_metadata_rustc_da44138ed4d62c00cdcce762e2a2cb27
  58: rust_metadata_rustc_da44138ed4d62c00cdcce762e2a2cb27
  59: rust_metadata_rustc_da44138ed4d62c00cdcce762e2a2cb27
  60: <unknown>
  61: <unknown>
  62: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate
  63: <unknown>
  64: rustc_driver::driver::phase_4_codegen
  65: <unknown>
  66: <unknown>
  67: <unknown>
  68: <unknown>
  69: rustc_driver::driver::compile_input
  70: <unknown>
  71: <unknown>
  72: <unknown>
  73: <unknown>
  74: __rust_maybe_catch_panic
  75: <unknown>
  76: rustc_driver::main
  77: <unknown>
  78: rust_metadata_std_98e61318516cc0b04529352b797fb4de
  79: __rust_maybe_catch_panic
  80: std::rt::lang_start_internal
  81: <unknown>
  82: __libc_start_main
  83: <unknown>
query stack during panic:
#0 [collect_and_partition_mono_items] collect_and_partition_mono_items
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.28.0 running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 --crate-type bin

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

error: Could not compile `wikipedia-externallinks-fast-extraction`.

Caused by:
  process didn't exit successfully: `rustc --crate-name wikipedia_externallinks_fast_extraction src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=b66fbcfb43546d83 -C extra-filename=-b66fbcfb43546d83 --out-dir /data/olojkine/wikipedia-externallinks-fast-extraction/target/release/deps -L dependency=/data/olojkine/wikipedia-externallinks-fast-extraction/target/release/deps --extern nom_sql=/data/olojkine/wikipedia-externallinks-fast-extraction/target/release/deps/libnom_sql-d06d0df88b968b4e.rlib --extern rayon=/data/olojkine/wikipedia-externallinks-fast-extraction/target/release/deps/librayon-f094e027f22037a8.rlib --extern wikipedia_externallinks_fast_extraction=/data/olojkine/wikipedia-externallinks-fast-extraction/target/release/deps/libwikipedia_externallinks_fast_extraction-4acd52c179b5a259.rlib` (exit code: 101)

I am using rust 1.28.0.

@csmoe csmoe added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Sep 21, 2018
@lovasoa
Copy link
Contributor Author

lovasoa commented Sep 21, 2018

I pushed the failing version to github. It is commit bf3331c617e0304a99e6c3965278e87eb00858ed

@lovasoa
Copy link
Contributor Author

lovasoa commented Sep 21, 2018

This may be a duplicate of #50865 , I'm not sure.

lovasoa pushed a commit to lovasoa/wikipedia-externallinks-fast-extraction that referenced this issue Sep 21, 2018
@lovasoa
Copy link
Contributor Author

lovasoa commented Sep 21, 2018

Making the incriminated function public fixed the problem.

@jonas-schievink jonas-schievink added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Feb 9, 2019
@jonas-schievink
Copy link
Contributor

Reproduces on 1.29.0, fixed in 1.30.0.

If this can be reduced to a minimal example we could add a test, but we could also just close this as-is.

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-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