Segmentation fault/GC assertion failure (Rakudo Perl 6) #801

Closed
hoelzro opened this Issue Jul 29, 2012 · 3 comments

4 participants

@hoelzro

Hi everyone,

I found an issue while working on an application in Perl 6, and I've concluded that the issue lies within the Parrot runtime. First of all, here's a link to the corresponding issue in the Rakudo bug tracker: https://rt.perl.org/rt3/Public/Bug/Display.html?id=114228

I'm confident that the issue is Parrot-related because it goes away when I build Parrot with --optimize. I've tried this with both Parrot 4.6.0 and Parrot HEAD (11f9d7c), and I encounter the error both times.

Thanks,
Rob

@Whiteknight

This issue looks to me like a case where a PMC is not being properly marked. When the PMC is used later it's considered dead (on the free list), but somebody is still holding a reference to it.

When you use --optimize, the assertion disappears and the inconsistent data should indeed cause a segfault.

Tracing down these kinds of issues is notoriously difficult. Because of the nature of this bug, I suspect that the root cause of it might be in the nativecall implementation or in the code that's being called, keeping a PMC reference but not properly marking that PMC for GC. I'll do what I can to look at this issue tonight or sometime this week.

@plobsing

The example code linked in the RT (http://hoelz.ro/files/assertion-failure.p6) is no longer available. Please make this available again or better yet, provide a Gist.

@rurban
Parrot Virtual Machine member

This is most likely fixed with the Coroutine.mark update with 6.9.0

@rurban rurban closed this Nov 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment