Skip to content

Infinite compilation time in _intern_type_list #69790

Closed
@kornelski

Description

@kornelski

I've been compiling my project with rustc 1.41.1 (f3e1a95 2020-02-24, Linux), and it has got stuck. It usually takes a few minutes, but not this time:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
27572 root      20   0 1871656  79956   1664 S 100.0  2.0   2580:27 rustc

Perf sample shows this:

  21.67%  rustc    librustc_driver-dcdfe48010e74f33.so  [.] <smallvec::SmallVec<A> as core::iter::traits::collect::FromIterator<<A as smallvec::Array>::Item>>::from_iter
  13.32%  rustc    librustc_driver-dcdfe48010e74f33.so  [.] rustc::ty::context::TyCtxt::_intern_type_list
  13.09%  rustc    librustc_driver-dcdfe48010e74f33.so  [.] rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable for &rustc::ty::TyS>::super_fold_with
  11.65%  rustc    librustc_driver-dcdfe48010e74f33.so  [.] rustc::ty::fold::TypeFoldable::fold_with
   8.66%  rustc    librustc_driver-dcdfe48010e74f33.so  [.] hashbrown::map::RawEntryBuilderMut<K,V,S>::from_hash
   8.01%  rustc    librustc_driver-dcdfe48010e74f33.so  [.] <rustc::ty::sty::TyKind as core::cmp::PartialEq>::eq
   7.71%  rustc    librustc_driver-dcdfe48010e74f33.so  [.] <smallvec::SmallVec<A> as core::iter::traits::collect::FromIterator<<A as smallvec::Array>::Item>>::from_iter
   4.45%  rustc    librustc_driver-dcdfe48010e74f33.so  [.] rustc::ty::fold::TypeFoldable::fold_with
   3.18%  rustc    rustc                                [.] free
   3.04%  rustc    librustc_driver-dcdfe48010e74f33.so  [.] rustc::ty::fold::TypeFoldable::fold_with

I've kept the process running, so let me know what I can do to provide you more info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcE-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions