[perl #125648] [BUG] :11 isn't a parse error in a regex in Rakudo

2015-07-20 Thread Carl Mäsak
# New Ticket Created by  Carl Mäsak 
# Please include the string:  [perl #125648]
# in the subject line of all future correspondence about this issue. 
# URL: https://rt.perl.org/Ticket/Display.html?id=125648 


TimToady m: say '00:11:22' ~~ /00:11:22/
camelia rakudo-moar f90dfc: OUTPUT«Nil␤»
masak that ought to at least warn...
TimToady std: say '00:11:22' ~~ /00:11:22/
camelia std 28329a7: OUTPUT«===SORRY!===␤Unrecognized regex modifier
:11 [...] Check failed␤FAILED …»
masak right.
* masak submits rakudobug


[perl #125651] Proc::Async has some LTA behavior when running an unknown command

2015-07-20 Thread via RT
# New Ticket Created by  Rob Hoelz 
# Please include the string:  [perl #125651]
# in the subject line of all future correspondence about this issue. 
# URL: https://rt.perl.org/Ticket/Display.html?id=125651 


See the attached script.

If you create a Proc::Async to execute an unknown command and try to write data 
for the child process' standard input, Rakudo will exit via a SIGPIPE signal.  
If you remove the $proc.write from the attached script, you get an LTA error 
message:

===SORRY!===
no such file or directory
use v6;

my $proc = Proc::Async.new('cat-foo', :w);
my $p = $proc.start;
$proc.write: 'hello'.encode;
$proc.close-stdin;
await $p;
say 'done';


[perl #125652] Proc::Async.stdout doesn't work with CurrentThreadScheduler

2015-07-20 Thread via RT
# New Ticket Created by  Rob Hoelz 
# Please include the string:  [perl #125652]
# in the subject line of all future correspondence about this issue. 
# URL: https://rt.perl.org/Ticket/Display.html?id=125652 


See the attached script.use v6;

my $*SCHEDULER = CurrentThreadScheduler;
my $proc = Proc::Async.new('cat', :w);
$proc.stdout.tap(- $s {
say  $s;
});
my $p = $proc.start;
$proc.write: 'hello'.encode;
$proc.close-stdin;
await $p;
say 'done';


[perl #125653] A promise returned by Proc::Async.start will never be kept or broken if the process is killed by the current process

2015-07-20 Thread via RT
# New Ticket Created by  Rob Hoelz 
# Please include the string:  [perl #125653]
# in the subject line of all future correspondence about this issue. 
# URL: https://rt.perl.org/Ticket/Display.html?id=125653 


See the attached script.use v6;

my $proc = Proc::Async.new('sleep', '5');
my $p = $proc.start;
$proc.kill;
await $p;


[perl #125654] Killing a Proc::Async doesn't seem to clean up its file descriptors, causing an abort() from libuv

2015-07-20 Thread via RT
# New Ticket Created by  Rob Hoelz 
# Please include the string:  [perl #125654]
# in the subject line of all future correspondence about this issue. 
# URL: https://rt.perl.org/Ticket/Display.html?id=125654 


See the attached script.

Removing :w from the call to Proc::Async.new or the tap on $proc.stdout 
prevents this behavior.

When I set a file descriptor limit of 150 via ulimit, Rakudo abort()s after 
about 60 iterations.use v6;

my @procs;
my @promises;

for ^1000 {
.say;
if @procs {
@procs[*-1].kill;
}

my $proc = Proc::Async.new('sleep', '20', :w);
$proc.stdout.tap(- $ {});
@promises.push: $proc.start;
@procs.push: $proc;
}

await @promises;


[perl #125655] Garbage collected running Proc::Async objects don't seem to clean up their handles, causing libuv to abort()

2015-07-20 Thread via RT
# New Ticket Created by  Rob Hoelz 
# Please include the string:  [perl #125655]
# in the subject line of all future correspondence about this issue. 
# URL: https://rt.perl.org/Ticket/Display.html?id=125655 


See the attached script.

This is similar to https://rt.perl.org/Ticket/Display.html?id=125654use v6;
use nqp;

for ^1000 {
.say;

my $proc = Proc::Async.new('sleep', '20', :w);
$proc.stdout.tap(- $ {});
$proc.start;

nqp::force_gc();
}

say 'done';


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

2015-07-20 Thread via RT
# New Ticket Created by  Rob Hoelz 
# Please include the string:  [perl #125656]
# in the subject line of all future correspondence about this issue. 
# URL: https://rt.perl.org/Ticket/Display.html?id=125656 


See the attached script.use v6;

my @procs;

for ^1000 {
.say;

my $proc = Proc::Async.new('sleep', '20', :w);
$proc.stdout.tap(- $ {});
$proc.start;

@procs.push: $proc;
}

say 'done';


[perl #125657] Rethrowing of exceptions by print_exception in src/core/Exception.pm doesn't preserve stacktrace

2015-07-20 Thread via RT
# New Ticket Created by  Rob Hoelz 
# Please include the string:  [perl #125657]
# in the subject line of all future correspondence about this issue. 
# URL: https://rt.perl.org/Ticket/Display.html?id=125657 


For an example, see the attached script.

I understand that if the if $! { ... } block is hit, there's a limited amount 
of work that can be done, but I think we could probably go out of our way to 
get the backtrace where the exception happened more often so that's what the 
user sees.my class BadException is Exception {
method gist {
die 'nope';
}
}

sub baz {
BadException.new.throw;
}

sub bar {
baz();
}

sub foo {
bar();
}

foo();