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

rustc hangs in rustc_trans::collector::collect_items_rec (or it's callees) #37779

Closed
TimNN opened this issue Nov 15, 2016 · 4 comments
Closed
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-compiletime Issue: Problems and improvements with respect to compile times. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@TimNN
Copy link
Contributor

TimNN commented Nov 15, 2016

As reported on reddit: https://www.reddit.com/r/rust/comments/5d1dzx/rustc_1130_and_nightly_infinite_loops_while/

Backtrace: https://gist.github.com/TimNN/6070f0da6e697a93ef13ab74d316524a

To reproduce, clone clap-rs from https://github.com/TimNN/clap-rs.git and check out the hang branch, which has the patch from the reddit thread applied.

@TimNN TimNN changed the title rustc hangs in rustc_trans::collector::collect_items_rec rustc hangs rustc_trans::collector::collect_items_rec (or it's children) Nov 15, 2016
@TimNN TimNN changed the title rustc hangs rustc_trans::collector::collect_items_rec (or it's children) rustc hangs rustc_trans::collector::collect_items_rec (or it's callees) Nov 15, 2016
@TimNN TimNN changed the title rustc hangs rustc_trans::collector::collect_items_rec (or it's callees) rustc hangs in rustc_trans::collector::collect_items_rec (or it's callees) Nov 15, 2016
@arielb1
Copy link
Contributor

arielb1 commented Nov 15, 2016

Looks like a duplicate of #37311.

@arielb1
Copy link
Contributor

arielb1 commented Nov 15, 2016

It's not, but rather an exponential case in trait selection for cases like

INFO:rustc_trans::common: Cache miss: Binder(<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<&mut std::env::ArgsOs>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:633:42: 633:54]> as std::iter::IntoIterator>) => VtableImpl(impl_def_id=DefId { krate: CrateNum(2), node: DefIndex(4170) => core/75fe2fdafd75f237ff013f4ea8c6fac39cd701ee2ed7455130a3f74d5902d10c::iter[0]::traits[0]::{{impl}}[0] }, substs=Slice([std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<std::iter::Map<&mut std::iter::Peekable<&mut std::env::ArgsOs>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:721:32: 721:64]>>, [closure@src/app/parser.rs:633:42: 633:54]>]), nested=[(), ()])

@michaelwoerister
Copy link
Member

Thanks for copying the bug report over from reddit, @TimNN!

@Mark-Simulacrum Mark-Simulacrum added I-hang T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. I-compiletime Issue: Problems and improvements with respect to compile times. and removed I-hang labels Jun 23, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 26, 2017
@ishitatsuyuki
Copy link
Contributor

Should be fixed in #48296.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-compiletime Issue: Problems and improvements with respect to compile times. 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

5 participants