Skip Menu |
Report information
Id: 125978
Status: open
Priority: 0/
Queue: perl6

Owner: jnthn [at] jnthn.net
Requestors: perl6 [at] 6dof.xyz
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



To: rakudobug [...] perl.org
From: cdc <perl6 [...] 6dof.xyz>
Date: Thu, 3 Sep 2015 16:46:21 +0200
Subject: [BUG] Segfault (and other crashes) when using .hyper
Download (untitled) / with headers
text/plain 1.6k
* How to reproduce (where ip is the attached file): perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /:constant @l = (1 ... 255).list; @l ** 4 % '.'/).all.so" * Expected output: True that is, as without .hyper: perl6 -e "say 'ip'.IO.lines.map(* ~~ /:constant @l = (1 ... 255).list; @l ** 4 % '.'/).all.so" True * Current output (any of the 5 following ones): False -------------------------------------------------- Segmentation fault (core dumped) -------------------------------------------------- Internal error: invalid thread ID 471 in GC work pass -------------------------------------------------- Can only resume an exception object in any at /home/user/.rakudobrew/glr-nom/install/share/perl6/runtime/CORE.setting.moarvm:1 in sub THROW at /home/user/.rakudobrew/glr-nom/install/share/perl6/runtime/CORE.setting.moarvm:1 -------------------------------------------------- *** Error in `/home/user/.rakudobrew/glr-nom/install/bin/moar': double free or corruption (!prev): 0x00007ff45c1c70b0 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x77d9e)[0x7ff46c267d9e] /lib64/libc.so.6(cfree+0x5b5)[0x7ff46c2739f5] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(MVM_frame_dec_ref+0x93)[0x7ff46c711e33] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(MVM_frame_try_return+0x26b)[0x7ff46c7161fb] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(MVM_interp_run+0x12e3d)[0x7ff46c70dc2d] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(+0x16c4ce)[0x7ff46c7194ce] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(+0x217367)[0x7ff46c7c4367] /lib64/libpthread.so.0(+0x752a)[0x7ff46bcd352a] /lib64/libc.so.6(clone+0x6d)[0x7ff46c2f022d]
Download ip
text/plain 11.1k

Message body is not shown because sender requested not to inline it.

From: perl6 [...] 6dof.xyz
To: perl6 via RT <perl6-bugs-followup [...] perl.org>
Subject: Re: [perl #125978] [BUG] Segfault (and other crashes) when using .hyper
Date: Thu, 3 Sep 2015 17:05:16 +0200
Download (untitled) / with headers
text/plain 1.6k
Another way to produce such this issue: perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /<{ (1...255).list }> '.'/).all.so" Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Method 'NFA' not found for invocant of class 'Any' in whatevercode at -e:1 Cannot invoke this object (REPR: Null, cs = 0) Segmentation fault (core dumped) -------------------------------------------------- Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 *** Error in `/home/user/.rakudobrew/glr-nom/install/bin/moar': double free or corruption (fasttop): 0x00007f44484c8360 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x77d9e)[0x7f44604a7d9e] /lib64/libc.so.6(cfree+0x5b5)[0x7f44604b39f5] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(+0x19bc46)[0x7f4460988c46] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(MVM_interp_run+0x7c7)[0x7f446093b5b7] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(+0x16c4ce)[0x7f44609594ce] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(+0x217367)[0x7f4460a04367] /lib64/libpthread.so.0(+0x752a)[0x7f445ff1352a] /lib64/libc.so.6(clone+0x6d)[0x7f446053022d]
Subject: [perl #125978] [BUG] Segfault (and other crashes) when using .hyper
Date: Fri, 4 Sep 2015 10:40:03 +0200
From: cdc <perl6 [...] 6dof.xyz>
To: perl6 via RT <perl6-bugs-followup [...] perl.org>
Download (untitled) / with headers
text/plain 1.6k
Another way to produce such this issue: perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /<{ (1...255).list }> '.'/).all.so" Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Method 'NFA' not found for invocant of class 'Any' in whatevercode at -e:1 Cannot invoke this object (REPR: Null, cs = 0) Segmentation fault (core dumped) -------------------------------------------------- Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 Incompatible MROs in P6opaque rebless in any mixin at src/gen/m-Metamodel.nqp:1273 in whatevercode at -e:1 *** Error in `/home/user/.rakudobrew/glr-nom/install/bin/moar': double free or corruption (fasttop): 0x00007f44484c8360 ======= Backtrace: ========= /lib64/libc.so.6(+0x77d9e)[0x7f44604a7d9e] /lib64/libc.so.6(cfree+0x5b5)[0x7f44604b39f5] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(+0x19bc46)[0x7f4460988c46] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(MVM_interp_run+0x7c7)[0x7f446093b5b7] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(+0x16c4ce)[0x7f44609594ce] /home/user/.rakudobrew/glr-nom/install/lib/libmoar.so(+0x217367)[0x7f4460a04367] /lib64/libpthread.so.0(+0x752a)[0x7f445ff1352a] /lib64/libc.so.6(clone+0x6d)[0x7f446053022d]
Date: Mon, 14 Sep 2015 22:12:21 +0200
Subject: Re: [perl #125978] [BUG] Segfault (and other crashes) when using .hyper
To: perl6 via RT <perl6-bugs-followup [...] perl.org>
From: cdc <perl6 [...] 6dof.xyz>
http://irclog.perlgeek.de/perl6/2015-09-14#i_11216866 Show quoted text
> 19:18 jnthn https://rt.perl.org/Ticket/Display.html?id=125978 seems stable locally > 19:18 Perhaps thanks to my invocation race fixes > [...] > 19:19 jnthn cdc: Maybe you could test ^^ on latest
I did some tests, and sadly it still segfaults: $ perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /<{ (1...255).list }> '.'/).list" *** Error in `/usr/local/cedric/.rakudobrew/moar-nom/install/bin/moar': double free or corruption (fasttop): 0x00007f6a94380bf0 *** Incompatible MROs in P6opaque rebless in any mixin at gen/moar/m-Metamodel.nqp:1273 in whatevercode at -e:1 and: $ perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /<{ (1...255).list }> '.'/).list" *** Error in `/usr/local/cedric/.rakudobrew/moar-nom/install/bin/moar': free(): invalid size: 0x00007fb6a0114090 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x7f93a)[0x7fb6a126393a] where: $ perl6 --version This is perl6 version 2015.07.1-928-g65d33be built on MoarVM version 2015.08-34-g113c3b5
Download (untitled) / with headers
text/plain 1.4k
On Mon Sep 14 13:07:32 2015, perl6@6dof.xyz wrote: Show quoted text
> http://irclog.perlgeek.de/perl6/2015-09-14#i_11216866 >
> > 19:18 jnthn https://rt.perl.org/Ticket/Display.html?id=125978 seems > > stable locally > > 19:18 Perhaps thanks to my invocation race fixes > > [...] > > 19:19 jnthn cdc: Maybe you could test ^^ on latest
> > I did some tests, and sadly it still segfaults: > > $ perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /<{ (1...255).list }> > '.'/).list" > *** Error in `/usr/local/cedric/.rakudobrew/moar- > nom/install/bin/moar': double free or corruption (fasttop): > 0x00007f6a94380bf0 *** > Incompatible MROs in P6opaque rebless > in any mixin at gen/moar/m-Metamodel.nqp:1273 > in whatevercode at -e:1 > > and: > > $ perl6 -e "say 'ip'.IO.lines.hyper.map(* ~~ /<{ (1...255).list }> > '.'/).list" > *** Error in `/usr/local/cedric/.rakudobrew/moar- > nom/install/bin/moar': free(): invalid size: 0x00007fb6a0114090 *** > ======= Backtrace: ========= > /lib64/libc.so.6(+0x7f93a)[0x7fb6a126393a] > > where: > > $ perl6 --version > This is perl6 version 2015.07.1-928-g65d33be built on MoarVM version > 2015.08-34-g113c3b5
It seems that we do an EVAL when interpolating the regex, and that some issues with thread safety in the Perl 6 compiler (or perhaps in the way it gets code-gen'd) is at least somewhat to blame. This crashes in similar ways: perl6-m -e "await (^1000).map({ start { EVAL '/0|1|2/' } }); say 'ok'" Turning on MVM_CROSS_THREAD_WRITE_LOG shows various suspect things.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org