Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in await: Cannot invoke this object (REPR: Null; VMNull) #5624

Closed
p6rt opened this issue Aug 29, 2016 · 13 comments
Closed

in await: Cannot invoke this object (REPR: Null; VMNull) #5624

p6rt opened this issue Aug 29, 2016 · 13 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 29, 2016

Migrated from rt.perl.org#129120 (status was 'resolved')

Searchable as RT129120$

@p6rt
Copy link
Author

p6rt commented Aug 29, 2016

From @zoffixznet

On occasion, I get this error when trying to run the bellow program on a 32-core box​:

$ time RAKUDO_MAX_THREADS=40 perl6 foo.p6
Cannot invoke this object (REPR​: Null; VMNull)
  in block <unit> at foo.p6 line 9

sub what-is {
  return $^num.is-prime ?? "$num is prime" !! "$num is not prime";
}

my @​results;
for 3¹²³⁴⁵ … 3¹²³⁴⁵+127 -> $n {
  @​results.push​: start what-is $n;
}
print await @​results;

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

From @jnthn

On Sun Aug 28 20​:09​:29 2016, cpan@​zoffix.com wrote​:

On occasion, I get this error when trying to run the bellow program on
a 32-core box​:

$ time RAKUDO_MAX_THREADS=40 perl6 foo.p6
Cannot invoke this object (REPR​: Null; VMNull)
in block <unit> at foo.p6 line 9

sub what-is {
return $^num.is-prime ?? "$num is prime" !! "$num is not prime";
}

my @​results;
for 3¹²³⁴⁵ … 3¹²³⁴⁵+127 -> $n {
@​results.push​: start what-is $n;
}
print await @​results;

I've fiddled with it a bit, but had trouble getting this to blow on my much-less-core-endowed box. Guess I can leave it running in a loop while I take lunch or something... :-)

Any chance you could​:

1) Run it with `--ll-exception`
2) Stick a CATCH block in the sub that does `.backtrace.full.say` or similar, to see if we get any more details output there

Thanks!

/jnthn

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

From @zhuomingliang

On Wed Aug 31 02​:58​:50 2016, jnthn@​jnthn.net wrote​:

On Sun Aug 28 20​:09​:29 2016, cpan@​zoffix.com wrote​:

On occasion, I get this error when trying to run the bellow program
on
a 32-core box​:

$ time RAKUDO_MAX_THREADS=40 perl6 foo.p6
Cannot invoke this object (REPR​: Null; VMNull)
in block <unit> at foo.p6 line 9

sub what-is {
return $^num.is-prime ?? "$num is prime" !! "$num is not prime";
}

my @​results;
for 3¹²³⁴⁵ … 3¹²³⁴⁵+127 -> $n {
@​results.push​: start what-is $n;
}
print await @​results;

I've fiddled with it a bit, but had trouble getting this to blow on my
much-less-core-endowed box. Guess I can leave it running in a loop
while I take lunch or something... :-)

Any chance you could​:

1) Run it with `--ll-exception`
2) Stick a CATCH block in the sub that does `.backtrace.full.say` or
similar, to see if we get any more details output there

Thanks!

/jnthn

RAKUDO_MAX_THREADS=40 ./perl6-m --ll-exception test.pl6
Cannot invoke this object (REPR​: Null; VMNull)
  at gen/moar/m-CORE.setting​:24103 (././CORE.setting.moarvm​:throw)
from gen/moar/m-CORE.setting​:35537 (././CORE.setting.moarvm​:result)
from gen/moar/m-CORE.setting​:37594 (././CORE.setting.moarvm​:await)
from gen/moar/m-CORE.setting​:37586 (././CORE.setting.moarvm​:await)
from gen/moar/m-CORE.setting​:37593 (././CORE.setting.moarvm​:)
from gen/moar/m-CORE.setting​:4825 (././CORE.setting.moarvm​:push-all)
from gen/moar/m-CORE.setting​:2696 (././CORE.setting.moarvm​:push-until-lazy)
from gen/moar/m-CORE.setting​:16028 (././CORE.setting.moarvm​:reify-until-lazy)
from gen/moar/m-CORE.setting​:17073 (././CORE.setting.moarvm​:join)
from gen/moar/m-CORE.setting​:16292 (././CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:1359 (././CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:14490 (././CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:1359 (././CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:29883 (././CORE.setting.moarvm​:print)
from gen/moar/m-CORE.setting​:29879 (././CORE.setting.moarvm​:print)
from test.pl6​:4 (<ephemeral file>​:<unit>)
from test.pl6​:1 (<ephemeral file>​:<unit-outer>)
from gen/moar/stage2/NQPHLL.nqp​:1519 (/home/cloud/OpenSource/rakudo/../MoarVM/install/share/nqp/lib/NQPHLL.moarvm​:eval)
from gen/moar/stage2/NQPHLL.nqp​:1722 (/home/cloud/OpenSource/rakudo/../MoarVM/install/share/nqp/lib/NQPHLL.moarvm​:evalfiles)
from gen/moar/stage2/NQPHLL.nqp​:1616 (/home/cloud/OpenSource/rakudo/../MoarVM/install/share/nqp/lib/NQPHLL.moarvm​:command_eval)
from src/Perl6/Compiler.nqp​:27 (./blib/Perl6/Compiler.moarvm​:command_eval)
from gen/moar/stage2/NQPHLL.nqp​:1590 (/home/cloud/OpenSource/rakudo/../MoarVM/install/share/nqp/lib/NQPHLL.moarvm​:command_line)
from gen/moar/m-main.nqp​:47 (/home/cloud/OpenSource/rakudo/perl6.moarvm​:MAIN)
from gen/moar/m-main.nqp​:38 (/home/cloud/OpenSource/rakudo/perl6.moarvm​:<mainline>)
from <unknown>​:1 (/home/cloud/OpenSource/rakudo/perl6.moarvm​:<main>)
from <unknown>​:1 (/home/cloud/OpenSource/rakudo/perl6.moarvm​:<entry>)

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

From @zhuomingliang

On Wed Aug 31 03​:13​:40 2016, jimmy wrote​:

On Wed Aug 31 02​:58​:50 2016, jnthn@​jnthn.net wrote​:

On Sun Aug 28 20​:09​:29 2016, cpan@​zoffix.com wrote​:

On occasion, I get this error when trying to run the bellow program
on
a 32-core box​:

$ time RAKUDO_MAX_THREADS=40 perl6 foo.p6
Cannot invoke this object (REPR​: Null; VMNull)
in block <unit> at foo.p6 line 9

sub what-is {
return $^num.is-prime ?? "$num is prime" !! "$num is not
prime";
}

my @​results;
for 3¹²³⁴⁵ … 3¹²³⁴⁵+127 -> $n {
@​results.push​: start what-is $n;
}
print await @​results;

I've fiddled with it a bit, but had trouble getting this to blow on
my
much-less-core-endowed box. Guess I can leave it running in a loop
while I take lunch or something... :-)

Any chance you could​:

1) Run it with `--ll-exception`
2) Stick a CATCH block in the sub that does `.backtrace.full.say` or
similar, to see if we get any more details output there

Thanks!

/jnthn

RAKUDO_MAX_THREADS=40 ./perl6-m --ll-exception test.pl6
Cannot invoke this object (REPR​: Null; VMNull)
at gen/moar/m-CORE.setting​:24103 (././CORE.setting.moarvm​:throw)
from gen/moar/m-CORE.setting​:35537 (././CORE.setting.moarvm​:result)
from gen/moar/m-CORE.setting​:37594 (././CORE.setting.moarvm​:await)
from gen/moar/m-CORE.setting​:37586 (././CORE.setting.moarvm​:await)
from gen/moar/m-CORE.setting​:37593 (././CORE.setting.moarvm​:)
from gen/moar/m-CORE.setting​:4825 (././CORE.setting.moarvm​:push-all)
from gen/moar/m-CORE.setting​:2696 (././CORE.setting.moarvm​:push-
until-lazy)
from gen/moar/m-CORE.setting​:16028 (././CORE.setting.moarvm​:reify-
until-lazy)
from gen/moar/m-CORE.setting​:17073 (././CORE.setting.moarvm​:join)
from gen/moar/m-CORE.setting​:16292 (././CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:1359 (././CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:14490 (././CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:1359 (././CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:29883 (././CORE.setting.moarvm​:print)
from gen/moar/m-CORE.setting​:29879 (././CORE.setting.moarvm​:print)
from test.pl6​:4 (<ephemeral file>​:<unit>)
from test.pl6​:1 (<ephemeral file>​:<unit-outer>)
from gen/moar/stage2/NQPHLL.nqp​:1519
(/home/cloud/OpenSource/rakudo/../MoarVM/install/share/nqp/lib/NQPHLL.moarvm​:eval)
from gen/moar/stage2/NQPHLL.nqp​:1722
(/home/cloud/OpenSource/rakudo/../MoarVM/install/share/nqp/lib/NQPHLL.moarvm​:evalfiles)
from gen/moar/stage2/NQPHLL.nqp​:1616
(/home/cloud/OpenSource/rakudo/../MoarVM/install/share/nqp/lib/NQPHLL.moarvm​:command_eval)
from src/Perl6/Compiler.nqp​:27
(./blib/Perl6/Compiler.moarvm​:command_eval)
from gen/moar/stage2/NQPHLL.nqp​:1590
(/home/cloud/OpenSource/rakudo/../MoarVM/install/share/nqp/lib/NQPHLL.moarvm​:command_line)
from gen/moar/m-main.nqp​:47
(/home/cloud/OpenSource/rakudo/perl6.moarvm​:MAIN)
from gen/moar/m-main.nqp​:38
(/home/cloud/OpenSource/rakudo/perl6.moarvm​:<mainline>)
from <unknown>​:1 (/home/cloud/OpenSource/rakudo/perl6.moarvm​:<main>)
from <unknown>​:1
(/home/cloud/OpenSource/rakudo/perl6.moarvm​:<entry>)

FYI, I got it from a ubuntu 14.04 linux VM box with 4 cores.

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

From @nwc10

On Wed, Aug 31, 2016 at 02​:58​:50AM -0700, jnthn@​jnthn.net via RT wrote​:

On Sun Aug 28 20​:09​:29 2016, cpan@​zoffix.com wrote​:

On occasion, I get this error when trying to run the bellow program on
a 32-core box​:

$ time RAKUDO_MAX_THREADS=40 perl6 foo.p6
Cannot invoke this object (REPR​: Null; VMNull)
in block <unit> at foo.p6 line 9

I've fiddled with it a bit, but had trouble getting this to blow on my much-less-core-endowed box. Guess I can leave it running in a loop while I take lunch or something... :-)

"my" machine has almost as many cores. I can get it to bomb at times.
(ASAN makes no comment)

Any chance you could​:

1) Run it with `--ll-exception`
2) Stick a CATCH block in the sub that does `.backtrace.full.say` or similar, to see if we get any more details output there

You mean like this?

sub what-is {
  CATCH { .backtrace.full.say }
  return $^num.is-prime ?? "$num is prime" !! "$num is not prime";
}
my @​results;
for 3¹²³⁴⁵ … 3¹²³⁴⁵+127 -> $n {
  @​results.push​: start what-is $n;
}
print await @​results;

I got this​:

Cannot invoke this object (REPR​: Null; VMNull)
  in block <unit> at 129120.pl line 9

Line 9 is `print await @​results;`

What do I need to do better, to get actual useful details?

Nicholas Clark

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

From @zoffixznet

Attached 'backtrace-original.txt' is the output from the added CATCH and --ll-exception.

I was able to golf it down to this​:

  await do for 3¹²³⁴⁵ … 3¹²³⁴⁵+127 -> $num {
  start $num.is-prime ?? "$num is prime" !! "$num is not prime";;
  }
  CATCH { .backtrace.full.say }

And that backtrace is also attached (backtrace-golfed.txt).

I tried replacing .is-prime with a bcrypt hashing, but was unable to produce the crash in about 8 runs​:

  use Crypt​::Bcrypt;
  await do for 3¹²³⁴⁵ … 3¹²³⁴⁵+127 -> $num {
  start bcrypt-hash ~$num, :15rounds;
  }
  CATCH { .backtrace.full.say }

So then I went back to my golfed version and removed the ternary operator... Couldn't reproduce anything in about 10 runs. Added a ternary as `?? 1 !! 2`, still couldn't reproduce anything, Changed the ternary to this​:

  await do for 3¹²³⁴⁵ … 3¹²³⁴⁵+127 -> $num {
  start $num.is-prime ?? "$num is this" !! "$num is that";
  }
  CATCH { .backtrace.full.say }

... and it crashed the first time I ran it (backtrace-changed-ternary.txt attached) and then 1 more time in the next out of 7 runs.

It may of course be just a coincidence, but these are my results

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

From @zoffixznet

  in method throw at gen/moar/m-CORE.setting line 24125
  in method result at gen/moar/m-CORE.setting line 35512
  in sub await at gen/moar/m-CORE.setting line 37569
  in block at gen/moar/m-CORE.setting line 37568
  in block at gen/moar/m-CORE.setting line 4845
  in method sink-all at gen/moar/m-CORE.setting line 4831
  in method sink at gen/moar/m-CORE.setting line 14540
  in block <unit> at test.p6 line 1

Cannot invoke this object (REPR​: Null; VMNull)
  at gen/moar/m-CORE.setting​:24125 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:throw)
from gen/moar/m-CORE.setting​:35512 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:result)
from gen/moar/m-CORE.setting​:37569 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:await)
from gen/moar/m-CORE.setting​:37568 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:)
from gen/moar/m-CORE.setting​:4845 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:)
from gen/moar/m-CORE.setting​:4831 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:sink-all)
from gen/moar/m-CORE.setting​:14540 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:sink)
from test.p6​:1 (<ephemeral file>​:<unit>)
from test.p6​:1 (<ephemeral file>​:<unit-outer>)
from gen/moar/stage2/NQPHLL.nqp​:1519 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:eval)
from gen/moar/stage2/NQPHLL.nqp​:1722 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:evalfiles)
from gen/moar/stage2/NQPHLL.nqp​:1616 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:command_eval)
from src/Perl6/Compiler.nqp​:27 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Compiler.moarvm​:command_eval)
from gen/moar/stage2/NQPHLL.nqp​:1590 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:command_line)
from gen/moar/m-main.nqp​:47 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:MAIN)
from gen/moar/m-main.nqp​:38 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:<mainline>)
from <unknown>​:1 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:<main>)
from <unknown>​:1 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:<entry>)

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

