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

"impossible" undefined value in concurrent ENTER phasers #6574

Open
p6rt opened this issue Oct 6, 2017 · 4 comments
Open

"impossible" undefined value in concurrent ENTER phasers #6574

p6rt opened this issue Oct 6, 2017 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Oct 6, 2017

Migrated from rt.perl.org#132226 (status was 'open')

Searchable as RT132226$

@p6rt
Copy link
Author

p6rt commented Oct 6, 2017

From j.david.lowe@gmail.com

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.
```

@p6rt
Copy link
Author

p6rt commented Oct 10, 2017

From @AlexDaniel

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​:

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.
```

@p6rt
Copy link
Author

p6rt commented Oct 10, 2017

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

@p6rt
Copy link
Author

p6rt commented Nov 10, 2017

From j.david.lowe@gmail.com

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​:

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 #&#8203;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@&#8203;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.
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant