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

OOM building Servo after Rustup - deep recursion in mir #29740

Closed
nrc opened this issue Nov 10, 2015 · 4 comments
Closed

OOM building Servo after Rustup - deep recursion in mir #29740

nrc opened this issue Nov 10, 2015 · 4 comments
Assignees
Labels
A-mir Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nrc
Copy link
Member

nrc commented Nov 10, 2015

#0  0x00007ffff7584da0 in oom::hc14cacb105af3859iub () from /usr/local/lib/libstd-8cf6ce90.so
#1  0x00007ffff64e9caf in raw_vec::_$LT$impl$GT$::double::double::h12412696929041978538 () from /usr/local/lib/librustc_mir-8cf6ce90.so
#2  0x00007ffff64e6260 in build::cfg::_$LT$impl$GT$::start_new_block::heb1b8380252b8530fna () from /usr/local/lib/librustc_mir-8cf6ce90.so
#3  0x00007ffff650b0e4 in build::matches::test::_$LT$impl$GT$::call_comparison_fn::h75cd7a8ef7591ed4HGb () from /usr/local/lib/librustc_mir-8cf6ce90.so
#4  0x00007ffff6509750 in build::matches::test::_$LT$impl$GT$::perform_test::h032a1e873b4f8bf31Ab () from /usr/local/lib/librustc_mir-8cf6ce90.so
#5  0x00007ffff6511b25 in build::matches::_$LT$impl$GT$::match_candidates::ha9db898a51f89f14tqc () from /usr/local/lib/librustc_mir-8cf6ce90.so
#6  0x00007ffff65120ee in build::matches::_$LT$impl$GT$::match_candidates::ha9db898a51f89f14tqc () from /usr/local/lib/librustc_mir-8cf6ce90.so
#7  0x00007ffff65120ee in build::matches::_$LT$impl$GT$::match_candidates::ha9db898a51f89f14tqc () from /usr/local/lib/librustc_mir-8cf6ce90.so
#8  0x00007ffff65120ee in build::matches::_$LT$impl$GT$::match_candidates::ha9db898a51f89f14tqc () from /usr/local/lib/librustc_mir-8cf6ce90.so
#9  0x00007ffff65120ee in build::matches::_$LT$impl$GT$::match_candidates::ha9db898a51f89f14tqc () from /usr/local/lib/librustc_mir-8cf6ce90.so
#10 0x00007ffff65120ee in build::matches::_$LT$impl$GT$::match_candidates::ha9db898a51f89f14tqc () from /usr/local/lib/librustc_mir-8cf6ce90.so
...
#120 0x00007ffff65120ee in build::matches::_$LT$impl$GT$::match_candidates::ha9db898a51f89f14tqc () from /usr/local/lib/librustc_mir-8cf6ce90.so
#121 0x00007ffff64febcc in build::expr::into::_$LT$impl$GT$::into_expr::hd474bc15d5db47d4w8a () from /usr/local/lib/librustc_mir-8cf6ce90.so
#122 0x00007ffff64ff70f in build::into::_$LT$impl$GT$::eval_into::h646bd1cee14f27349ob () from /usr/local/lib/librustc_mir-8cf6ce90.so
#123 0x00007ffff64fa3ca in build::expr::into::_$LT$impl$GT$::into_expr::hd474bc15d5db47d4w8a () from /usr/local/lib/librustc_mir-8cf6ce90.so
#124 0x00007ffff64ff70f in build::into::_$LT$impl$GT$::eval_into::h646bd1cee14f27349ob () from /usr/local/lib/librustc_mir-8cf6ce90.so
#125 0x00007ffff64e9c1e in build::into::_$LT$impl$GT$::eval_into::h653729f06b55769coqb () from /usr/local/lib/librustc_mir-8cf6ce90.so
#126 0x00007ffff64e81c8 in build::block::_$LT$impl$GT$::ast_block::h4dafd3792c8ce5263ka () from /usr/local/lib/librustc_mir-8cf6ce90.so
#127 0x00007ffff64e3b6e in build::construct::h9612d1f0ff18acc5Zba () from /usr/local/lib/librustc_mir-8cf6ce90.so
#128 0x00007ffff651ef95 in mir_map::_$LT$impl$GT$::visit_fn::h2e04acb1eab91708sbd () from /usr/local/lib/librustc_mir-8cf6ce90.so
#129 0x00007ffff651ced9 in mir_map::_$LT$impl$GT$::visit_item::ha51d31a4db6001c2s8c () from /usr/local/lib/librustc_mir-8cf6ce90.so
#130 0x00007ffff651ca8a in mir_map::_$LT$impl$GT$::visit_item::ha51d31a4db6001c2s8c () from /usr/local/lib/librustc_mir-8cf6ce90.so
#131 0x00007ffff651ca8a in mir_map::_$LT$impl$GT$::visit_item::ha51d31a4db6001c2s8c () from /usr/local/lib/librustc_mir-8cf6ce90.so
#132 0x00007ffff651c40c in mir_map::build_mir_for_crate::h410e26a41a34d6ccA6c () from /usr/local/lib/librustc_mir-8cf6ce90.so
#133 0x00007ffff7a49440 in driver::phase_3_run_analysis_passes::_$LT$closure$GT$::closure.21972 () from /usr/local/lib/librustc_driver-8cf6ce90.so
#134 0x00007ffff7a2c464 in middle::ty::context::_$LT$impl$GT$::create_and_enter::create_and_enter::h4307381944410836454 () from /usr/local/lib/librustc_driver-8cf6ce90.so
#135 0x00007ffff7a27855 in driver::phase_3_run_analysis_passes::h6779606147744044053 () from /usr/local/lib/librustc_driver-8cf6ce90.so
#136 0x00007ffff7a07ba3 in driver::compile_input::h773898ad93c34082aca () from /usr/local/lib/librustc_driver-8cf6ce90.so
#137 0x00007ffff7b63a3c in run_compiler::h89eb6260e132f685ssc () from /usr/local/lib/librustc_driver-8cf6ce90.so
#138 0x00007ffff7b60ab7 in sys_common::unwind::try::try_fn::try_fn::h9774174355030096594 () from /usr/local/lib/librustc_driver-8cf6ce90.so
#139 0x00007ffff756e339 in __rust_try () from /usr/local/lib/libstd-8cf6ce90.so
#140 0x00007ffff75623bc in sys_common::unwind::try::inner_try::h937939714e6f6031tus () from /usr/local/lib/libstd-8cf6ce90.so
#141 0x00007ffff7b60e05 in boxed::_$LT$impl$GT$::call_box::call_box::h2378443920150659394 () from /usr/local/lib/librustc_driver-8cf6ce90.so
#142 0x00007ffff75759f4 in sys::thread::_$LT$impl$GT$::new::thread_start::ha23768bb722fd035QUw () from /usr/local/lib/libstd-8cf6ce90.so
#143 0x00007ffff0c016aa in start_thread (arg=0x7fffeebff700) at pthread_create.c:333
#144 0x00007ffff71f6eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