From @zoffixznet

cpan@​perlbuild2​:/tmp/tmp.AY07p77AqM$ RAKUDO_MAX_THREADS=40 perl6 --ll-exception test.p6
  in method throw at gen/moar/m-CORE.setting line 24125
  in method result at gen/moar/m-CORE.setting line 35512
  in sub await at gen/moar/m-CORE.setting line 37569
  in block at gen/moar/m-CORE.setting line 37568
  in block at gen/moar/m-CORE.setting line 4845
  in method sink-all at gen/moar/m-CORE.setting line 4831
  in method sink at gen/moar/m-CORE.setting line 14540
  in block <unit> at test.p6 line 1

Cannot invoke this object (REPR​: Null; VMNull)
  at gen/moar/m-CORE.setting​:24125 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:throw)
from gen/moar/m-CORE.setting​:35512 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:result)
from gen/moar/m-CORE.setting​:37569 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:await)
from gen/moar/m-CORE.setting​:37561 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:await)
from gen/moar/m-CORE.setting​:37568 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:)
from gen/moar/m-CORE.setting​:4845 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:)
from gen/moar/m-CORE.setting​:4831 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:sink-all)
from gen/moar/m-CORE.setting​:14540 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:sink)
from test.p6​:1 (<ephemeral file>​:<unit>)
from test.p6​:1 (<ephemeral file>​:<unit-outer>)
from gen/moar/stage2/NQPHLL.nqp​:1519 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:eval)
from gen/moar/stage2/NQPHLL.nqp​:1722 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:evalfiles)
from gen/moar/stage2/NQPHLL.nqp​:1616 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:command_eval)
from src/Perl6/Compiler.nqp​:27 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Compiler.moarvm​:command_eval)
from gen/moar/stage2/NQPHLL.nqp​:1590 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:command_line)
from gen/moar/m-main.nqp​:47 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:MAIN)
from gen/moar/m-main.nqp​:38 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:<mainline>)
from <unknown>​:1 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:<main>)
from <unknown>​:1 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:<entry>)

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

From @zoffixznet

cpan@​perlbuild2​:/tmp/tmp.AY07p77AqM$ RAKUDO_MAX_THREADS=40 perl6 --ll-exception test.p6
Cannot invoke this object (REPR​: Null; VMNull)
  at gen/moar/m-CORE.setting​:24125 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:throw)
from gen/moar/m-CORE.setting​:35512 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:result)
from gen/moar/m-CORE.setting​:37569 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:await)
from gen/moar/m-CORE.setting​:37568 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:)
from gen/moar/m-CORE.setting​:4800 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:push-all)
from gen/moar/m-CORE.setting​:2681 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:push-until-lazy)
from gen/moar/m-CORE.setting​:16050 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:reify-until-lazy)
from gen/moar/m-CORE.setting​:17095 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:join)
from gen/moar/m-CORE.setting​:16314 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:1345 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:14512 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:1345 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:Str)
from gen/moar/m-CORE.setting​:29905 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:print)
from gen/moar/m-CORE.setting​:29901 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm​:print)
from test.p6​:9 (<ephemeral file>​:<unit>)
from test.p6​:1 (<ephemeral file>​:<unit-outer>)
from gen/moar/stage2/NQPHLL.nqp​:1519 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:eval)
from gen/moar/stage2/NQPHLL.nqp​:1722 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:evalfiles)
from gen/moar/stage2/NQPHLL.nqp​:1616 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:command_eval)
from src/Perl6/Compiler.nqp​:27 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Compiler.moarvm​:command_eval)
from gen/moar/stage2/NQPHLL.nqp​:1590 (/home/cpan/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm​:command_line)
from gen/moar/m-main.nqp​:47 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:MAIN)
from gen/moar/m-main.nqp​:38 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:<mainline>)
from <unknown>​:1 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:<main>)
from <unknown>​:1 (/home/cpan/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm​:<entry>)

