Skip Menu |
Report information
Id: 130692
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: jns [at] gellyfish.co.uk
Cc:
AdminCc:

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



Date: Wed, 01 Feb 2017 21:11:03 +0000
To: rakudobug <rakudobug [...] perl.org>
From: Jonathan Stowe <jns [...] gellyfish.co.uk>
Subject: [BUG] IO::Socket::Async broken in 6.d.PREVIEW
Download (untitled) / with headers
text/plain 679b
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
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 899b
On Wed, 01 Feb 2017 13:11:21 -0800, jns@gellyfish.co.uk wrote: Show quoted text
> 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.
Date: Fri, 15 Sep 2017 15:53:07 +0100
To: perl6-bugs-followup [...] perl.org
From: Jonathan Stowe <jns [...] gellyfish.co.uk>
Subject: Re: [perl #130692] [BUG] IO::Socket::Async broken in 6.d.PREVIEW
Download (untitled) / with headers
text/plain 1019b

Great, thanks for the update.


On 15 Sep 2017 15:17, "jnthn@jnthn.net via RT" <perl6-bugs-followup@perl.org> wrote:
Show quoted text
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.



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