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

Build won't complete for binary crate under rustc 1.56. #90180

Closed
jcdyer opened this issue Oct 22, 2021 · 9 comments
Closed

Build won't complete for binary crate under rustc 1.56. #90180

jcdyer opened this issue Oct 22, 2021 · 9 comments
Labels
C-bug Category: This is a bug. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@jcdyer
Copy link
Contributor

jcdyer commented Oct 22, 2021

I've got a (closed source) crate that builds in under two minutes on rustc 1.55, and won't complete (top measured 67 minutes before I killed it) with rustc 1.56.

All the dependencies built fine. I captured the command to build the final binary with cargo build -v, and then ran that command under perf, and got the following output from perf report:

  13.56%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] <rustc_middle::traits::ObligationCauseCode as core::hash::Hash>::hash
   5.17%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] hashbrown::map::RawEntryBuilderMut<K,V,S,A>::from_hash
   4.55%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] rustc_middle::ty::context::TyCtxt::_intern_substs
   3.12%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] hashbrown::map::RawEntryBuilderMut<K,V,S,A>::from_hash
   2.31%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] rustc_trait_selection::traits::project::opt_normalize_projection_type
   1.76%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] hashbrown::map::HashMap<K,V,S,A>::insert
   1.70%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] rustc_trait_selection::traits::select::SelectionContext::impl_or_trait_obligations
   1.67%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] hashbrown::map::HashMap<K,V,S,A>::insert
   1.66%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] rustc_middle::ty::context::CtxtInterners::intern_ty
   1.55%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] hashbrown::raw::RawTable<T,A>::reserve_rehash
   1.49%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] hashbrown::map::HashMap<K,V,S,A>::insert
   1.38%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] rustc_trait_selection::traits::select::SelectionContext::match_impl
   1.31%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] <rustc_middle::ty::sty::TyKind as core::hash::Hash>::hash
   1.15%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] <rustc_infer::infer::freshen::TypeFreshener as rustc_middle::ty::fold::TypeFolder>::fold_ty
   1.03%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] rustc_query_system::cache::Cache<Key,Value>::get
   1.02%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] rustc_trait_selection::traits::project::assoc_ty_def
   0.98%  rustc    librustc_driver-d767902d1c6d74c6.so        [.] rustc_middle::ty::structural_impls::<impl rustc_middle::ty::fold::TypeFoldable for &rustc_middle::ty::TyS>::super_fold_with
   0.95%  rustc    rustc                                      [.] free
   0.87%  rustc    rustc                                      [.] malloc

By contrast, the perf report for 1.55.0 has no lines above 3.1%, most of which are in ld, and the top lines in rustc are

   1.40%  rustc            librustc_driver-2d8919e595cbef4e.so        [.] rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_green_and_read
   0.67%  rustc            librustc_driver-2d8919e595cbef4e.so        [.] rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
   0.51%  rustc            librustc_driver-2d8919e595cbef4e.so        [.] hashbrown::map::RawEntryBuilderMut<K,V,S,A>::from_hash

Code

Not shareable. Some possibly interesting things:

  • We use a build.rs file that generates some simple code (Creates a module with a few static FOO: &[u8] variables that gets include!()ed) and sets a couple environment variables.
  • The problem occurs regardless of whether we use edition = "2018" or edition = "2021".
  • We have two versions of the same dependency loaded in cargo.toml from two separate local paths:
    [dependencies]
    package_old = { package = "package", path = "package_old" }
    package = { path = "package" }
    They are brought in as git submodules. The copies of the crates have different versions in their Cargo.toml files ("0.2.3" and "0.3.0").

Version it worked on

It most recently worked on:1.55.0

Version with regression

rustc --version --verbose:

rustc 1.56.0 (09c42c458 2021-10-18)
binary: rustc
commit-hash: 09c42c45858d5f3aedfa670698275303a3d19afa
commit-date: 2021-10-18
host: x86_64-unknown-linux-gnu
release: 1.56.0
LLVM version: 13.0.0

@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged

@jcdyer jcdyer added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Oct 22, 2021
@rustbot rustbot added regression-from-stable-to-stable Performance or correctness regression from one stable version to another. I-prioritize Issue: Indicates that prioritization has been requested for this issue. regression-untriaged Untriaged performance or correctness regression. and removed regression-untriaged Untriaged performance or correctness regression. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. labels Oct 22, 2021
@jcdyer jcdyer changed the title Build won't complete under rustc 1.56. Build won't complete for binary crate under rustc 1.56. Oct 22, 2021
@rustbot rustbot added regression-from-stable-to-stable Performance or correctness regression from one stable version to another. and removed regression-untriaged Untriaged performance or correctness regression. labels Oct 22, 2021
@jcdyer
Copy link
Contributor Author

jcdyer commented Oct 22, 2021

The Cargo.toml also has two versions of tokio:

[dependencies]
tokio = { version = "0.2", features = ["time", "signal", "fs", "io-util", "macros"] }
tokio_1 = { package = "tokio", version = "1.7", features = ["rt", "rt-multi-thread"] }

@camelid camelid added I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 22, 2021
@camelid
Copy link
Member

camelid commented Oct 22, 2021

@Mark-Simulacrum FYI, I added this to the "Regressions 1.56" project board. Let me know if that's not where it should go.

@jcdyer
Copy link
Contributor Author

jcdyer commented Oct 22, 2021

I tried to bisect a nightly version that reproduces the problem without success. nightly-2021-08-04 and before build successfully, and nightly-2021-08-05 causes a failure in a dependency, due to a #![cfg_attr(nightly, feature(unwind_attributes))]. (unwind_attributes was removed at that point).

@Mark-Simulacrum Mark-Simulacrum added this to the 1.56.0 milestone Oct 23, 2021
@malobre
Copy link
Contributor

malobre commented Oct 23, 2021

I have the same problem, perf report is virtually identical.
My project doesn't use a build.rs file and the Cargo.toml is pretty standard.

Edit:

Perf report
      +   14,38%        [.] <rustc_middle::traits::ObligationCauseCode as core::hash::Hash>::hash       ▒
      +    5,44%        [.] hashbrown::map::RawEntryBuilderMut<K,V,S,A>::from_hash                      ▒
      +    5,40%        [.] rustc_middle::ty::context::TyCtxt::_intern_substs                           ▒
      +    4,53%        [.] hashbrown::map::RawEntryBuilderMut<K,V,S,A>::from_hash                      ▒
      +    2,46%        [.] hashbrown::map::HashMap<K,V,S,A>::insert                                    ▒
      +    1,88%        [.] hashbrown::raw::RawTable<T,A>::reserve_rehash                               ▒
      +    1,87%        [.] rustc_query_system::cache::Cache<Key,Value>::get                            ▒
      +    1,79%        [.] rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for ru▒
      +    1,72%        [.] hashbrown::map::HashMap<K,V,S,A>::insert                                    ▒
      +    1,59%        [.] rustc_trait_selection::traits::select::SelectionContext::impl_or_trait_oblig▒
      +    1,55%        [.] rustc_trait_selection::traits::project::opt_normalize_projection_type       ▒
      +    1,50%        [.] rustc_middle::ty::context::CtxtInterners::intern_ty                         ▒
      +    1,39%        [.] rustc_middle::ty::context::TyCtxt::reuse_or_mk_predicate                    ▒
      +    1,38%        [.] rustc_middle::ty::context::CtxtInterners::intern_predicate                  ▒
      +    1,26%        [.] rustc_trait_selection::traits::select::SelectionContext::match_impl         ▒
      +    1,19%        [.] hashbrown::map::HashMap<K,V,S,A>::insert                                    ▒
