Skip Menu |
Report information
Id: 132226
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: j.david.lowe [at] gmail.com
Cc:
AdminCc:

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



Subject: "impossible" undefined value in concurrent ENTER phasers
From: David Lowe <j.david.lowe [...] gmail.com>
Date: Thu, 5 Oct 2017 21:38:36 -0700
To: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 2.1k
This program dies after a short but inconsistent run:

```
#!/usr/bin/env perl6

use v6.c;

await (^12).map: {
   start {
      for (^100) {
         with %(:obj(%(:i(1)))) -> (:$obj) {
            ENTER { $obj<i> }
         }
      }
   }
}
```

... the exception is:

```
    Cannot resolve caller postcircumfix:<{ }>(Mu, Str); none of these signatures match:
        (\SELF, \key)
        (\SELF, \key, Mu \ASSIGN)
        (\SELF, \key, Mu :$BIND! is raw)
        (\SELF, \key, :$delete!, *%other)
        (\SELF, \key, :$exists!, *%other)
        (\SELF, \key, :$kv!, *%other)
        (\SELF, \key, :$p!, *%other)
        (\SELF, \key, :$k!, *%other)
        (\SELF, \key, :$v!, *%other)
        (\SELF, Iterable \key)
        (\SELF, Iterable \key, Mu \ASSIGN)
        (\SELF, Iterable \key, :$BIND!)
        (\SELF, Iterable \key, :$delete!, *%other)
        (\SELF, Iterable \key, :$exists!, *%other)
        (\SELF, Iterable \key, :$kv!, *%other)
        (\SELF, Iterable \key, :$p!, *%other)
        (\SELF, Iterable \key, :$k!, *%other)
        (\SELF, Iterable \key, :$v!, *%other)
        (\SELF, Whatever)
        (\SELF, Whatever, Mu \ASSIGN)
        (\SELF, Whatever, :$BIND!)
        (\SELF, Whatever, :$delete!, *%other)
        (\SELF, Whatever, :$exists!, *%other)
        (\SELF, Whatever, :$kv!, *%other)
        (\SELF, Whatever, :$p!, *%other)
        (\SELF, Whatever, :$k!, *%other)
        (\SELF, Whatever, :$p!, *%other)
        (\SELF, Whatever, :$v!, *%other)
        (\SELF, :$BIND!)
        (\SELF, :$delete!, *%other)
        (\SELF, :$exists!, *%other)
        (\SELF, :$kv!, *%other)
        (\SELF, :$p!, *%other)
        (\SELF, :$k!, *%other)
        (\SELF, :$p!, *%other)
        (\SELF, :$v!, *%other)
        (\SELF, *%other)
      in block  at ./bug2 line 9
      in block  at ./bug2 line 8
```

... which seems to indicate that $device is undefined in the ENTER phaser, which *appears* to be impossible (and never happens if there's only a single thread, meaning there's presumably a race of some kind.)

More information:

```
$ perl6 --version
This is Rakudo version 2017.09 built on MoarVM version 2017.09.1
implementing Perl 6.c.
```
FWIW if anybody is wondering, not a regression. This exact behavior appeared in 2015.12, see https://gist.github.com/Whateverable/60a3fc6444bd8ccefc88ce982fa00e8f

