Skip Menu |
Report information
Id: 128896
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: elizabeth <liz [at]>

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Date: Thu, 11 Aug 2016 15:57:33 +0200
To: rakudobug [...]
Subject: Punning a role in a different thread a bit fragile
From: Elizabeth Mattijsen <liz [...]>
[15:08:49] <lizmat> apart from a flapper on t/spec/S17-promise/start.t that I haven't had in a *long* time now, it seems ok [15:09:25] <jnthn> ...oh admmit :( [15:09:41] <jnthn> That's going to be a darn nightmare to find if it still flaps because it didn't fail in 100 runs yesterday. [15:09:51] lizmat runs it again [15:11:13] <lizmat> jnthn: You planned 47 tests but ran 17 so it actually crashed [15:12:10] <lizmat> Cannot invoke this object (REPR: Null; VMNull) [15:12:10] <lizmat> in block <unit> at t/spec/S17-promise/start.t line 70 [15:14:42] <lizmat> # full stack trace [15:14:51] <lizmat> jnthn: ^^^ [15:16:51] <jnthn> hmm... Thanks. [15:18:52] <lizmat> m: say await start $/ # perhaps related ? [15:18:52] <camelia> rakudo-moar 76be77: OUTPUT«WARNINGS for <tmp>:␤Useless use of $/ in sink context (line 1)␤Nil␤» [15:21:56] <lizmat> jnthn: looks like "my @got = await do for 1..5 { start { } }" is where it goes wrong, if it goes wrong [15:25:19] <lizmat> jnthn: datapoint: removing the warnings still makes it crash occasionally ( I would say 1/30 with a fully loaded machine) [15:27:09] <jnthn> lizmat: And the above in a loop does it? :) [15:27:25] <lizmat> jnthn: another datapoint: if the start uses a thunk, instead of a block, it also crashes 1/30 [15:27:43] <lizmat> jnthn: I was running the test-file in a loop [15:27:53] <lizmat> I'll try running that piece of code in a loop now [15:27:57] <jnthn> ah, OK. Guess I got lucky 100 times :S [15:28:11] <lizmat> or OSX is more picky or something [15:29:11] <jnthn> OSX is good at shaking these things out, yes [15:29:31] <lizmat> for ^100000 { my @got = await do for 1..5 { start { } } } # doesn't crash, runs for 33 secs [15:29:50] <lizmat> so it feels like some test before it is messing things up [15:36:39] <lizmat> jnthn: not so nice datapoint: removing all the tests before the one that crashees every now and then [15:36:57] <lizmat> makes it *still* crash, but it feels like the chance of it is a lot smaller [15:37:11] <lizmat> more like 1/60 or so [15:41:43] <lizmat> jnthn: can no longer make it crash when changing the "" to "42" [15:42:01] <lizmat> jnthn: so it feels like some / start interaction [15:45:02] <ShimmerFairy> lizmat: just thought of this: what about Buf instead of buf8? [15:45:29] <lizmat> ShimmerFairy: actually,it seems related to the auto-punning of the buf8 role [15:45:52] <ShimmerFairy> ah [15:45:58] <lizmat> jnthn: if I put back the "", and add another "my $b =" before it, I can't get it to crash [15:46:16] <lizmat> jnthn: so it feels like punning a role into a class from a different thread, is not quite ok [15:48:14] <jnthn> lizmat: I thought that'd been fixed, but yeah, it's quite an involved process so worth a look [15:51:27] <lizmat> jnthn: should I rakudobug this conversation ? [15:53:43] <jnthn> lizmat: Please. I suspect I'll be writing a mildly boring document the rest of today, and I'm meant to take tomorrow off-ish to relax :)

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at