Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #31992] [BUG] YetAnotherGarbageCollectionBug(tm)

0 views
Skip to first unread message

Will Coleda

unread,
Oct 14, 2004, 8:47:55 PM10/14/04
to bugs-bi...@rt.perl.org
# New Ticket Created by Will Coleda
# Please include the string: [perl #31992]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=31992 >


I noticed after a recent update that parts of the tcl test suite started failing. I finally tracked it down to the fact that I was NOT running with '-G'. Running parrot with -G gets me the expected output, leaving it off causes some repeatable failures.

With a cvs fresh checkout (not update):

% perl Configure.pl
% make
% (cd dynclasses && make)
% cd languages/tcl && make
% make test
<SNIP>
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
cmd_break.t 2 512 2 2 100.00% 1-2
cmd_continue.t 2 512 2 2 100.00% 1-2
cmd_expr.t 1 256 40 1 2.50% 36
cmd_for.t 1 256 1 1 100.00% 1
cmd_source.t ?? ?? % ??
cmd_time.t ?? ?? % ??
cmd_while.t 1 256 1 1 100.00% 1
Failed 7/28 test scripts, 75.00% okay. 7/154 subtests failed, 95.45% okay.
% export TEST_PROG_ARGS=-G
% make test
<SNIP>
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
cmd_expr.t 1 256 40 1 2.50% 36
cmd_source.t ?? ?? % ??
cmd_time.t ?? ?? % ??
Failed 3/28 test scripts, 89.29% okay. 1/154 subtests failed, 99.35% okay.

Enjoy!

Leopold Toetsch

unread,
Oct 15, 2004, 4:43:21 AM10/15/04
to perl6-i...@perl.org
Will Coleda <parrotbug...@parrotcode.org> wrote:

> I noticed after a recent update that parts of the tcl test suite
> started failing. I finally tracked it down to the fact that I was NOT
> running with '-G'.

tcl.pl dies at 19, removing "or die" fixes that.

To your problem:

C<tclobject> is an abstract object, it doesn't have a vtable. But the
bundling code *does* C<pmc_register> this PMC. This leads to an empty
vtable slot, dereferencing that NULL is an operation, which many systems
don't like.

After fixing that (or better working around - C<pmc_register> shouldn't be
called) it dies later and as usual by loosing C<TclWords> - it seems.

My gut feeling is that C<TclArray> isn't quite up to data. It duplicates at
firt sight just C<PerlHash>. But the latter has recent changes WRT hash
creation, which aren't in C<TclArray>.

I'd first reduce C<TclArray> to a bare minimum. Specifically the creation
functions (init, clone) should be inherited (or follow the C<PerlHash>
conventions). The same applies to any PMC that can hold pointers to
other PMCs.

These changes are necessary to make a PMC compliant with incremental GC.
Please grep through the docs and the sources for DOD_WRITE_BARRIER.

leo

William Coleda

unread,
Oct 15, 2004, 8:16:20 PM10/15/04
to parrotbug...@parrotcode.org

Leopold Toetsch via RT wrote:

> Will Coleda <parrotbug...@parrotcode.org> wrote:
>
>
>>I noticed after a recent update that parts of the tcl test suite
>>started failing. I finally tracked it down to the fact that I was NOT
>>running with '-G'.
>
>
> tcl.pl dies at 19, removing "or die" fixes that.

In my rush to get check back in to duplicate the bug, I created the same bug I did before since I hadn't pruned empty directories. Fixed.

> To your problem:
>
> C<tclobject> is an abstract object, it doesn't have a vtable. But the
> bundling code *does* C<pmc_register> this PMC. This leads to an empty
> vtable slot, dereferencing that NULL is an operation, which many systems
> don't like.
>
> After fixing that (or better working around - C<pmc_register> shouldn't be
> called) it dies later and as usual by loosing C<TclWords> - it seems.
>
> My gut feeling is that C<TclArray> isn't quite up to data. It duplicates at
> firt sight just C<PerlHash>. But the latter has recent changes WRT hash
> creation, which aren't in C<TclArray>.

Yup. Tcl* are all (except TclWord) cargo culted from the first time I submitted a patch. They've not been kept current since they were uncompilable until a week or two ago.

> I'd first reduce C<TclArray> to a bare minimum. Specifically the creation
> functions (init, clone) should be inherited (or follow the C<PerlHash>
> conventions). The same applies to any PMC that can hold pointers to
> other PMCs.
>
> These changes are necessary to make a PMC compliant with incremental GC.
> Please grep through the docs and the sources for DOD_WRITE_BARRIER.

Hey, finally one of the GC bugs is my fault! I've claimed the ticket, I'll see what I can do.

0 new messages