The elided frames are all identical to the ones before and after.

Seems related, but different, to #29466

To repro, need to build Servo after a rustup, see this branch: servo/servo#8446. Occurs when building the script crate.

cc @nikomatsakis, @Manishearth

@nrc nrc added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-mir Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html labels Nov 10, 2015
@nikomatsakis
Copy link
Contributor

This is probably a dup of #29227. I'd be curious to know if it still occurs, as a partial fix has recently landed. I'm working on a more thorough fix now.

@Manishearth
Copy link
Member

I'll check it out in tomorrow's nightly.

@nikomatsakis
Copy link
Contributor

@nikomatsakis
Copy link
Contributor

triage: P-high (servo blocker)

@rust-highfive rust-highfive added P-high High priority and removed I-nominated labels Nov 11, 2015
@nikomatsakis nikomatsakis self-assigned this Nov 11, 2015
Manishearth added a commit to Manishearth/rust that referenced this issue Nov 12, 2015
In previous PRs, I changed the match desugaring to generate more efficient code for ints/chars and the like. But this doesn't help when you're matching strings, ranges, or other crazy complex things (leading to rust-lang#29740). This commit restructures match desugaring *yet again* to handle that case better -- basically we now degenerate to an if-else-if chain in such cases.

~~Note that this builds on rust-lang#29763 which will hopefully land soon. So ignore the first few commits.~~ landed now

r? @Aatch since he's been reviewing the other commits in this series
bors-servo pushed a commit to servo/servo that referenced this issue Nov 12, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

DO NOT r+ or try+ this

It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 12, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

DO NOT r+ or try+ this

It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 12, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

DO NOT r+ or try+ this

It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 13, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

DO NOT r+ or try+ this

It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 16, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

DO NOT r+ or try+ this

It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 25, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

DO NOT r+ or try+ this

It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 25, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

DO NOT r+ or try+ this

It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 25, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 25, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 26, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 26, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 26, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 26, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 26, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 26, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 26, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 26, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 26, 2015
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/servo that referenced this issue Nov 27, 2015
…Manishearth

Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08)

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446)
<!-- Reviewable:end -->
jrmuizel pushed a commit to jrmuizel/gecko-cinnabar that referenced this issue Jun 12, 2017
…015-11-08) (from servo:rustup_20151110); r=SimonSapin+Ms2ger+jdm+Manishearth

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