On 2017-10-05 21:38:49, j.david.lowe@gmail.com wrote:
Show quoted text
> This program dies after a short but inconsistent run:
>
> ```
> #!/usr/bin/env perl6
>
> use v6.c;
>
> await (^12).map: {
> start {
> for (^100) {
> with %(:obj(%(:i(1)))) -> (:$obj) {
> ENTER { $obj<i> }
> }
> }
> }
> }
> ```
>
> ... the exception is:
>
> ```
> Cannot resolve caller postcircumfix:<{ }>(Mu, Str); none of these
> signatures match:
> (\SELF, \key)
> (\SELF, \key, Mu \ASSIGN)
> (\SELF, \key, Mu :$BIND! is raw)
> (\SELF, \key, :$delete!, *%other)
> (\SELF, \key, :$exists!, *%other)
> (\SELF, \key, :$kv!, *%other)
> (\SELF, \key, :$p!, *%other)
> (\SELF, \key, :$k!, *%other)
> (\SELF, \key, :$v!, *%other)
> (\SELF, Iterable \key)
> (\SELF, Iterable \key, Mu \ASSIGN)
> (\SELF, Iterable \key, :$BIND!)
> (\SELF, Iterable \key, :$delete!, *%other)
> (\SELF, Iterable \key, :$exists!, *%other)
> (\SELF, Iterable \key, :$kv!, *%other)
> (\SELF, Iterable \key, :$p!, *%other)
> (\SELF, Iterable \key, :$k!, *%other)
> (\SELF, Iterable \key, :$v!, *%other)
> (\SELF, Whatever)
> (\SELF, Whatever, Mu \ASSIGN)
> (\SELF, Whatever, :$BIND!)
> (\SELF, Whatever, :$delete!, *%other)
> (\SELF, Whatever, :$exists!, *%other)
> (\SELF, Whatever, :$kv!, *%other)
> (\SELF, Whatever, :$p!, *%other)
> (\SELF, Whatever, :$k!, *%other)
> (\SELF, Whatever, :$p!, *%other)
> (\SELF, Whatever, :$v!, *%other)
> (\SELF, :$BIND!)
> (\SELF, :$delete!, *%other)
> (\SELF, :$exists!, *%other)
> (\SELF, :$kv!, *%other)
> (\SELF, :$p!, *%other)
> (\SELF, :$k!, *%other)
> (\SELF, :$p!, *%other)
> (\SELF, :$v!, *%other)
> (\SELF, *%other)
> in block at ./bug2 line 9
> in block at ./bug2 line 8
> ```
>
> ... which seems to indicate that $device is undefined in the ENTER phaser,
> which *appears* to be impossible (and never happens if there's only a
> single thread, meaning there's presumably a race of some kind.)
>
> More information:
>
> ```
> $ perl6 --version
> This is Rakudo version 2017.09 built on MoarVM version 2017.09.1
> implementing Perl 6.c.
> ```


Subject: Re: [perl #132226] AutoReply: "impossible" undefined value in concurrent ENTER phasers
Date: Thu, 9 Nov 2017 18:28:56 -0800
From: David Lowe <j.david.lowe [...] gmail.com>
To: perl6-bugs-followup [...] perl.org
This crash still occurs with rakudo 2017.10.

On Thu, Oct 5, 2017 at 9:38 PM, perl6 via RT <perl6-bugs-followup@perl.org> wrote:
Show quoted text
Greetings,

This message has been automatically generated in response to the
creation of a trouble ticket regarding:
        ""impossible" undefined value in concurrent ENTER phasers",
a summary of which appears below.

There is no need to reply to this message right now.  Your ticket has been
assigned an ID of [perl #132226].

Please include the string:

         [perl #132226]

in the subject line of all future correspondence about this issue. To do so,
you may reply to this message.

                        Thank you,
                        perl6-bugs-followup@perl.org

-------------------------------------------------------------------------
This program dies after a short but inconsistent run:

```
#!/usr/bin/env perl6

use v6.c;

await (^12).map: {
   start {
      for (^100) {
         with %(:obj(%(:i(1)))) -> (:$obj) {
            ENTER { $obj<i> }
         }
      }
   }
}
```

... the exception is:

```
    Cannot resolve caller postcircumfix:<{ }>(Mu, Str); none of these
signatures match:
        (\SELF, \key)
        (\SELF, \key, Mu \ASSIGN)
        (\SELF, \key, Mu :$BIND! is raw)
        (\SELF, \key, :$delete!, *%other)
        (\SELF, \key, :$exists!, *%other)
        (\SELF, \key, :$kv!, *%other)
        (\SELF, \key, :$p!, *%other)
        (\SELF, \key, :$k!, *%other)
        (\SELF, \key, :$v!, *%other)
        (\SELF, Iterable \key)
        (\SELF, Iterable \key, Mu \ASSIGN)
        (\SELF, Iterable \key, :$BIND!)
        (\SELF, Iterable \key, :$delete!, *%other)
        (\SELF, Iterable \key, :$exists!, *%other)
        (\SELF, Iterable \key, :$kv!, *%other)
        (\SELF, Iterable \key, :$p!, *%other)
        (\SELF, Iterable \key, :$k!, *%other)
        (\SELF, Iterable \key, :$v!, *%other)
        (\SELF, Whatever)
        (\SELF, Whatever, Mu \ASSIGN)
        (\SELF, Whatever, :$BIND!)
        (\SELF, Whatever, :$delete!, *%other)
        (\SELF, Whatever, :$exists!, *%other)
        (\SELF, Whatever, :$kv!, *%other)
        (\SELF, Whatever, :$p!, *%other)
        (\SELF, Whatever, :$k!, *%other)
        (\SELF, Whatever, :$p!, *%other)
        (\SELF, Whatever, :$v!, *%other)
        (\SELF, :$BIND!)
        (\SELF, :$delete!, *%other)
        (\SELF, :$exists!, *%other)
        (\SELF, :$kv!, *%other)
        (\SELF, :$p!, *%other)
        (\SELF, :$k!, *%other)
        (\SELF, :$p!, *%other)
        (\SELF, :$v!, *%other)
        (\SELF, *%other)
      in block  at ./bug2 line 9
      in block  at ./bug2 line 8
```

... which seems to indicate that $device is undefined in the ENTER phaser,
which *appears* to be impossible (and never happens if there's only a
single thread, meaning there's presumably a race of some kind.)

More information:

```
$ perl6 --version
This is Rakudo version 2017.09 built on MoarVM version 2017.09.1
implementing Perl 6.c.
```




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

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