[perl #132287] [REGRESSION][CONC] stall/block in async heavy code

2017-10-13 Thread Nick Logan via RT
RAKUDO_SCHEDULER_DEBUG=1 perl6-gdb-m --ll-exception -e 'while 1 { use 
v6.d.PREVIEW; my %c = (:0reactor_count); my $s = supply { whenever 
IO::Socket::Async.listen("0.0.0.0", 5000) -> $c-conn { %c{$c-conn}++; emit 
$c-conn; %c{$c-conn} = Supplier.new; $c-conn.Supply.lines.tap({ 
%c{$c-conn}.emit: $_ }); } }; sub start_reactor ($msgs-in) { 
start { react whenever $msgs-in -> $msg-in { say "before"; say QX("echo foo"); 
say "after"; %c++; } } }; start { react whenever $s -> $c-conn { 
start { start_reactor(%c{$c-conn}.Supply); } } }; sleep 1; my $c 
= await IO::Socket::Async.connect("0.0.0.0", 5000); await $c.print("foo\n"); 
sleep 1; }'

Eventually prints out (for me):

Unhandled exception in code scheduled on thread 4
Too few positionals passed; expected 6 arguments but got 2
  in block  at SETTING::src/core/IO/Socket/Async.pm line 151
  in block  at SETTING::src/core/ThreadPoolScheduler.pm line 225
  in block  at SETTING::src/core/ThreadPoolScheduler.pm line 224
  in method run-one at SETTING::src/core/ThreadPoolScheduler.pm line 224
  in method dispatch: at SETTING::src/core/Mu.pm line 732
  in block  at SETTING::src/core/ThreadPoolScheduler.pm line 258