Source-Repo: https://github.com/servo/servo
Source-Revision: f13c72d68e1e7f49e241938bfd6e8a588c68e86b
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
…015-11-08) (from servo:rustup_20151110); r=SimonSapin+Ms2ger+jdm+Manishearth

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

Source-Repo: https://github.com/servo/servo
Source-Revision: f13c72d68e1e7f49e241938bfd6e8a588c68e86b

UltraBlame original commit: cfd63f6ba5819f3029d16d9681de754882ef67b4
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…015-11-08) (from servo:rustup_20151110); r=SimonSapin+Ms2ger+jdm+Manishearth

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

Source-Repo: https://github.com/servo/servo
Source-Revision: f13c72d68e1e7f49e241938bfd6e8a588c68e86b

UltraBlame original commit: cfd63f6ba5819f3029d16d9681de754882ef67b4
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…015-11-08) (from servo:rustup_20151110); r=SimonSapin+Ms2ger+jdm+Manishearth

<s>DO NOT r+ or try+ this</s>

<s>It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. </s>

Source-Repo: https://github.com/servo/servo
Source-Revision: f13c72d68e1e7f49e241938bfd6e8a588c68e86b

UltraBlame original commit: cfd63f6ba5819f3029d16d9681de754882ef67b4
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 24, 2024
…wjasper

match lowering: Split off `test_candidates` into several functions and improve comments

The logic of `test_candidates` has three steps: pick a test, sort the candidates, and generate code for everything. So I split it off into three methods.

I also ended up reworking the comments that explain the algorithm. In particular I added detailed examples. I removed the digression about rust-lang#29740 because it's no longer relevant to how the code is structured today.

r? `@matthewjasper`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 24, 2024
…wjasper

match lowering: Split off `test_candidates` into several functions and improve comments

The logic of `test_candidates` has three steps: pick a test, sort the candidates, and generate code for everything. So I split it off into three methods.

I also ended up reworking the comments that explain the algorithm. In particular I added detailed examples. I removed the digression about rust-lang#29740 because it's no longer relevant to how the code is structured today.

r? ``@matthewjasper``
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Feb 25, 2024
Rollup merge of rust-lang#121374 - Nadrieril:factor-explain, r=matthewjasper

match lowering: Split off `test_candidates` into several functions and improve comments

The logic of `test_candidates` has three steps: pick a test, sort the candidates, and generate code for everything. So I split it off into three methods.

I also ended up reworking the comments that explain the algorithm. In particular I added detailed examples. I removed the digression about rust-lang#29740 because it's no longer relevant to how the code is structured today.

r? ``@matthewjasper``
bors pushed a commit to rust-lang/miri that referenced this issue Feb 25, 2024
match lowering: Split off `test_candidates` into several functions and improve comments

The logic of `test_candidates` has three steps: pick a test, sort the candidates, and generate code for everything. So I split it off into three methods.

I also ended up reworking the comments that explain the algorithm. In particular I added detailed examples. I removed the digression about rust-lang/rust#29740 because it's no longer relevant to how the code is structured today.

r? ``@matthewjasper``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority 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

4 participants