@p6rt
Copy link
Author

p6rt commented Aug 31, 2016

From @jnthn

On Wed Aug 31 04​:31​:25 2016, nicholas wrote​:

"my" machine has almost as many cores. I can get it to bomb at times.
(ASAN makes no comment)

Yeah, I'm guessing it's a slightly higher level data race due to mis-code-gen rather than any kind of memory corruption.

Any chance you could​:

1) Run it with `--ll-exception`
2) Stick a CATCH block in the sub that does `.backtrace.full.say` or
similar, to see if we get any more details output there

You mean like this?

sub what-is {
CATCH { .backtrace.full.say }
return $^num.is-prime ?? "$num is prime" !! "$num is not prime";
}
my @​results;
for 3¹²³⁴⁵ … 3¹²³⁴⁵+127 -> $n {
@​results.push​: start what-is $n;
}
print await @​results;

Yes, that's what I meant.

I got this​:

Cannot invoke this object (REPR​: Null; VMNull)
in block <unit> at 129120.pl line 9

Line 9 is `print await @​results;`

What do I need to do better, to get actual useful details?

Well, that's information in and that it means the exception is not happening inside of the sub `what-is`. Unfortunately, the only thing between the two is the stuff in CORE.setting implementing promises and scheduling, which means it's probably a very occasional race somewhere in there. Probably instrumenting the bit of MoarVM that spits out that error to dump a backtrace before throwing is the easiest next thing to do.

I'll see if I can recreate it locally outside of my VM.

/jnthn

@p6rt
Copy link
Author

p6rt commented Nov 30, 2016

From @zoffixznet

Ran for 83 times, not a single crash. Closing.

On Wed, 31 Aug 2016 05​:49​:09 -0700, jnthn@​jnthn.net wrote​:

On Wed Aug 31 04​:31​:25 2016, nicholas wrote​:

"my" machine has almost as many cores. I can get it to bomb at times.
(ASAN makes no comment)

Yeah, I'm guessing it's a slightly higher level data race due to mis-
code-gen rather than any kind of memory corruption.

Any chance you could​:

1) Run it with `--ll-exception`
2) Stick a CATCH block in the sub that does `.backtrace.full.say`
or
similar, to see if we get any more details output there

You mean like this?

sub what-is {
CATCH { .backtrace.full.say }
return $^num.is-prime ?? "$num is prime" !! "$num is not prime";
}
my @​results;
for 3¹²³⁴⁵ … 3¹²³⁴⁵+127 -> $n {
@​results.push​: start what-is $n;
}
print await @​results;

Yes, that's what I meant.

I got this​:

Cannot invoke this object (REPR​: Null; VMNull)
in block <unit> at 129120.pl line 9

Line 9 is `print await @​results;`

What do I need to do better, to get actual useful details?

Well, that's information in and that it means the exception is not
happening inside of the sub `what-is`. Unfortunately, the only thing
between the two is the stuff in CORE.setting implementing promises and
scheduling, which means it's probably a very occasional race somewhere
in there. Probably instrumenting the bit of MoarVM that spits out that
error to dump a backtrace before throwing is the easiest next thing to
do.

I'll see if I can recreate it locally outside of my VM.

/jnthn

@p6rt
Copy link
Author

p6rt commented Nov 30, 2016

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Nov 30, 2016
@p6rt p6rt added the conc label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant