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

Compilation ICE on nphysics crate #33096

Open
trolleyman opened this Issue Apr 19, 2016 · 18 comments

Comments

Projects
None yet
7 participants
@trolleyman
Copy link

trolleyman commented Apr 19, 2016

When trying to compile nphysics on a nightly created on or after 2016-04-14, the compiler errors. Before this date it is fine.

Example code:

git clone https://github.com/sebcrozet/nphysics
rustup update nightly-2016-04-13 && rustup run nightly-2016-04-13 cargo build # Works fine
rustup update nightly-2016-04-14 && rustup run nightly-2016-04-13 cargo build # Errors

Presumably was this commit that broke things, as it's a commit on that day that touches trans.

On Windows 64 bit GNU this is the output:

   Compiling nphysics3d v0.2.2 (https://github.com/sebcrozet/nphysics.git#b379109f)
error: internal compiler error: ../src/librustc_trans\debuginfo\type_names.rs:155: debuginfo: Trying to create type name for unexpected type: <na::Pnt3<f32> as nc::ncollide_math::Point>::Vect
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>', ../src/libsyntax\errors/mod.rs:575

@trolleyman trolleyman changed the title ICE regression Compilation ICE on nphysics Apr 19, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Apr 19, 2016

cc @eddyb

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Apr 19, 2016

You sure it's that innocent commit and not, you know, my changes to debuginfo, for MIR?
Specifically, this normalization is gone, that could cause problems.

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Apr 19, 2016

@trolleyman I can't reproduce on master (just rebased one of my branches containing unrelated changes, so I had a compiler to check with).

EDIT: Still no reproduction, even after git checkout b379109f.

@trolleyman

This comment has been minimized.

Copy link
Author

trolleyman commented Apr 19, 2016

Ok so I was misinterpreting which crate was being compiled. nphysics compiles fine, but my crate, which uses nphysics, doesn't. I'm trying to narrow down the code now.

@trolleyman

This comment has been minimized.

Copy link
Author

trolleyman commented Apr 19, 2016

Here's some of the rust log that I got when compiling on debug builds:

INFO:rustc_trans::common: Cache hit: Binder(<nc::shape::Plane<na::Vec3<f32>> as nc::ray::RayCast<na::Pnt3<f32>, na::Iso3<f32>>>)
INFO:rustc::middle::region: CodeExtent(118736) = CallSiteScope { fn_id: 5171551, body_id: 5171571 } [parent=0]
INFO:rustc::middle::region: CodeExtent(118737) = ParameterScope { fn_id: 5171551, body_id: 5171571 } [parent=118736]
INFO:rustc::middle::region: CodeExtent(118738) = Misc(5171554) [parent=0]
INFO:rustc::middle::region: CodeExtent(118739) = Misc(5171557) [parent=0]
INFO:rustc::middle::region: CodeExtent(118740) = Misc(5171561) [parent=0]
INFO:rustc::middle::region: CodeExtent(118741) = Misc(5171566) [parent=0]
INFO:rustc::middle::region: CodeExtent(118742) = DestructionScope(5171571) [parent=118737]
INFO:rustc::middle::region: CodeExtent(118743) = Misc(5171571) [parent=118742]
INFO:rustc::middle::region: CodeExtent(118744) = Misc(5171572) [parent=118743]
INFO:rustc::middle::region: CodeExtent(118745) = Misc(5171573) [parent=118744]
INFO:rustc::middle::region: CodeExtent(118746) = Misc(5171574) [parent=118745]
INFO:rustc::middle::region: CodeExtent(118747) = Misc(5171575) [parent=118745]
INFO:rustc::middle::region: CodeExtent(118748) = Misc(5171576) [parent=118745]
INFO:rustc::middle::region: CodeExtent(118749) = Misc(5171577) [parent=118745]
INFO:rustc::middle::region: CodeExtent(118750) = Misc(5171578) [parent=118744]
INFO:rustc::middle::region: CodeExtent(118751) = CallSiteScope { fn_id: 5171578, body_id: 5171582 } [parent=118750]
INFO:rustc::middle::region: CodeExtent(118752) = ParameterScope { fn_id: 5171578, body_id: 5171582 } [parent=118751]
INFO:rustc::middle::region: CodeExtent(118753) = Misc(5171580) [parent=0]
INFO:rustc::middle::region: CodeExtent(118754) = DestructionScope(5171582) [parent=118752]
INFO:rustc::middle::region: CodeExtent(118755) = Misc(5171582) [parent=118754]
INFO:rustc::middle::region: CodeExtent(118756) = Misc(5171583) [parent=118755]
INFO:rustc::middle::region: CodeExtent(118757) = Misc(5171584) [parent=118756]
INFO:rustc::middle::region: CodeExtent(118758) = DestructionScope(5171551) [parent=0]
INFO:rustc::middle::region: CodeExtent(118759) = CallSiteScope { fn_id: 11887, body_id: 11907 } [parent=1]
INFO:rustc::middle::region: CodeExtent(118759) = CallSiteScope { fn_id: 11887, body_id: 11907 } [parent=1] BOGUS!
INFO:rustc::middle::region: CodeExtent(118759) = CallSiteScope { fn_id: 11887, body_id: 11907 } [parent=1] BOGUS!
INFO:rustc::middle::region: CodeExtent(118759) = CallSiteScope { fn_id: 11887, body_id: 11907 } [parent=1] BOGUS!
INFO:rustc::middle::region: CodeExtent(118759) = CallSiteScope { fn_id: 11887, body_id: 11907 } [parent=1] BOGUS!
INFO:rustc::middle::region: CodeExtent(118759) = CallSiteScope { fn_id: 11887, body_id: 11907 } [parent=1] BOGUS!
INFO:rustc::middle::region: CodeExtent(11868) = Misc(11909) [parent=1] BOGUS!
INFO:rustc::middle::region: CodeExtent(11868) = Misc(11909) [parent=1] BOGUS!
INFO:rustc::middle::region: CodeExtent(11868) = Misc(11909) [parent=1] BOGUS!
INFO:rustc::middle::region: CodeExtent(11868) = Misc(11909) [parent=1] BOGUS!
INFO:rustc::middle::region: CodeExtent(11868) = Misc(11909) [parent=1] BOGUS!
INFO:rustc::middle::region: CodeExtent(11868) = Misc(11909) [parent=1] BOGUS!
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as std::marker::Sized>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as nc::ncollide_math::Scalar>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as std::marker::Sized>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as nc::ncollide_math::Scalar>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as std::marker::Sized>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as nc::ncollide_math::Scalar>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as std::marker::Sized>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as nc::ncollide_math::Scalar>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as std::marker::Sized>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as nc::ncollide_math::Scalar>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as std::marker::Sized>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as nc::ncollide_math::Scalar>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as std::marker::Sized>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as nc::ncollide_math::Scalar>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as std::marker::Sized>))`
INFO:rustc::traits::fulfill: check_duplicate_trait hit: `Binder(TraitPredicate(<f32 as nc::ncollide_math::Scalar>))`
error: internal compiler error: ../src/librustc_trans\debuginfo\type_names.rs:155: debuginfo: Trying to create type name for unexpected type: <na::Pnt3<f32> as nc::ncollide_math::Point>::Vect
@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Apr 19, 2016

@trolleyman That's not really helpful, sadly, nightly doesn't use -C debug-assertions yet, so there's no debug! output.

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Apr 19, 2016

@trolleyman This bug is not in beta, correct?

@trolleyman

This comment has been minimized.

Copy link
Author

trolleyman commented Apr 20, 2016

@eddyb I'm afraid that I can't test that as I'm using #[feature]s.

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Apr 20, 2016

@trolleyman Can you check the test from #33099 instead? Particularly interested about the nightlies you had issues with.

@trolleyman

This comment has been minimized.

Copy link
Author

trolleyman commented Apr 20, 2016

@eddyb Sure, unfortunately that test case works fine for both pre and post-2016-04-14.

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Apr 20, 2016

@trolleyman Ah, beats me then.

@eddyb eddyb added the E-needstest label Apr 20, 2016

@trolleyman

This comment has been minimized.

Copy link
Author

trolleyman commented Apr 20, 2016

@eddyb I'll try and find which part of my code hits the error.

@nagisa nagisa changed the title Compilation ICE on nphysics Compilation ICE on neat crate Apr 20, 2016

@trolleyman

This comment has been minimized.

Copy link
Author

trolleyman commented Apr 20, 2016

@eddyb So I did some digging and I was wrong again, it turns out it is the nphysics crate. This is a minimal test case:

extern crate nphysics3d;

pub fn main() {
    nphysics3d::world::World::new().step(1.0);
}

@trolleyman trolleyman changed the title Compilation ICE on neat crate Compilation ICE on nphysics crate Apr 20, 2016

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Apr 20, 2016

@trolleyman It depends on the nphysics3d crate, but it's not the crate itself, and that testcase is still large in terms of how much it needs to monomorphize.

@trolleyman

This comment has been minimized.

Copy link
Author

trolleyman commented Apr 20, 2016

@eddyb True, sorry but I am not knowledgeable at all in rustc or nphysics, so it's the best I can do :/

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Apr 21, 2016

triage: P-high

@rust-highfive rust-highfive added P-high and removed I-nominated labels Apr 21, 2016

bors added a commit that referenced this issue Apr 22, 2016

Auto merge of #33099 - eddyb:issue-33096, r=michaelwoerister
Normalize types before using them in debuginfo.

Small oversight, fixes #33096 - odd thing is that the old code doesn't look like it should've ever worked, although it wasn't using all of the type parameters, so maybe that's what changed.

bors added a commit that referenced this issue Apr 22, 2016

Auto merge of #33099 - eddyb:issue-33096, r=michaelwoerister
Normalize types before using them in debuginfo.

Small oversight, fixes #33096 - odd thing is that the old code doesn't look like it should've ever worked, although it wasn't using all of the type parameters, so maybe that's what changed.

bors added a commit that referenced this issue Apr 23, 2016

Auto merge of #33099 - eddyb:issue-33096, r=michaelwoerister
Normalize types before using them in debuginfo.

Small oversight, fixes #33096 - odd thing is that the old code doesn't look like it should've ever worked, although it wasn't using all of the type parameters, so maybe that's what changed.

bors added a commit that referenced this issue Apr 25, 2016

Auto merge of #33099 - eddyb:issue-33096, r=michaelwoerister
Normalize types before using them in debuginfo.

Small oversight, fixes #33096 - odd thing is that the old code doesn't look like it should've ever worked, although it wasn't using all of the type parameters, so maybe that's what changed.

bors added a commit that referenced this issue Apr 26, 2016

Auto merge of #33099 - eddyb:issue-33096, r=michaelwoerister
Normalize types before using them in debuginfo.

Small oversight, fixes #33096 - odd thing is that the old code doesn't look like it should've ever worked, although it wasn't using all of the type parameters, so maybe that's what changed.

bors added a commit that referenced this issue Apr 26, 2016

Auto merge of #33099 - eddyb:issue-33096, r=michaelwoerister
Normalize types before using them in debuginfo.

Small oversight, fixes #33096 - odd thing is that the old code doesn't look like it should've ever worked, although it wasn't using all of the type parameters, so maybe that's what changed.

bors added a commit that referenced this issue Apr 26, 2016

Auto merge of #33099 - eddyb:issue-33096, r=michaelwoerister
Normalize types before using them in debuginfo.

Small oversight, fixes #33096 - odd thing is that the old code doesn't look like it should've ever worked, although it wasn't using all of the type parameters, so maybe that's what changed.

@bors bors closed this in #33099 Apr 26, 2016

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Apr 26, 2016

Still need a good regression test.

@eddyb eddyb reopened this Apr 26, 2016

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented May 5, 2016

triage: P-low

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.