`cargo tree`
├── anyhow v1.0.44
├── argon2 v0.3.1
│   ├── base64ct v1.0.1
│   ├── blake2 v0.9.2
│   │   ├── crypto-mac v0.8.0
│   │   │   ├── generic-array v0.14.4
│   │   │   │   └── typenum v1.14.0
│   │   │   │   [build-dependencies]
│   │   │   │   └── version_check v0.9.3
│   │   │   └── subtle v2.4.1
│   │   ├── digest v0.9.0
│   │   │   └── generic-array v0.14.4 (*)
│   │   └── opaque-debug v0.3.0
│   └── password-hash v0.3.2
│       ├── base64ct v1.0.1
│       ├── rand_core v0.6.3
│       │   └── getrandom v0.2.3
│       │       ├── cfg-if v1.0.0
│       │       └── libc v0.2.104
│       └── subtle v2.4.1
├── async-trait v0.1.51 (proc-macro)
│   ├── proc-macro2 v1.0.30
│   │   └── unicode-xid v0.2.2
│   ├── quote v1.0.10
│   │   └── proc-macro2 v1.0.30 (*)
│   └── syn v1.0.80
│       ├── proc-macro2 v1.0.30 (*)
│       ├── quote v1.0.10 (*)
│       └── unicode-xid v0.2.2
├── axum v0.2.8
│   ├── async-trait v0.1.51 (proc-macro) (*)
│   ├── bitflags v1.3.2
│   ├── bytes v1.1.0
│   ├── futures-util v0.3.17
│   │   ├── futures-core v0.3.17
│   │   ├── futures-macro v0.3.17 (proc-macro)
│   │   │   ├── proc-macro-hack v0.5.19 (proc-macro)
│   │   │   ├── proc-macro2 v1.0.30 (*)
│   │   │   ├── quote v1.0.10 (*)
│   │   │   └── syn v1.0.80 (*)
│   │   │   [build-dependencies]
│   │   │   └── autocfg v1.0.1
│   │   ├── futures-sink v0.3.17
│   │   ├── futures-task v0.3.17
│   │   ├── pin-project-lite v0.2.7
│   │   ├── pin-utils v0.1.0
│   │   ├── proc-macro-hack v0.5.19 (proc-macro)
│   │   ├── proc-macro-nested v0.1.7
│   │   └── slab v0.4.5
│   │   [build-dependencies]
│   │   └── autocfg v1.0.1
│   ├── http v0.2.5
│   │   ├── bytes v1.1.0
│   │   ├── fnv v1.0.7
│   │   └── itoa v0.4.8
│   ├── http-body v0.4.4
│   │   ├── bytes v1.1.0
│   │   ├── http v0.2.5 (*)
│   │   └── pin-project-lite v0.2.7
│   ├── hyper v0.14.14
│   │   ├── bytes v1.1.0
│   │   ├── futures-channel v0.3.17
│   │   │   ├── futures-core v0.3.17
│   │   │   └── futures-sink v0.3.17
│   │   ├── futures-core v0.3.17
│   │   ├── futures-util v0.3.17 (*)
│   │   ├── h2 v0.3.7
│   │   │   ├── bytes v1.1.0
│   │   │   ├── fnv v1.0.7
│   │   │   ├── futures-core v0.3.17
│   │   │   ├── futures-sink v0.3.17
│   │   │   ├── futures-util v0.3.17 (*)
│   │   │   ├── http v0.2.5 (*)
│   │   │   ├── indexmap v1.7.0
│   │   │   │   └── hashbrown v0.11.2
│   │   │   │       └── ahash v0.7.6
│   │   │   │           ├── getrandom v0.2.3 (*)
│   │   │   │           └── once_cell v1.8.0
│   │   │   │           [build-dependencies]
│   │   │   │           └── version_check v0.9.3
│   │   │   │   [build-dependencies]
│   │   │   │   └── autocfg v1.0.1
│   │   │   ├── slab v0.4.5
│   │   │   ├── tokio v1.12.0
│   │   │   │   ├── bytes v1.1.0
│   │   │   │   ├── libc v0.2.104
│   │   │   │   ├── memchr v2.4.1
│   │   │   │   ├── mio v0.7.14
│   │   │   │   │   ├── libc v0.2.104
│   │   │   │   │   └── log v0.4.14
│   │   │   │   │       └── cfg-if v1.0.0
│   │   │   │   ├── num_cpus v1.13.0
│   │   │   │   │   └── libc v0.2.104
│   │   │   │   ├── once_cell v1.8.0
│   │   │   │   ├── pin-project-lite v0.2.7
│   │   │   │   ├── signal-hook-registry v1.4.0
│   │   │   │   │   └── libc v0.2.104
│   │   │   │   └── tokio-macros v1.5.0 (proc-macro)
│   │   │   │       ├── proc-macro2 v1.0.30 (*)
│   │   │   │       ├── quote v1.0.10 (*)
│   │   │   │       └── syn v1.0.80 (*)
│   │   │   │   [build-dependencies]
│   │   │   │   └── autocfg v1.0.1
│   │   │   ├── tokio-util v0.6.8
│   │   │   │   ├── bytes v1.1.0
│   │   │   │   ├── futures-core v0.3.17
│   │   │   │   ├── futures-sink v0.3.17
│   │   │   │   ├── log v0.4.14 (*)
│   │   │   │   ├── pin-project-lite v0.2.7
│   │   │   │   └── tokio v1.12.0 (*)
│   │   │   └── tracing v0.1.29
│   │   │       ├── cfg-if v1.0.0
│   │   │       ├── log v0.4.14 (*)
│   │   │       ├── pin-project-lite v0.2.7
│   │   │       ├── tracing-attributes v0.1.18 (proc-macro)
│   │   │       │   ├── proc-macro2 v1.0.30 (*)
│   │   │       │   ├── quote v1.0.10 (*)
│   │   │       │   └── syn v1.0.80 (*)
│   │   │       └── tracing-core v0.1.21
│   │   │           └── lazy_static v1.4.0
│   │   ├── http v0.2.5 (*)
│   │   ├── http-body v0.4.4 (*)
│   │   ├── httparse v1.5.1
│   │   ├── httpdate v1.0.1
│   │   ├── itoa v0.4.8
│   │   ├── pin-project-lite v0.2.7
│   │   ├── socket2 v0.4.2
│   │   │   └── libc v0.2.104
│   │   ├── tokio v1.12.0 (*)
│   │   ├── tower-service v0.3.1
│   │   ├── tracing v0.1.29 (*)
│   │   └── want v0.3.0
│   │       ├── log v0.4.14 (*)
│   │       └── try-lock v0.2.3
│   ├── pin-project-lite v0.2.7
│   ├── regex v1.5.4
│   │   ├── aho-corasick v0.7.18
│   │   │   └── memchr v2.4.1
│   │   ├── memchr v2.4.1
│   │   └── regex-syntax v0.6.25
│   ├── serde v1.0.130
│   │   └── serde_derive v1.0.130 (proc-macro)
│   │       ├── proc-macro2 v1.0.30 (*)
│   │       ├── quote v1.0.10 (*)
│   │       └── syn v1.0.80 (*)
│   ├── serde_json v1.0.68
│   │   ├── itoa v0.4.8
│   │   ├── ryu v1.0.5
│   │   └── serde v1.0.130 (*)
│   ├── serde_urlencoded v0.7.0
│   │   ├── form_urlencoded v1.0.1
│   │   │   ├── matches v0.1.9
│   │   │   └── percent-encoding v2.1.0
│   │   ├── itoa v0.4.8
│   │   ├── ryu v1.0.5
│   │   └── serde v1.0.130 (*)
│   ├── sync_wrapper v0.1.1
│   ├── tokio v1.12.0 (*)
│   ├── tokio-util v0.6.8 (*)
│   ├── tower v0.4.10
│   │   ├── futures-core v0.3.17
│   │   ├── futures-util v0.3.17 (*)
│   │   ├── pin-project v1.0.8
│   │   │   └── pin-project-internal v1.0.8 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.30 (*)
│   │   │       ├── quote v1.0.10 (*)
│   │   │       └── syn v1.0.80 (*)
│   │   ├── pin-project-lite v0.2.7
│   │   ├── tokio v1.12.0 (*)
│   │   ├── tokio-util v0.6.8 (*)
│   │   ├── tower-layer v0.3.1
│   │   ├── tower-service v0.3.1
│   │   └── tracing v0.1.29 (*)
│   ├── tower-http v0.1.1
│   │   ├── bytes v1.1.0
│   │   ├── futures-core v0.3.17
│   │   ├── futures-util v0.3.17 (*)
│   │   ├── http v0.2.5 (*)
│   │   ├── http-body v0.4.4 (*)
│   │   ├── pin-project v1.0.8 (*)
│   │   ├── tower-layer v0.3.1
│   │   ├── tower-service v0.3.1
│   │   └── tracing v0.1.29 (*)
│   ├── tower-layer v0.3.1
│   └── tower-service v0.3.1
├── base64 v0.13.0
├── blake3 v1.1.0
│   ├── arrayref v0.3.6
│   ├── arrayvec v0.7.1
│   ├── cfg-if v1.0.0
│   ├── constant_time_eq v0.1.5
│   └── digest v0.9.0 (*)
│   [build-dependencies]
│   └── cc v1.0.71
├── chrono v0.4.19
│   ├── libc v0.2.104
│   ├── num-integer v0.1.44
│   │   └── num-traits v0.2.14
│   │       [build-dependencies]
│   │       └── autocfg v1.0.1
│   │   [build-dependencies]
│   │   └── autocfg v1.0.1
│   ├── num-traits v0.2.14 (*)
│   ├── serde v1.0.130 (*)
│   └── time v0.1.43
│       └── libc v0.2.104
├── compact_str v0.1.1
│   ├── serde v1.0.130 (*)
│   └── static_assertions v1.1.0
├── futures-util v0.3.17 (*)
├── http v0.2.5 (*)
├── rand_core v0.6.3 (*)
├── reqwest v0.11.6
│   ├── base64 v0.13.0
│   ├── bytes v1.1.0
│   ├── encoding_rs v0.8.29
│   │   └── cfg-if v1.0.0
│   ├── futures-core v0.3.17
│   ├── futures-util v0.3.17 (*)
│   ├── http v0.2.5 (*)
│   ├── http-body v0.4.4 (*)
│   ├── hyper v0.14.14 (*)
│   ├── hyper-rustls v0.22.1
│   │   ├── futures-util v0.3.17 (*)
│   │   ├── hyper v0.14.14 (*)
│   │   ├── log v0.4.14 (*)
│   │   ├── rustls v0.19.1
│   │   │   ├── base64 v0.13.0
│   │   │   ├── log v0.4.14 (*)
│   │   │   ├── ring v0.16.20
│   │   │   │   ├── libc v0.2.104
│   │   │   │   ├── once_cell v1.8.0
│   │   │   │   ├── spin v0.5.2
│   │   │   │   └── untrusted v0.7.1
│   │   │   │   [build-dependencies]
│   │   │   │   └── cc v1.0.71
│   │   │   ├── sct v0.6.1
│   │   │   │   ├── ring v0.16.20 (*)
│   │   │   │   └── untrusted v0.7.1
│   │   │   └── webpki v0.21.4
│   │   │       ├── ring v0.16.20 (*)
│   │   │       └── untrusted v0.7.1
│   │   ├── tokio v1.12.0 (*)
│   │   ├── tokio-rustls v0.22.0
│   │   │   ├── rustls v0.19.1 (*)
│   │   │   ├── tokio v1.12.0 (*)
│   │   │   └── webpki v0.21.4 (*)
│   │   └── webpki v0.21.4 (*)
│   ├── ipnet v2.3.1
│   ├── lazy_static v1.4.0
│   ├── log v0.4.14 (*)
│   ├── mime v0.3.16
│   ├── percent-encoding v2.1.0
│   ├── pin-project-lite v0.2.7
│   ├── rustls v0.19.1 (*)
│   ├── serde v1.0.130 (*)
│   ├── serde_json v1.0.68 (*)
│   ├── serde_urlencoded v0.7.0 (*)
│   ├── tokio v1.12.0 (*)
│   ├── tokio-rustls v0.22.0 (*)
│   ├── url v2.2.2
│   │   ├── form_urlencoded v1.0.1 (*)
│   │   ├── idna v0.2.3
│   │   │   ├── matches v0.1.9
│   │   │   ├── unicode-bidi v0.3.7
│   │   │   └── unicode-normalization v0.1.19
│   │   │       └── tinyvec v1.5.0
│   │   │           └── tinyvec_macros v0.1.0
│   │   ├── matches v0.1.9
│   │   └── percent-encoding v2.1.0
│   └── webpki-roots v0.21.1
│       └── webpki v0.21.4 (*)
├── rusty-s3 v0.1.2
│   ├── hex v0.4.3
│   ├── hmac v0.10.1
│   │   ├── crypto-mac v0.10.1
│   │   │   ├── generic-array v0.14.4 (*)
│   │   │   └── subtle v2.4.1
│   │   └── digest v0.9.0 (*)
│   ├── percent-encoding v2.1.0
│   ├── quick-xml v0.22.0
│   │   ├── memchr v2.4.1
│   │   └── serde v1.0.130 (*)
│   ├── serde v1.0.130 (*)
│   ├── serde_json v1.0.68 (*)
│   ├── sha2 v0.9.8
│   │   ├── block-buffer v0.9.0
│   │   │   └── generic-array v0.14.4 (*)
│   │   ├── cfg-if v1.0.0
│   │   ├── cpufeatures v0.2.1
│   │   ├── digest v0.9.0 (*)
│   │   └── opaque-debug v0.3.0
│   ├── time v0.2.27
│   │   ├── const_fn v0.4.8 (proc-macro)
│   │   ├── libc v0.2.104
│   │   ├── standback v0.2.17
│   │   │   [build-dependencies]
│   │   │   └── version_check v0.9.3
│   │   └── time-macros v0.1.1
│   │       ├── proc-macro-hack v0.5.19 (proc-macro)
│   │       └── time-macros-impl v0.1.2 (proc-macro)
│   │           ├── proc-macro-hack v0.5.19 (proc-macro)
│   │           ├── proc-macro2 v1.0.30 (*)
│   │           ├── quote v1.0.10 (*)
│   │           ├── standback v0.2.17
│   │           │   [build-dependencies]
│   │           │   └── version_check v0.9.3
│   │           └── syn v1.0.80 (*)
│   │   [build-dependencies]
│   │   └── version_check v0.9.3
│   └── url v2.2.2 (*)
├── secrecy v0.8.0
│   └── zeroize v1.4.2
├── serde v1.0.130 (*)
├── serde_json v1.0.68 (*)
├── sqlx v0.5.9
│   ├── sqlx-core v0.5.9
│   │   ├── ahash v0.7.6 (*)
│   │   ├── atoi v0.4.0
│   │   │   └── num-traits v0.2.14 (*)
│   │   ├── base64 v0.13.0
│   │   ├── bitflags v1.3.2
│   │   ├── byteorder v1.4.3
│   │   ├── bytes v1.1.0
│   │   ├── chrono v0.4.19 (*)
│   │   ├── crc v2.0.0
│   │   │   └── crc-catalog v1.1.1
│   │   ├── crossbeam-channel v0.5.1
│   │   │   ├── cfg-if v1.0.0
│   │   │   └── crossbeam-utils v0.8.5
│   │   │       ├── cfg-if v1.0.0
│   │   │       └── lazy_static v1.4.0
│   │   ├── crossbeam-queue v0.3.2
│   │   │   ├── cfg-if v1.0.0
│   │   │   └── crossbeam-utils v0.8.5 (*)
│   │   ├── crossbeam-utils v0.8.5 (*)
│   │   ├── dirs v3.0.2
│   │   │   └── dirs-sys v0.3.6
│   │   │       └── libc v0.2.104
│   │   ├── either v1.6.1
│   │   ├── futures-channel v0.3.17 (*)
│   │   ├── futures-core v0.3.17
│   │   ├── futures-intrusive v0.4.0
│   │   │   ├── futures-core v0.3.17
│   │   │   ├── lock_api v0.4.5
│   │   │   │   └── scopeguard v1.1.0
│   │   │   └── parking_lot v0.11.2
│   │   │       ├── instant v0.1.12
│   │   │       │   └── cfg-if v1.0.0
│   │   │       ├── lock_api v0.4.5 (*)
│   │   │       └── parking_lot_core v0.8.5
│   │   │           ├── cfg-if v1.0.0
│   │   │           ├── instant v0.1.12 (*)
│   │   │           ├── libc v0.2.104
│   │   │           └── smallvec v1.7.0
│   │   ├── futures-util v0.3.17 (*)
│   │   ├── hashlink v0.7.0
│   │   │   └── hashbrown v0.11.2 (*)
│   │   ├── hex v0.4.3
│   │   ├── hmac v0.11.0
│   │   │   ├── crypto-mac v0.11.1
│   │   │   │   ├── generic-array v0.14.4 (*)
│   │   │   │   └── subtle v2.4.1
│   │   │   └── digest v0.9.0 (*)
│   │   ├── indexmap v1.7.0 (*)
│   │   ├── itoa v0.4.8
│   │   ├── libc v0.2.104
│   │   ├── log v0.4.14 (*)
│   │   ├── md-5 v0.9.1
│   │   │   ├── block-buffer v0.9.0 (*)
│   │   │   ├── digest v0.9.0 (*)
│   │   │   └── opaque-debug v0.3.0
│   │   ├── memchr v2.4.1
│   │   ├── once_cell v1.8.0
│   │   ├── parking_lot v0.11.2 (*)
│   │   ├── percent-encoding v2.1.0
│   │   ├── rand v0.8.4
│   │   │   ├── libc v0.2.104
│   │   │   ├── rand_chacha v0.3.1
│   │   │   │   ├── ppv-lite86 v0.2.14
│   │   │   │   └── rand_core v0.6.3 (*)
│   │   │   └── rand_core v0.6.3 (*)
│   │   ├── rustls v0.19.1 (*)
│   │   ├── serde v1.0.130 (*)
│   │   ├── serde_json v1.0.68 (*)
│   │   ├── sha-1 v0.9.8
│   │   │   ├── block-buffer v0.9.0 (*)
│   │   │   ├── cfg-if v1.0.0
│   │   │   ├── cpufeatures v0.2.1
│   │   │   ├── digest v0.9.0 (*)
│   │   │   └── opaque-debug v0.3.0
│   │   ├── sha2 v0.9.8 (*)
│   │   ├── smallvec v1.7.0
│   │   ├── sqlformat v0.1.8
│   │   │   ├── itertools v0.10.1
│   │   │   │   └── either v1.6.1
│   │   │   ├── nom v7.0.0
│   │   │   │   ├── memchr v2.4.1
│   │   │   │   └── minimal-lexical v0.1.4
│   │   │   │   [build-dependencies]
│   │   │   │   └── version_check v0.9.3
│   │   │   └── unicode_categories v0.1.1
│   │   ├── sqlx-rt v0.5.9
│   │   │   ├── once_cell v1.8.0
│   │   │   ├── tokio v1.12.0 (*)
│   │   │   └── tokio-rustls v0.22.0 (*)
│   │   ├── stringprep v0.1.2
│   │   │   ├── unicode-bidi v0.3.7
│   │   │   └── unicode-normalization v0.1.19 (*)
│   │   ├── thiserror v1.0.30
│   │   │   └── thiserror-impl v1.0.30 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.30 (*)
│   │   │       ├── quote v1.0.10 (*)
│   │   │       └── syn v1.0.80 (*)
│   │   ├── tokio-stream v0.1.7
│   │   │   ├── futures-core v0.3.17
│   │   │   ├── pin-project-lite v0.2.7
│   │   │   └── tokio v1.12.0 (*)
│   │   ├── url v2.2.2 (*)
│   │   ├── uuid v0.8.2
│   │   │   └── serde v1.0.130 (*)
│   │   ├── webpki v0.21.4 (*)
│   │   ├── webpki-roots v0.21.1 (*)
│   │   └── whoami v1.1.5
│   └── sqlx-macros v0.5.9 (proc-macro)
│       ├── dotenv v0.15.0
│       ├── either v1.6.1
│       ├── heck v0.3.3
│       │   └── unicode-segmentation v1.8.0
│       ├── once_cell v1.8.0
│       ├── proc-macro2 v1.0.30 (*)
│       ├── quote v1.0.10 (*)
│       ├── sha2 v0.9.8 (*)
│       ├── sqlx-core v0.5.9 (*)
│       ├── sqlx-rt v0.5.9 (*)
│       ├── syn v1.0.80 (*)
│       └── url v2.2.2 (*)
├── thiserror v1.0.30 (*)
├── tokio v1.12.0 (*)
├── tower-http v0.1.1 (*)
├── tracing v0.1.29 (*)
├── tracing-subscriber v0.2.25
│   ├── ansi_term v0.12.1
│   ├── serde v1.0.130 (*)
│   ├── serde_json v1.0.68 (*)
│   ├── sharded-slab v0.1.4
│   │   └── lazy_static v1.4.0
│   ├── thread_local v1.1.3
│   │   └── once_cell v1.8.0
│   ├── tracing-core v0.1.21 (*)
│   └── tracing-serde v0.1.2
│       ├── serde v1.0.130 (*)
│       └── tracing-core v0.1.21 (*)
└── uuid v0.8.2 (*)

