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

IO::Socket::Async broken in 6.d.PREVIEW #6046

Closed
p6rt opened this issue Feb 1, 2017 · 5 comments
Closed

IO::Socket::Async broken in 6.d.PREVIEW #6046

p6rt opened this issue Feb 1, 2017 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 1, 2017

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

Searchable as RT130692$

@p6rt
Copy link
Author

p6rt commented Feb 1, 2017

From jns@gellyfish.co.uk

With 6.d.PREVIEW the simplest code for IO​::Socket​::Async mis-behaves​:

  use v6.d.PREVIEW;

  react {
      whenever IO​::Socket​::Async.listen('localhost', 3333) -> $conn {
          whenever $conn.Supply(​:bin) -> $buf {
              await $conn.write​: $buf;
              $conn.close;
          }
      }
  }

Gives rise to​:

  Unhandled exception in code scheduled on thread 7
  Attempt to unlock mutex by thread not holding it

After the second connection every time. I noticed this when testing
HTTP​::Server​::Tiny.

This is Rakudo version 2017.01-132-g97359ae built on MoarVM version
2017.01-25-g70d4bd5

@p6rt
Copy link
Author

p6rt commented Sep 15, 2017

From @jnthn

On Wed, 01 Feb 2017 13​:11​:21 -0800, jns@​gellyfish.co.uk wrote​:

With 6.d.PREVIEW the simplest code for IO​::Socket​::Async mis-behaves​:

use v6\.d\.PREVIEW;

react \{
    whenever IO​::Socket​::Async\.listen\('localhost', 3333\) \-> $conn \{
        whenever $conn\.Supply\(​:bin\) \-> $buf \{
            await $conn\.write​: $buf;
            $conn\.close;
        \}
    \}
\}

Gives rise to​:

Unhandled exception in code scheduled on thread 7
Attempt to unlock mutex by thread not holding it

After the second connection every time. I noticed this when testing
HTTP​::Server​::Tiny.

This is Rakudo version 2017.01-132-g97359ae built on MoarVM version
2017.01-25-g70d4bd5

Fixed now, and test coverage of this, and the deeper underlying issue, is in S17-promise/nonblocking-await.t.

@p6rt
Copy link
Author

p6rt commented Sep 15, 2017

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

@p6rt
Copy link
Author

p6rt commented Sep 15, 2017

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

@p6rt p6rt closed this as completed Sep 15, 2017
@p6rt
Copy link
Author

p6rt commented Sep 16, 2017

From jns@gellyfish.co.uk

Great, thanks for the update.

On 15 Sep 2017 15​:17, "jnthn@​jnthn.net via RT" <perl6-bugs-followup@​perl.org>
wrote​:

On Wed, 01 Feb 2017 13​:11​:21 -0800, jns@​gellyfish.co.uk wrote​:

With 6.d.PREVIEW the simplest code for IO​::Socket​::Async mis-behaves​:

use v6\.d\.PREVIEW;

react \{
    whenever IO&#8203;::Socket&#8203;::Async\.listen\('localhost', 3333\) \-> $conn \{
        whenever $conn\.Supply\(&#8203;:bin\) \-> $buf \{
            await $conn\.write&#8203;: $buf;
            $conn\.close;
        \}
    \}
\}

Gives rise to​:

Unhandled exception in code scheduled on thread 7
Attempt to unlock mutex by thread not holding it

After the second connection every time. I noticed this when testing
HTTP​::Server​::Tiny.

This is Rakudo version 2017.01-132-g97359ae built on MoarVM version
2017.01-25-g70d4bd5

Fixed now, and test coverage of this, and the deeper underlying issue, is
in S17-promise/nonblocking-await.t.

@p6rt p6rt added the Bug 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