petdance/scratch — Issue #221: failed assertion 'PObj_is_PMC_TEST(obj)' doing IO from Rakudo
Author: petdance
Created: 2011-11-01 05:41:40+00:00
State: open
Labels: bug, Pri-normal, Sev-medium

The attached Perl 6 run from Rakudo randomly (usually right after it starts up) dies with the following output:
{{{
<...snip...>
recv
start of until
recv
start of until
src/gc/api.c:260: failed assertion 'PObj_is_PMC_TEST(obj)'
Backtrace - Obtained 32 stack frames (max trace depth is 32).
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_print_backtrace+0x21) [0x7f551deca341]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_confess+0x47) [0x7f551deca307]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_gc_mark_PMC_alive_fun+0x7f) [0x7f551ded82cf]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551e07787f]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(mark_special+0x20a) [0x7f551dedbf9a]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_gc_mark_PObj_alive+0x93) [0x7f551ded81d3]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551dedd621]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551dedd131]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(trace_system_areas+0x62) [0x7f551dedd0c2]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_gc_trace_root+0x584) [0x7f551dedba74]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551dedace0]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551dedaaac]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_gc_mark_and_sweep+0x2c) [0x7f551ded928c]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551dedae57]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551dedaf5f]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551ded8b88]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_gc_new_string_header+0x56) [0x7f551ded8a16]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_str_new_COW+0x49) [0x7f551de191d9]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_str_copy+0x22) [0x7f551de1af22]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551e0ac8fd]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551e0ac0ea]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551e073ef1]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551e073ef1]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551e073ae7]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551e0890bd]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_capture_lex+0xda) [0x7f551df44aba]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_capture_lex_p+0x5a) [0x7f551de21aba]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0 [0x7f551df3bd55]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(runops_int+0xfd) [0x7f551df3a82d]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(runops+0x1a5) [0x7f551deee415]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_pcc_invoke_from_sig_object+0x1f4) [0x7f551dee40e4]
/home/carlin/Applications/rakudo/parrot_install/lib/libparrot.so.1.8.0(Parrot_pcc_invoke_sub_from_c_args+0xd5) [0x7f551dee3a65]
Aborted
}}}

Based on the position of the warn statements it's happening at the "$buf ~= $socket.recv(1);" line.

Originally http://trac.parrot.org/parrot/ticket/1371