[perl #129787] [CONC] die/CATCH inside a start-block with a channel heisenbugs
FWIW, this bug is somewhat similar in feel: https://github.com/rakudo/rakudo/issues/1202 On 2017-10-15 03:14:02, c...@zoffix.com wrote: > On Wed, 02 Nov 2016 07:13:26 -0700, jn...@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.
[perl #129787] [CONC] die/CATCH inside a start-block with a channel heisenbugs
On Wed, 02 Nov 2016 07:13:26 -0700, jn...@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.
[perl #129787] [CONC] die/CATCH inside a start-block with a channel heisenbugs
On Wed, 02 Nov 2016 07:13:26 -0700, jn...@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.
[perl #129787] [CONC] die/CATCH inside a start-block with a channel heisenbugs
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