Skip to content

Cycle collector is still turned off #1741

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

Closed
marijnh opened this issue Feb 2, 2012 · 3 comments
Closed

Cycle collector is still turned off #1741

marijnh opened this issue Feb 2, 2012 · 3 comments
Assignees
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@marijnh
Copy link
Contributor

marijnh commented Feb 2, 2012

maybe_cc in rust_cc.cpp contains this:

    // FIXME: Needs a snapshot.
#if 0
    if (task->cc_counter++ > RUST_CC_FREQUENCY) {
        task->cc_counter = 0;
        do_cc(task);
    }
#endif

Removing the #if causes the stage1 compiler to crash with the following backtrace:


#0  0x00007ffff6026d05 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff602aab6 in *__GI_abort () at abort.c:92
#2  0x00007ffff69d7b5c in walk_vec2 (is_pod=<optimized out>, this=0x7ffff3f1b950, sp_size=<optimized out>) at ./src/rt/rust_cc.cpp:315
#3  walk_vec1 (sp_size=5, is_pod=true, this=0x7ffff3f1b950) at ./src/rt/rust_shape.h:878
#4  shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_vec0 (this=0x7ffff3f1b950) at ./src/rt/rust_shape.h:440
#5  0x00007ffff69d763e in walk_box_contents2 (box_dp=..., sub=..., this=<optimized out>) at ./src/rt/rust_cc.cpp:383
#6  shape::data<cc::mark, shape::ptr>::walk_box_contents1 (this=<optimized out>) at ./src/rt/rust_shape.h:947
#7  0x00007ffff69d77b2 in walk_box2 (this=0x7ffff3f1ba10) at ./src/rt/rust_cc.cpp:330
#8  walk_iface2 (this=0x7ffff3f1ba10) at ./src/rt/rust_cc.cpp:363
#9  walk_iface1 (this=0x7ffff3f1ba10) at ./src/rt/rust_shape.h:895
#10 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk (this=0x7ffff3f1ba10) at ./src/rt/rust_shape.h:381
#11 0x00007ffff69d7b88 in walk_struct2 (end_sp=0x7ffff7443c5d "\r\016", this=0x7ffff3f1ba10) at ./src/rt/rust_cc.cpp:388
#12 walk_struct1 (end_sp=0x7ffff7443c5d "\r\016", this=0x7ffff3f1ba10) at ./src/rt/rust_shape.h:874
#13 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_struct0 (this=0x7ffff3f1ba10) at ./src/rt/rust_shape.h:510
#14 0x00007ffff69d763e in walk_box_contents2 (box_dp=..., sub=..., this=<optimized out>) at ./src/rt/rust_cc.cpp:383
#15 shape::data<cc::mark, shape::ptr>::walk_box_contents1 (this=<optimized out>) at ./src/rt/rust_shape.h:947
#16 0x00007ffff69d767e in walk_box2 (this=0x7ffff3f1bad0) at ./src/rt/rust_cc.cpp:330
#17 walk_box1 (this=0x7ffff3f1bad0) at ./src/rt/rust_shape.h:881
#18 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_box0 (this=0x7ffff3f1bad0) at ./src/rt/rust_shape.h:488
#19 0x00007ffff69d7b88 in walk_struct2 (end_sp=0x7ffff7443c5d "\r\016", this=0x7ffff3f1bad0) at ./src/rt/rust_cc.cpp:388
#20 walk_struct1 (end_sp=0x7ffff7443c5d "\r\016", this=0x7ffff3f1bad0) at ./src/rt/rust_shape.h:874
#21 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_struct0 (this=0x7ffff3f1bad0) at ./src/rt/rust_shape.h:510
#22 0x00007ffff69d763e in walk_box_contents2 (box_dp=..., sub=..., this=<optimized out>) at ./src/rt/rust_cc.cpp:383
#23 shape::data<cc::mark, shape::ptr>::walk_box_contents1 (this=<optimized out>) at ./src/rt/rust_shape.h:947
#24 0x00007ffff69d767e in walk_box2 (this=0x7ffff3f1bba0) at ./src/rt/rust_cc.cpp:330
#25 walk_box1 (this=0x7ffff3f1bba0) at ./src/rt/rust_shape.h:881
#26 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_box0 (this=0x7ffff3f1bba0) at ./src/rt/rust_shape.h:488
#27 0x00007ffff69d7b88 in walk_struct2 (end_sp=0x7ffff7443c6f "", this=0x7ffff3f1bba0) at ./src/rt/rust_cc.cpp:388
#28 walk_struct1 (end_sp=0x7ffff7443c6f "", this=0x7ffff3f1bba0) at ./src/rt/rust_shape.h:874
#29 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_struct0 (this=0x7ffff3f1bba0) at ./src/rt/rust_shape.h:510
#30 0x00007ffff69d683f in cc::mark::do_mark (task=0x626170, roots=..., marked=...) at ./src/rt/rust_cc.cpp:444
#31 0x00007ffff69d6e31 in cc::do_cc (task=0x626170) at ./src/rt/rust_cc.cpp:654
#32 0x00007ffff69c84b8 in upcall_s_malloc (args=0x6551d0) at ./src/rt/rust_upcall.cpp:126
#33 0x00007ffff69dc139 in __morestack () from /home/marijn/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so
#34 0x00007ffff69c8878 in call_shim_on_c_stack (fn_ptr=0x7ffff69c8450, args=0x6551d0, this=<optimized out>) at ./src/rt/arch/x86_64/context.h:59
#35 call_upcall_on_c_stack (fn_ptr=0x7ffff69c8450, args=0x6551d0) at ./src/rt/rust_upcall.cpp:52
#36 upcall_malloc (td=<optimized out>) at ./src/rt/rust_upcall.cpp:144
#37 0x00007ffff71be06b in syntax::parse::parser::mk_expr::_6c35a4f2e274aebe ()
   from /home/marijn/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-4171d83aef249987-0.1.so
#38 0x00007ffff71be9d2 in syntax::parse::parser::mk_pexpr::_f82e5d709d2cbe83 ()
[more]
@nikomatsakis
Copy link
Contributor

I've been wanting to look into this... the last time we talked about it, it seemed like there might some fundamental problem with collecting in that we could not usefully establish safe points. But after reading the code more, I see that we always zero out all structures on the heap, so I think that cc ought to work.

@nikomatsakis
Copy link
Contributor

(Though of course I'd prefer not to zero out all boxes upon allocation if we could avoid it.)

@ghost ghost assigned nikomatsakis Apr 12, 2012
@catamorphism
Copy link
Contributor

Cycle collector has been removed, closing.

bors added a commit to rust-lang-ci/rust that referenced this issue May 2, 2020
…lip1995

Move unneeded_field_pattern to restriction group

Fixes rust-lang#1741

changelog: Move unneeded_field_pattern to pedantic group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

3 participants