[perl #132042] [CONC] rakudo hangs while concurrently walking trees

2017-09-08 Thread Nick Logan via RT
Resolved with 
https://github.com/MoarVM/MoarVM/commit/32322f393365c235807d69f54370caa64c3a31fb
 but not sure how to write a test for deadlocks


[perl #132042] [BUG] rakudo hangs while concurrently walking trees

2017-09-06 Thread Nick Logan via RT
On Wed, 06 Sep 2017 13:46:15 -0700, j.david.l...@apple.com wrote:
> This short program hangs indefinitely on my system (after making
> progress.) Tuning the number of threads and number of iterations can
> change how reliably it hangs (down to 'never' when the number of
> threads is < 3, for me.)
> 
> ```
> #!/usr/bin/env perl6
> 
> use v6.c;
> 
> await (^6).map: -> $t {
>start {
>   for (^500) -> $i {
>  my $current = %( 1 => %( 2 => %( 3 => %() ) ) );
>  my $index = 1;
>  while $current{$index}:exists {
> say "$t $i $index";
> $current = $current{$index};
> ++$index;
>  }
>   }
>}
> }
> ```
> 
> ... this is a distilled version of some tree-walking code that's
> misbehaving for me IRL. It's possible that I'm doing something naughty
> here, but I don't see how. Am I missing something? (I can eliminate
> the deadlock by Lock.protect-ing the inner while loop, FWIW... but I
> don't see why that should be necessary.)
> 
> More information:
> 
> ```
> $ perl6 --version
> This is Rakudo version 2017.07 built on MoarVM version 2017.07
> implementing Perl 6.c.
> ```
This can be golfed to:

my $foo = 0; for ^5 { start { say $foo++ } };

Rakudo 2017.03 or earlier does not have this issue. You can also remove the 
`say` from the examples and they do not have this issue.

gdb output:
https://gist.github.com/ugexe/cf2350b4bd5ed58e3a8f6e049df1432f

irc discussion:
https://irclog.perlgeek.de/perl6-dev/2017-09-06#i_15127640


[perl #131375] [BUG] error initializing large array on Windows (64-bit)

2017-08-24 Thread Nick Logan via RT
Largest I can initialize is 16777216.

https://stackoverflow.com/questions/12596695/why-does-a-float-variable-stop-incrementing-at-16777216-in-c


[perl #130883] problem with RESOURCES and PERL6LIB env variable

2017-07-17 Thread Nick Logan via RT
The %?RESOURCES bug was fixed in: https://github.com/rakudo/rakudo/pull/1106


[perl #129247] [CONC][BUG] Wait on a Supply after begin tap is hanging

2017-07-13 Thread Nick Logan via RT
Resolved in: https://github.com/rakudo/rakudo/commit/32b72cd

Tests: https://github.com/perl6/roast/commit/927b026


[perl #130919] [CONC] Supplier.done is only handled by first tap

2017-07-13 Thread Nick Logan via RT
Resolved in: https://github.com/rakudo/rakudo/commit/32b72cd

Tests: https://github.com/perl6/roast/commit/927b026


[perl #125656] [CONC] Creating too many Proc::Async objects fills the file descriptor table, which causes libuv to abort()

2017-07-12 Thread Nick Logan via RT
This only applies if you call .stdout or .stderr *and* never close them.


[perl #125757] shell().exitcode is always 0 when :out is used

2017-07-12 Thread Nick Logan via RT
This has been resolved since 2017.06


[perl #128594] [SEGV] attempting to use :merge when run()ning an external command causes a core dump

2017-07-12 Thread Nick Logan via RT
Resolved in https://github.com/rakudo/rakudo/commit/c86090e

`perl6 -e 'run("ls", :merge).out.slurp.say'`


[perl #131510] [SEGV] Segfault when `-Ilib` while running a file that does `use lib ` and loads some modules

2017-07-12 Thread Nick Logan via RT
This appears to be resolved - possibly in 
https://github.com/rakudo/rakudo/commit/37250ed5ebc3d25eae656ddfa19187c90a712e3c


[perl #128553] multi method cache causes Base64 regression

2016-07-17 Thread Nick Logan via RT
On Sat Jul 09 07:13:48 2016, jn...@jnthn.net wrote:
> On Tue Jul 05 17:51:46 2016, ug...@cpan.org wrote:
> > Note that the final decode-base64 candidate shows the correct results
> > when debugging statements are added
> >
> > This gist also shows a small change that makes it produce the correct
> > values but it still segfaults more often than not
> > https://gist.github.com/ugexe/baa168a641894a0731595c812724f76d
> 
> Having dug into it a little, I'm not sure that the new multi-caching
> stuff has caused this, so much as uncovered it (perhaps by moving GC
> collection points

You are right. I golfed it down to the following gist which does not use multi 
methods:
https://gist.github.com/ugexe/7ce08d3ad4cfd36f275c437ba9713471

In the gist comments there is also a link to the bisect output, but for brevity:
bisect output: 
https://gist.github.com/Whateverable/e0a28162b19f601616aa8776f24dd027
rakudo commit: https://github.com/rakudo/rakudo/commit/5581b24




[perl #128553] multi method cache causes Base64 regression

2016-07-05 Thread Nick Logan via RT
Note that the final decode-base64 candidate shows the correct results when 
debugging statements are added

This gist also shows a small change that makes it produce the correct values 
but it still segfaults more often than not
https://gist.github.com/ugexe/baa168a641894a0731595c812724f76d


[perl #126529] [JVM] Buf.pm infix:<~> bug; breaks IO::Socket

2015-11-06 Thread Nick Logan via RT
On Sat Oct 31 19:42:22 2015, ug...@cpan.org wrote:
> Using `$Blob1 ~= $Blob2` on jvm gives an error of
> "java.lang.RuntimeException: This type does not support positional
> operations"
> 
> To reproduce: `my Blob $a = "a".encode; my Blob $b = "b".encode; $a ~=
> $b; say $a.perl;`
> 
> I added debug prints but the output makes it appear that it should
> work:
> https://gist.github.com/ugexe/8a83f69fdb81bf989377
> 
> The above basically boils down to `nqp::splice(utf8.new(),
> utf8.new(97), 0, 1)` but when I call this manually it works fine.

Resolved in 
https://github.com/rakudo/rakudo/commit/d273e916d6cf3b1af3c3d7906ade7120c92bc6c5



[perl #125758] OSX `await` not waiting for Planned promise

2015-08-06 Thread Nick Logan via RT
I should mention regarding the gist above:
$promise = $.start-processes