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 crashes with exit code 3221225501 #42544

Closed
torkleyy opened this issue Jun 8, 2017 · 9 comments
Closed

rustc crashes with exit code 3221225501 #42544

torkleyy opened this issue Jun 8, 2017 · 9 comments
Assignees
Labels
I-slow Issue: Problems and improvements with respect to performance of generated code. P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@torkleyy
Copy link

torkleyy commented Jun 8, 2017

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

@retep998
Copy link
Member

retep998 commented Jun 8, 2017

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.

@retep998 retep998 added regression-from-stable-to-beta Performance or correctness regression from stable to beta. I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 8, 2017
@retep998
Copy link
Member

retep998 commented Jun 8, 2017

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

@retep998
Copy link
Member

retep998 commented Jun 8, 2017

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.

@retep998
Copy link
Member

retep998 commented Jun 8, 2017

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.

@retep998 retep998 added the I-slow Issue: Problems and improvements with respect to performance of generated code. label Jun 8, 2017
@nikomatsakis
Copy link
Contributor

triage: P-high

@nikomatsakis
Copy link
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?

@jseyfried
Copy link
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.

@jseyfried
Copy link
Contributor

Reproduced, working on a fix now.

@jseyfried
Copy link
Contributor

Fixed in #42728.

frewsxcv added a commit to frewsxcv/rust that referenced this issue Jun 20, 2017
ojeda added a commit to ojeda/rust that referenced this issue May 31, 2022
Linux's `checkpatch.pl` reports:

```txt
rust-lang#42544: FILE: rust/alloc/vec/mod.rs:2692:
WARNING: Possible repeated word: 'to'
+            // - Elements are :Copy so it's OK to to copy them, without doing
```

Signed-off-by: Miguel Ojeda <[email protected]>
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue May 31, 2022
alloc: remove repeated word in comment

Linux's `checkpatch.pl` reports:

```txt
rust-lang#42544: FILE: rust/alloc/vec/mod.rs:2692:
WARNING: Possible repeated word: 'to'
+            // - Elements are :Copy so it's OK to to copy them, without doing
```

Signed-off-by: Miguel Ojeda <[email protected]>
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue May 31, 2022
alloc: remove repeated word in comment

Linux's `checkpatch.pl` reports:

```txt
rust-lang#42544: FILE: rust/alloc/vec/mod.rs:2692:
WARNING: Possible repeated word: 'to'
+            // - Elements are :Copy so it's OK to to copy them, without doing
```

Signed-off-by: Miguel Ojeda <[email protected]>
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue May 31, 2022
alloc: remove repeated word in comment

Linux's `checkpatch.pl` reports:

```txt
rust-lang#42544: FILE: rust/alloc/vec/mod.rs:2692:
WARNING: Possible repeated word: 'to'
+            // - Elements are :Copy so it's OK to to copy them, without doing
```

Signed-off-by: Miguel Ojeda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-slow Issue: Problems and improvements with respect to performance of generated code. P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. 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

6 participants