Skip to content

Regression in time to compilation failure #37571

Closed

Description

@jrobsonchase

There seems to have been a regression a couple of weeks ago in the time it takes rustc to exit after reporting an error. Using the nightly from 2016-10-21, build failures exit in under half a second, but on the nightlies after that (starting on 2016-10-25), they hang for ~20 seconds.

jchase@tethys test_regression $ rustup default nightly-2016-10-21 && time rustc src/lib.rs; echo -e '\n\n'; rustup default nightly && time rustc src/lib.rs
info: using existing install for 'nightly-2016-10-21-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-2016-10-21-x86_64-unknown-linux-gnu'

  nightly-2016-10-21-x86_64-unknown-linux-gnu unchanged - rustc 1.14.0-nightly (f09420685 2016-10-20)

error: expected one of `!` or `::`, found `#`
 --> src/lib.rs:2:1
  |
2 | #[cfg(test)]
  | ^

error: aborting due to previous error


real	0m0.237s
user	0m0.220s
sys	0m0.013s



info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.14.0-nightly (5665bdf3e 2016-11-02)

error: expected one of `!` or `::`, found `#`
 --> src/lib.rs:2:1
  |
2 | #[cfg(test)]
  | ^

error: aborting due to previous error


real	0m22.905s
user	0m22.827s
sys	0m0.070s

jchase@tethys test_regression $ cat src/lib.rs 
asdf
#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {
    }
}

Fixing the error (asdf -> fn main() {}) results in the expected:

jchase@tethys test_regression $ rustup default nightly-2016-10-21 && time rustc src/lib.rs; echo -e '\n\n'; rustup default nightly && time rustc src/lib.rs
info: using existing install for 'nightly-2016-10-21-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-2016-10-21-x86_64-unknown-linux-gnu'

  nightly-2016-10-21-x86_64-unknown-linux-gnu unchanged - rustc 1.14.0-nightly (f09420685 2016-10-20)


real	0m0.172s
user	0m0.133s
sys	0m0.033s



info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.14.0-nightly (5665bdf3e 2016-11-02)


real	0m0.181s
user	0m0.163s
sys	0m0.007s

Activity

  1. oli-obk commented on Nov 5, 2016

    @oli-obk
    Contributor

    It's not just rustc. If a run-pass test fails with compiletest-rs, the same hang can be seen for reporting the stacktrace of the failed test

  2. jrobsonchase commented on Nov 11, 2016

    @jrobsonchase
    ContributorAuthor

    Any movement on this? Still seeing the same behavior on nightly - stable and beta are fine.

  3. jrobsonchase commented on Nov 11, 2016

    @jrobsonchase
    ContributorAuthor

    Just a little more information: When I compile rust myself, I don't see the issue - even from the same commit. strace shows a huge jump in calls to mmap during the hang-time from ~600 calls with beta to ~9000 calls with nightly.

    Edit: Scratch the caveat around compiling it myself - I was doing it wrong.

  4. sfackler commented on Nov 15, 2016

    @sfackler
    Member

    I think someone ran into something similar before and it ended up being an issue with libbacktrace's custom allocator implementation.

  5. added a commit that references this issue on Jan 11, 2017
    099e7cb
  6. added a commit that references this issue on Jan 11, 2017
    52c03d1
  7. added a commit that references this issue on Jan 17, 2017
    77d74da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions