Skip to content

rustc crashes with exit code 3221225501 #42544

Closed

Description

@torkleyy

Channels: beta and nightly

OS: Windows (AppVeyor CI)

Caused by:
  process didn't exit successfully: `rustc --crate-name dxguid C:\Users\appveyor\.cargo\registry\src\github.com-1ecc6299db9ec823\dxguid-sys-0.2.0\src\lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=e6ed05839a70ac27 -C extra-filename=-e6ed05839a70ac27 --out-dir C:\projects\amethyst\target\debug\deps -L dependency=C:\projects\amethyst\target\debug\deps --extern winapi=C:\projects\amethyst\target\debug\deps\libwinapi-97963d09fc19ffa3.rlib --cap-lints allow` (exit code: 3221225501)
Build failed, waiting for other jobs to finish...
error: build failed

Complete build log: https://ci.appveyor.com/project/amethyst/amethyst/build/1.0.336/job/1gg0nmj81hj67t4s

Activity

  1. retep998 commented on Jun 8, 2017

    @retep998
    Contributor

    Issue did not exist in rustc 1.19.0-nightly (5f3966864 2017-05-25). Issue does exist in rustc 1.19.0-nightly (557967766 2017-05-26). 5f39668...5579677

    Issue is that rustc is suddenly burning through a ton of memory. I had to kill it when it got to around 5GB because I don't want my computer to swap to death.

    Code that is failing to compile is just a bunch of GUID constants. https://github.com/retep998/winapi-rs/blob/0.2/lib/dxguid/src/lib.rs

    Doing the run with -Ztime-passes I get through the following stages without issue

    time: 0.017; rss: 21MB  parsing
    time: 0.000; rss: 21MB  recursion limit
    time: 0.000; rss: 21MB  crate injection
    time: 0.000; rss: 21MB  plugin loading
    time: 0.000; rss: 21MB  plugin registration
    time: 0.506; rss: 85MB  expansion
    time: 0.000; rss: 85MB  maybe building test harness
    time: 0.001; rss: 85MB  maybe creating a macro crate
    time: 0.000; rss: 85MB  checking for inline asm in case the target doesn't support it
    time: 0.003; rss: 85MB  early lint checks
    time: 0.001; rss: 85MB  AST validation
    

    After that should come name resolution but instead it just sits around burning up memory.

  2. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Jun 8, 2017
  3. retep998 commented on Jun 8, 2017

    @retep998
    Contributor

    Based on the commits in the commit range, I'm going to accuse @jseyfried of causing this with #40847

  4. retep998 commented on Jun 8, 2017

    @retep998
    Contributor

    Some performance testing by removing lines indicates that the time taken and memory used is roughly linear with the number of lines. Approximately 0.1 seconds and 12MB of memory per line.

  5. retep998 commented on Jun 8, 2017

    @retep998
    Contributor

    Interestingly, the issue only occurs when DEFINE_GUID! is imported via #[macro_use(DEFINE_GUID)] extern crate winapi;. If I define the macro locally, then the issue goes away.

  6. added
    I-slowIssue: Problems and improvements with respect to performance of generated code.
    on Jun 8, 2017
  7. nikomatsakis commented on Jun 8, 2017

    @nikomatsakis
    Contributor

    triage: P-high

  8. nikomatsakis commented on Jun 15, 2017

    @nikomatsakis
    Contributor

    ping @pnkfelix -- this seems to be of pretty high importance. I'm not sure whether @jseyfried has time to make progress on it now, maybe you can look into it a bit?

  9. jseyfried commented on Jun 15, 2017

    @jseyfried
    Contributor

    Sorry for the delay getting to this -- I worked on this yesterday and couldn't repro. I tried on a Linux and a Windows system with a couple of recent nightlies. I have some extra time this week, so once I can repro I believe I can investigate and fix within a day.

  10. jseyfried commented on Jun 15, 2017

    @jseyfried
    Contributor

    Reproduced, working on a fix now.

  11. jseyfried commented on Jun 18, 2017

    @jseyfried
    Contributor

    Fixed in #42728.

  12. added a commit that references this issue on Jun 20, 2017
    d92edac
  13. added a commit that references this issue on May 31, 2022
  14. added a commit that references this issue on May 31, 2022
  15. added 2 commits that reference this issue on May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

I-slowIssue: Problems and improvements with respect to performance of generated code.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions