develooper Front page | perl.perl6.compiler | Postings from February 2018

[perl #129787] [CONC] die/CATCH inside a start-block with a channelheisenbugs

From:
Aleks-Daniel Jakimenko-Aleksejev via RT
Date:
February 4, 2018 10:31
Subject:
[perl #129787] [CONC] die/CATCH inside a start-block with a channelheisenbugs
Message ID:
rt-4.0.24-4951-1517740294-1193.129787-80-0@perl.org
FWIW, this bug is somewhat similar in feel:
https://github.com/rakudo/rakudo/issues/1202

On 2017-10-15 03:14:02, cpan@zoffix.com wrote:
> On Wed, 02 Nov 2016 07:13:26 -0700, jnthn@jnthn.net wrote:
> > On Sun Oct 02 12:52:45 2016, gfldex wrote:
> > > sub f(){
> > > my $c = Channel.new;
> > >
> > > start {
> > > for 1..* {
> > > CATCH { default { note .Str } }
> > >
> > > $c.send($_);
> > > die 'bad';
> > > }
> > > }
> > >
> > > $c.list
> > > }
> > >
> > > .say for f;
> > >
> > > # sometimes it works
> > > # sometimes it counts to 20 and outputs:
> > > # Command terminated
> > > # sometimes it outputs some numbers and 'bad's end then some
> > > # unicode-garbage
> > > # sometimes it outputs a few 100s 'bad' and then stalls with one
> > > thread at
> > > # 100% CPU
> > > # heisenbug rate is about 1/3
> > > #
> > > # also it seams to eat up plenty of RAM while it's running without
> > > the
> > > # die/CATCH
> >
> > This one is yet another case of the long-standing issues with use of
> > handles across threads. The channel golfs away; you can get this bug
> > with just:
> >
> > start { for ^100 { note "hi" } }; for ^100 { say "oops" }
> >
> > /jnthn
>
>
> This is now fixed, but have no idea how to test it… On 2016.10, I can
> only repro this bug with STDERR/STDOUT set to a TTY terminal.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About