Edit 2: In my case it is related to axum:

@ehuss
Copy link
Contributor

ehuss commented Oct 23, 2021

@jcdyer To further bisect, I suggest making a local copy of the offending package (if it isn't already local) and modifying it so that it can work without unwind_attributes (presumably it has a build.rs that is detecting if it is on nightly, I would just modify it so that it doesn't do that). Then add your local copy with a [patch.crates-io] in Cargo.toml.

@Madoshakalaka
Copy link

I just had the same issue, my project builds in 5 minutes with 1.55 but hangs at the last step using 1.56

@apiraino
Copy link
Contributor

Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.

@rustbot label -I-prioritize +P-high

@rustbot rustbot added P-high High priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Oct 28, 2021
@jcdyer
Copy link
Contributor Author

jcdyer commented Jan 19, 2022

I patched out wasmer-runtime-core (Which had the cfg_attr declarations), and started playing around with nightlies. My project now builds in a reasonable amount of time now on all nightlies since 2021-12-21. The git log between the last bad nightly and the first good one shows the following commits:

~/src/rust$ git log --oneline e95e084a1..23f69235a
23f69235ad2 Auto merge of #92108 - r00ster91:patch-6, r=jyn514
84f962a89ba Auto merge of #91924 - Aaron1011:serialize-adt-def, r=michaelwoerister
60f3bd78eea Auto merge of #92041 - Aaron1011:remove-speculative-evaluation, r=jackh726
940a97a9102 Auto merge of #91900 - pitaj:fix-91714, r=jyn514
ed7a2068432 Auto merge of #91844 - nnethercote:rm-ObligationCauseData-2, r=Mark-Simulacrum
f09b1facd04 Eliminate `ObligationCauseData`.
8fb9a8570ba paniced -> panicked
eee09ec4263 Remove 'speculative evaluation' of predicates
00ce6dc7187 Only cache local adt_def results on disk
02b94b7922d rustdoc: remove `--passes` and `--no-defaults`
70fba904121 Cache adt_def query result on disk
f5f90540c9c Fully serialize AdtDef

It also builds fine on beta, so 1.59 should resolve this issue. Unless @Madoshakalaka or @malobre report that they're still seeing issues, I'd say this can be closed.

@jcdyer
Copy link
Contributor Author

jcdyer commented Apr 26, 2022

Works in 1.59 and up.

@jcdyer jcdyer closed this as completed Apr 26, 2022
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-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. 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

8 participants