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

Closed
blaenk opened this issue Mar 6, 2015 · 12 comments
Closed

internal compiler error #23133

blaenk opened this issue Mar 6, 2015 · 12 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@blaenk
Copy link
Contributor

blaenk commented Mar 6, 2015

Building the latest version of the notify crate (1.2.0) yields an internal compiler error.

rustc 1.0.0-nightly (b0746ff19 2015-03-05) (built 2015-03-06)

output:

       Fresh inotify v0.1.7
       Fresh libc v0.1.2
       Fresh gcc v0.3.1
       Fresh time v0.1.19
   Compiling notify v1.2.0 (file:///home/blaenk/code/rust/rsnotify)
     Running `rustc src/lib.rs --crate-name notify --crate-type lib -g -C metadata=9f3e1aada36c2ecc -C extra-filename=-9f3e1aada36c2ecc --out-dir /home/blaenk/code/rust/rsnotify/target --emit=dep-info,link -L dependency=/home/blaenk/code/rust/rsnotify/target -L dependency=/home/blaenk/code/rust/rsnotify/target/deps --extern time=/home/blaenk/code/rust/rsnotify/target/deps/libtime-f5c2f62bb1bdf976.rlib --extern inotify=/home/blaenk/code/rust/rsnotify/target/deps/libinotify-d3ecb034a7f81481.rlib -L native=/home/blaenk/code/rust/rsnotify/target/build/time-f5c2f62bb1bdf976/out`
src/lib.rs:1:49: 1:53 warning: unused or unknown feature, #[warn(unused_features)] on by default
src/lib.rs:1 #![feature(path, io, core, rustc_private, libc, hash, std_misc, fs)]
                                                             ^~~~
src/lib.rs:1:22: 1:26 warning: unused or unknown feature, #[warn(unused_features)] on by default
src/lib.rs:1 #![feature(path, io, core, rustc_private, libc, hash, std_misc, fs)]
                                  ^~~~
src/inotify/mod.rs:27:5: 27:18 warning: use of deprecated item: use module-level free function, #[warn(deprecated)] on by default
src/inotify/mod.rs:27     Thread::spawn(move || {
                          ^~~~~~~~~~~~~
src/poll.rs:20:5: 20:18 warning: use of deprecated item: use module-level free function, #[warn(deprecated)] on by default
src/poll.rs:20     Thread::spawn(move || {
                   ^~~~~~~~~~~~~
/home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sync/mutex.rs:177:37: 180:2 error: internal compiler error: debuginfo: Could not find scope info for node NodeExpr(Expr { id: 6267, node: ExprStruct(Path { span: Span { lo: BytePos(4570389), hi: BytePos(4570400), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: StaticMutex#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }, [Field { ident: Spanned { node: lock#0, span: Span { lo: BytePos(1772893), hi: BytePos(1772897), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 6268, node: ExprPath(None, Path { span: Span { lo: BytePos(4570413), hi: BytePos(4570428), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: sys#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: MUTEX_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4570413), hi: BytePos(4570428), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4570407), hi: BytePos(4570428), expn_id: ExpnId(4294967295) } }, Field { ident: Spanned { node: poison#0, span: Span { lo: BytePos(1772920), hi: BytePos(1772926), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 6269, node: ExprPath(None, Path { span: Span { lo: BytePos(4570442), hi: BytePos(4570459), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: poison#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: FLAG_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4570442), hi: BytePos(4570459), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4570434), hi: BytePos(4570459), expn_id: ExpnId(4294967295) } }], None), span: Span { lo: BytePos(4570389), hi: BytePos(4570462), expn_id: ExpnId(4294967295) } })
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 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:129

stack backtrace:
   1:     0x7fa176709f6f - sys::backtrace::write::h2f046b875b210aadOBA
   2:     0x7fa176734c82 - panicking::on_panic::h792ac47fb8c07faehHJ
   3:     0x7fa176669f2a - rt::unwind::begin_unwind_inner::hbffac672008352c8knJ
   4:     0x7fa173ac884d - rt::unwind::begin_unwind::h7782663023585067018
   5:     0x7fa173ac87f3 - diagnostic::SpanHandler::span_bug::h2cdd5e3b5b05e8f800D
   6:     0x7fa1743a1d03 - session::Session::span_bug::hae37e3dbc1cfddbalVp
   7:     0x7fa175eb96bc - trans::debuginfo::scope_metadata::h3b34d6a00870eb16ClE
   8:     0x7fa175dcb568 - trans::debuginfo::set_source_location::h9f5b090c644fcb73vPD
   9:     0x7fa175d7ff32 - trans::expr::trans_into::h3bbb0e210c9fb401Vph
  10:     0x7fa175d801f9 - trans::expr::trans_into::h3bbb0e210c9fb401Vph
  11:     0x7fa175de27df - trans::expr::trans_uniq_expr::hd6a8aea14a08d77bQmj
  12:     0x7fa175de344f - trans::expr::trans_unary::h35488c79f6cf1ec15ij
  13:     0x7fa175dcd96e - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h
  14:     0x7fa175d80507 - trans::expr::trans_into::h3bbb0e210c9fb401Vph
  15:     0x7fa175e00859 - trans::expr::trans_adt::h66e672e44790aeeca9i
  16:     0x7fa175e0330f - trans::expr::trans_struct::closure.42092
  17:     0x7fa175ded176 - trans::expr::trans_struct::ha16472c37d95c70064i
  18:     0x7fa175dcf69d - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi
  19:     0x7fa175d804e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph
  20:     0x7fa175d81317 - trans::controlflow::trans_block::h4b526e186a057814x7d
  21:     0x7fa175e583b1 - trans::base::trans_closure::h194b7ad0474e43a46mt
  22:     0x7fa175d69948 - trans::base::trans_fn::h5416ef5d9cea730bZxt
  23:     0x7fa175d6b3e0 - trans::monomorphize::monomorphic_fn::he3c4a3a0040e5501Qud
  24:     0x7fa175db0f9e - trans::callee::trans_fn_ref_with_substs::h85a6252d422343b2qng
  25:     0x7fa175daf52e - trans::callee::trans_fn_ref::h7eebc758d7f24cf00bg
  26:     0x7fa175dac97d - trans::callee::trans::h1b831ba8a404e3ach1f
  27:     0x7fa175dc30eb - trans::callee::trans_call_inner::h15453122340747063984
  28:     0x7fa175dcfb40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi
  29:     0x7fa175d804e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph
  30:     0x7fa175e00859 - trans::expr::trans_adt::h66e672e44790aeeca9i
  31:     0x7fa175e0330f - trans::expr::trans_struct::closure.42092
  32:     0x7fa175ded176 - trans::expr::trans_struct::ha16472c37d95c70064i
  33:     0x7fa175dcf69d - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi
  34:     0x7fa175d804e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph
  35:     0x7fa175e91df7 - trans::_match::mk_binding_alloca::h16286962064436778167
  36:     0x7fa175d7f8ed - trans::base::init_local::he5827bc6a6f1a71eyBs
  37:     0x7fa175d80ff2 - trans::controlflow::trans_block::h4b526e186a057814x7d
  38:     0x7fa175e583b1 - trans::base::trans_closure::h194b7ad0474e43a46mt
  39:     0x7fa175d69948 - trans::base::trans_fn::h5416ef5d9cea730bZxt
  40:     0x7fa175d6b3e0 - trans::monomorphize::monomorphic_fn::he3c4a3a0040e5501Qud
  41:     0x7fa175db0f9e - trans::callee::trans_fn_ref_with_substs::h85a6252d422343b2qng
  42:     0x7fa175daf52e - trans::callee::trans_fn_ref::h7eebc758d7f24cf00bg
  43:     0x7fa175dac97d - trans::callee::trans::h1b831ba8a404e3ach1f
  44:     0x7fa175dc30eb - trans::callee::trans_call_inner::h15453122340747063984
  45:     0x7fa175dcfb40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi
  46:     0x7fa175dcd7c8 - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h
  47:     0x7fa175d81c48 - trans::expr::trans::h4730571ef226d1543vh
  48:     0x7fa175dbeb43 - trans::callee::trans_args::hfa9ae7de71a462d8I3g
  49:     0x7fa175dc3fd0 - trans::callee::trans_call_inner::h15453122340747063984
  50:     0x7fa175dcfb40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi
  51:     0x7fa175dcd7c8 - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h
  52:     0x7fa175d81c48 - trans::expr::trans::h4730571ef226d1543vh
  53:     0x7fa175dbeb43 - trans::callee::trans_args::hfa9ae7de71a462d8I3g
  54:     0x7fa175dc3fd0 - trans::callee::trans_call_inner::h15453122340747063984
  55:     0x7fa175dcfb40 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi
  56:     0x7fa175d804e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph
  57:     0x7fa175e91df7 - trans::_match::mk_binding_alloca::h16286962064436778167
  58:     0x7fa175d7f8ed - trans::base::init_local::he5827bc6a6f1a71eyBs
  59:     0x7fa175d80ff2 - trans::controlflow::trans_block::h4b526e186a057814x7d
  60:     0x7fa175dcf0de - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi
  61:     0x7fa175d804e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph
  62:     0x7fa175e7a280 - trans::_match::trans_match_inner::h5d40a011e6b8915eYKw
  63:     0x7fa175dcf082 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi
  64:     0x7fa175dcd7c8 - trans::expr::trans_unadjusted::ha9dfc6191d78ce67V6h
  65:     0x7fa175d81c48 - trans::expr::trans::h4730571ef226d1543vh
  66:     0x7fa175d7f9c2 - trans::base::init_local::he5827bc6a6f1a71eyBs
  67:     0x7fa175d80ff2 - trans::controlflow::trans_block::h4b526e186a057814x7d
  68:     0x7fa175e583b1 - trans::base::trans_closure::h194b7ad0474e43a46mt
  69:     0x7fa175d69948 - trans::base::trans_fn::h5416ef5d9cea730bZxt
  70:     0x7fa175d6b3e0 - trans::monomorphize::monomorphic_fn::he3c4a3a0040e5501Qud
  71:     0x7fa175db0f9e - trans::callee::trans_fn_ref_with_substs::h85a6252d422343b2qng
  72:     0x7fa175dc8fe5 - trans::meth::trans_method_callee::h175c0aff2b6fe67998x
  73:     0x7fa175dc4a19 - trans::callee::trans_call_inner::h18244630176801372264
  74:     0x7fa175dce8e9 - trans::expr::trans_rvalue_dps_unadjusted::h62a8f691df1cee3cqCi
  75:     0x7fa175d804e6 - trans::expr::trans_into::h3bbb0e210c9fb401Vph
  76:     0x7fa175e91df7 - trans::_match::mk_binding_alloca::h16286962064436778167
  77:     0x7fa175d7f8ed - trans::base::init_local::he5827bc6a6f1a71eyBs
  78:     0x7fa175d80ff2 - trans::controlflow::trans_block::h4b526e186a057814x7d
  79:     0x7fa175e583b1 - trans::base::trans_closure::h194b7ad0474e43a46mt
  80:     0x7fa175d69948 - trans::base::trans_fn::h5416ef5d9cea730bZxt
  81:     0x7fa175d66081 - trans::base::trans_item::h2af153dd6f7fd52bRVt
  82:     0x7fa175d65eb8 - trans::base::trans_item::h2af153dd6f7fd52bRVt
  83:     0x7fa175e6174c - trans::base::trans_crate::h5cb53f6b3e2377862Ru
  84:     0x7fa176d42613 - driver::phase_4_translate_to_llvm::h60575195b9fa298dENa
  85:     0x7fa176d1e05b - driver::compile_input::h9772b425fd1776fdNba
  86:     0x7fa176de2697 - run_compiler::h17c28dbe4dd58e3bV5b
  87:     0x7fa176de02c9 - thunk::F.Invoke<A, R>::invoke::h3041729087284544127
  88:     0x7fa176ddef40 - rt::unwind::try::try_fn::h11775082019993619070
  89:     0x7fa1767a4e38 - rust_try_inner
  90:     0x7fa1767a4e25 - rust_try
  91:     0x7fa176ddf6df - thunk::F.Invoke<A, R>::invoke::h10556879288050829464
  92:     0x7fa17671f9b5 - sys::thread::thread_start::hfe8c2cac3ec4afcdr8E
  93:     0x7fa1705a1373 - start_thread
  94:     0x7fa1762ea27c - __clone
  95:                0x0 - <unknown>

Could not compile `notify`.

Caused by:
  Process didn't exit successfully: `rustc src/lib.rs --crate-name notify --crate-type lib -g -C metadata=9f3e1aada36c2ecc -C extra-filename=-9f3e1aada36c2ecc --out-dir /home/blaenk/code/rust/rsnotify/target --emit=dep-info,link -L dependency=/home/blaenk/code/rust/rsnotify/target -L dependency=/home/blaenk/code/rust/rsnotify/target/deps --extern time=/home/blaenk/code/rust/rsnotify/target/deps/libtime-f5c2f62bb1bdf976.rlib --extern inotify=/home/blaenk/code/rust/rsnotify/target/deps/libinotify-d3ecb034a7f81481.rlib -L native=/home/blaenk/code/rust/rsnotify/target/build/time-f5c2f62bb1bdf976/out` (exit code: 101)
@blaenk
Copy link
Contributor Author

blaenk commented Mar 6, 2015

I actually encountered an ICE within this library when attempting to change this:

fn unwatch(&mut self, path: &Path) -> Result<(), Error> {
  // FIXME:
  // once https://github.com/rust-lang/rust/pull/22351 gets merged,
  // just use a &Path
  match self.watches.remove(&path.to_path_buf()) {
    None => Err(Error::WatchNotFound),

to this:

fn unwatch(&mut self, path: &Path) -> Result<(), Error> {
  // FIXME:
  // once https://github.com/rust-lang/rust/pull/22351 gets merged,
  // just use a &Path
  match self.watches.remove(path) {
    None => Err(Error::WatchNotFound),

This caused an ICE, so I decided not to make that change yet. Updating to the nightly in the first post from rustc 1.0.0-nightly (b4c965ee8 2015-03-02) (built 2015-03-03) yielded this ICE without changing any code though.

@blaenk
Copy link
Contributor Author

blaenk commented Mar 6, 2015

I just tested it and it works with the nightly from 2015-03-04, so it's the most recent nightly 2015-03-05 which I believe causes the problem.

@jdm
Copy link
Contributor

jdm commented Mar 6, 2015

This looks just like #22432, so I'm surprised that the nightly from 3/4 works.

@jdm jdm added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Mar 6, 2015
@blaenk
Copy link
Contributor Author

blaenk commented Mar 6, 2015

Yeah that's weird. It works with this:

rustc 1.0.0-nightly (fed12499e 2015-03-03) (built 2015-03-04)

@mahkoh
Copy link
Contributor

mahkoh commented Mar 7, 2015

One of my crates broke in the latest nightly with this bug when I use cargo build. cargo test has been broken for weeks.

@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Mar 8, 2015
@michaelwoerister
Copy link
Member

This should have been fixed by PR #23074. If you find the time, please confirm with a current nightly.

@mahkoh
Copy link
Contributor

mahkoh commented Mar 12, 2015

Works for me.

@drewcrawford
Copy link
Contributor

PR #23074 resolves for me.

@michaelwoerister
Copy link
Member

Thanks for the feedback. Let's wait some more if the OP has a comment. Otherwise I'll close this tomorrow.

@blaenk
Copy link
Contributor Author

blaenk commented Mar 12, 2015

Yeah I'll give this a try later today.

On Thursday, March 12, 2015, Michael Woerister [email protected]
wrote:

Thanks for the feedback. Let's wait some more if the OP has a comment.
Otherwise I'll close this tomorrow.


Reply to this email directly or view it on GitHub
#23133 (comment).

  • Jorge Israel Peña

@blaenk
Copy link
Contributor Author

blaenk commented Mar 13, 2015

Just confirmed that this is resolved. Thanks!!

@blaenk blaenk closed this as completed Mar 13, 2015
@michaelwoerister
Copy link
Member

Excellent. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

6 participants