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

Owner: jnthn [at] jnthn.net
Requestors: elizabeth <liz [at] dijkmat.nl>
Cc:
AdminCc:

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



Subject: await Promise in different thread
Date: Fri, 5 Sep 2014 23:43:41 +0200
To: rakudobug [...] perl.org
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Download (untitled) / with headers
text/plain 922b
(since leont has been so busy with other stuff, I thought to report the problem he found)

12:11 * leont suspects he's observing Promise.allof spinlocking or some such. 100% CPU usage, but no input is coming in :-/
12:19 lizmat leont: could you gist that ?
12:22 leont Would need to reduce it first, but sure
13:14 leont My spinlock seems to have gone away when I await()ed in the same thread that created the Proc::Async…
13:16 lizmat leont: interesting datapoint  :-)
13:16 wonder what jnthn would want to say about that  :-)
13:22 leont perl6 -e 'my $waiter = Proc::Async.new(:path($*EXECUTABLE), :args(["helper.pl"])).start; await start { await $waiter };'
13:23 Let's make that easier: perl6 -e 'my $waiter = Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await start { await $waiter };'
13:29 moritz leont++ # golfing
13:30 leont: could you please submit that to rakudobugperl.org?
13:30 leont Sure
Download at.png
image/png 322b
at.png
Subject: [PERF] await Promise in different thread
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1.2k
On Fri Sep 05 14:44:06 2014, elizabeth wrote: Show quoted text
> (since leont has been so busy with other stuff, I thought to report > the problem he found) > > 12:11 * leont suspects he's observing Promise.allof spinlocking or > some such. 100% CPU usage, but no input is coming in :-/ > 12:19 lizmat leont: could you gist that ? > 12:22 leont Would need to reduce it first, but sure > 13:14 leont My spinlock seems to have gone away when I await()ed > in the same thread that created the Proc::Async… > 13:16 lizmat leont: interesting datapoint :-) > 13:16 wonder what jnthn would want to say about that :-) > 13:22 leont perl6 -e 'my $waiter = > Proc::Async.new(:path($*EXECUTABLE), :args(["helper.pl"])).start; > await start { await $waiter };' > 13:23 Let's make that easier: perl6 -e 'my $waiter = > Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await > start { await $waiter };' > 13:29 moritz leont++ # golfing > 13:30 leont: could you please submit that to > rakudobugperl.org? > 13:30 leont Sure
This seems to work with no issue here. Is this ticket closable? $ perl6 -e 'my $waiter = Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await start { await $waiter };' Hello World -- Will "Coke" Coleda
Subject: Re: [perl #122709] [PERF] await Promise in different thread
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
CC: perl6-compiler [...] perl.org
To: perl6-bugs-followup [...] perl.org
Date: Wed, 27 Apr 2016 04:58:57 +0000
Download (untitled) / with headers
text/plain 1.5k
Not sure if it's relevant here but last time I checked there is an issues with await and Proc::Async on Mac.

RT #125758 for example which looks similar to this.
On Wed, 27 Apr 2016 at 7:08 AM, Will Coleda via RT <perl6-bugs-followup@perl.org> wrote:
Show quoted text
On Fri Sep 05 14:44:06 2014, elizabeth wrote:
> (since leont has been so busy with other stuff, I thought to report
> the problem he found)
>
> 12:11   * leont suspects he's observing Promise.allof spinlocking or
> some such. 100% CPU usage, but no input is coming in :-/
> 12:19   lizmat  leont: could you gist that ?
> 12:22   leont   Would need to reduce it first, but sure
> 13:14   leont   My spinlock seems to have gone away when I await()ed
> in the same thread that created the Proc::Async…
> 13:16   lizmat  leont: interesting datapoint  :-)
> 13:16           wonder what jnthn would want to say about that  :-)
> 13:22   leont   perl6 -e 'my $waiter =
> Proc::Async.new(:path($*EXECUTABLE), :args(["helper.pl"])).start;
> await start { await $waiter };'
> 13:23           Let's make that easier: perl6 -e 'my $waiter =
> Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await
> start { await $waiter };'
> 13:29   moritz  leont++ # golfing
> 13:30           leont: could you please submit that to
> rakudobugperl.org?
> 13:30   leont   Sure

This seems to work with no issue here. Is this ticket closable?

$ perl6 -e 'my $waiter = Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await start { await $waiter };'
Hello World

--
Will "Coke" Coleda
Date: Wed, 27 Apr 2016 10:01:17 +0000
To: perl6-bugs-followup [...] perl.org
CC: perl6-compiler [...] perl.org
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
Subject: Re: [perl #122709] [PERF] await Promise in different thread
Download (untitled) / with headers
text/plain 1.8k
Now I'm at home I tried it on my Mac,  I can confirm that:

perl6 -e 'my $waiter = Proc::Async.new(:path<echo>, :args<Hello World>).start; await start { await $waiter }'

prints Hello World and then hangs forever.


On Wed, Apr 27, 2016 at 2:58 PM Lloyd Fournier <lloyd.fourn@gmail.com> wrote:
Show quoted text
Not sure if it's relevant here but last time I checked there is an issues with await and Proc::Async on Mac.

RT #125758 for example which looks similar to this.
On Wed, 27 Apr 2016 at 7:08 AM, Will Coleda via RT <perl6-bugs-followup@perl.org> wrote:
On Fri Sep 05 14:44:06 2014, elizabeth wrote:
> (since leont has been so busy with other stuff, I thought to report
> the problem he found)
>
> 12:11   * leont suspects he's observing Promise.allof spinlocking or
> some such. 100% CPU usage, but no input is coming in :-/
> 12:19   lizmat  leont: could you gist that ?
> 12:22   leont   Would need to reduce it first, but sure
> 13:14   leont   My spinlock seems to have gone away when I await()ed
> in the same thread that created the Proc::Async…
> 13:16   lizmat  leont: interesting datapoint  :-)
> 13:16           wonder what jnthn would want to say about that  :-)
> 13:22   leont   perl6 -e 'my $waiter =
> Proc::Async.new(:path($*EXECUTABLE), :args(["helper.pl"])).start;
> await start { await $waiter };'
> 13:23           Let's make that easier: perl6 -e 'my $waiter =
> Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await
> start { await $waiter };'
> 13:29   moritz  leont++ # golfing
> 13:30           leont: could you please submit that to
> rakudobugperl.org?
> 13:30   leont   Sure

This seems to work with no issue here. Is this ticket closable?

$ perl6 -e 'my $waiter = Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await start { await $waiter };'
Hello World

--
Will "Coke" Coleda
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 2.1k
On Wed Apr 27 03:02:14 2016, lloyd.fourn@gmail.com wrote: Show quoted text
> Now I'm at home I tried it on my Mac, I can confirm that: > > perl6 -e 'my $waiter = Proc::Async.new(:path<echo>, :args<Hello
> World>).start; await start { await $waiter }'
> > prints Hello World and then hangs forever. > > On Wed, Apr 27, 2016 at 2:58 PM Lloyd Fournier <lloyd.fourn@gmail.com> > wrote: >
> > Not sure if it's relevant here but last time I checked there is an issues > > with await and Proc::Async on Mac. > > > > RT #125758 for example which looks similar to this. > > On Wed, 27 Apr 2016 at 7:08 AM, Will Coleda via RT < > > perl6-bugs-followup@perl.org> wrote: > >
> >> On Fri Sep 05 14:44:06 2014, elizabeth wrote:
> >> > (since leont has been so busy with other stuff, I thought to report > >> > the problem he found) > >> > > >> > 12:11 * leont suspects he's observing Promise.allof spinlocking or > >> > some such. 100% CPU usage, but no input is coming in :-/ > >> > 12:19 lizmat leont: could you gist that ? > >> > 12:22 leont Would need to reduce it first, but sure > >> > 13:14 leont My spinlock seems to have gone away when I await()ed > >> > in the same thread that created the Proc::Async… > >> > 13:16 lizmat leont: interesting datapoint :-) > >> > 13:16 wonder what jnthn would want to say about that :-) > >> > 13:22 leont perl6 -e 'my $waiter = > >> > Proc::Async.new(:path($*EXECUTABLE), :args(["helper.pl"])).start; > >> > await start { await $waiter };' > >> > 13:23 Let's make that easier: perl6 -e 'my $waiter = > >> > Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await > >> > start { await $waiter };' > >> > 13:29 moritz leont++ # golfing > >> > 13:30 leont: could you please submit that to > >> > rakudobugperl.org? > >> > 13:30 leont Sure
> >> > >> This seems to work with no issue here. Is this ticket closable? > >> > >> $ perl6 -e 'my $waiter = Proc::Async.new(:path("echo"), :args(<Hello
> >> World>)).start; await start { await $waiter };'
> >> Hello World > >> > >> -- > >> Will "Coke" Coleda > >>
> >
Can you include the output of sw_vers and perl6 --version ? -- Will "Coke" Coleda
Download (untitled) / with headers
text/plain 265b
For me, the command sometimes hangs and sometimes doesn't. This is on up-do-date Rakudo: ➜ uname -srm Linux 4.5.2-1-ARCH x86_64 ➜ perl6 --version This is Rakudo version 2016.04-74-ga16f0a4 built on MoarVM version 2016.04 implementing Perl 6.c.
Date: Fri, 06 May 2016 09:55:17 +0000
CC: perl6-compiler [...] perl.org
To: perl6-bugs-followup [...] perl.org
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
Subject: Re: [perl #122709] [PERF] await Promise in different thread
Download (untitled) / with headers
text/plain 2.3k
It works now!

whoever fixed it++. Close this! (and #125758).

On Mon, May 2, 2016 at 11:34 PM Will Coleda via RT <perl6-bugs-followup@perl.org> wrote:
Show quoted text
On Wed Apr 27 03:02:14 2016, lloyd.fourn@gmail.com wrote:
> Now I'm at home I tried it on my Mac,  I can confirm that:
>
> perl6 -e 'my $waiter = Proc::Async.new(:path<echo>, :args<Hello
> World>).start; await start { await $waiter }'
>
> prints Hello World and then hangs forever.
>
> On Wed, Apr 27, 2016 at 2:58 PM Lloyd Fournier <lloyd.fourn@gmail.com>
> wrote:
>
> > Not sure if it's relevant here but last time I checked there is an issues
> > with await and Proc::Async on Mac.
> >
> > RT #125758 for example which looks similar to this.
> > On Wed, 27 Apr 2016 at 7:08 AM, Will Coleda via RT <
> > perl6-bugs-followup@perl.org> wrote:
> >
> >> On Fri Sep 05 14:44:06 2014, elizabeth wrote:
> >> > (since leont has been so busy with other stuff, I thought to report
> >> > the problem he found)
> >> >
> >> > 12:11   * leont suspects he's observing Promise.allof spinlocking or
> >> > some such. 100% CPU usage, but no input is coming in :-/
> >> > 12:19   lizmat  leont: could you gist that ?
> >> > 12:22   leont   Would need to reduce it first, but sure
> >> > 13:14   leont   My spinlock seems to have gone away when I await()ed
> >> > in the same thread that created the Proc::Async…
> >> > 13:16   lizmat  leont: interesting datapoint  :-)
> >> > 13:16           wonder what jnthn would want to say about that  :-)
> >> > 13:22   leont   perl6 -e 'my $waiter =
> >> > Proc::Async.new(:path($*EXECUTABLE), :args(["helper.pl"])).start;
> >> > await start { await $waiter };'
> >> > 13:23           Let's make that easier: perl6 -e 'my $waiter =
> >> > Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await
> >> > start { await $waiter };'
> >> > 13:29   moritz  leont++ # golfing
> >> > 13:30           leont: could you please submit that to
> >> > rakudobugperl.org?
> >> > 13:30   leont   Sure
> >>
> >> This seems to work with no issue here. Is this ticket closable?
> >>
> >> $ perl6 -e 'my $waiter = Proc::Async.new(:path("echo"), :args(<Hello
> >> World>)).start; await start { await $waiter };'
> >> Hello World
> >>
> >> --
> >> Will "Coke" Coleda
> >>
> >

Can you include the output of sw_vers and perl6 --version ?

--
Will "Coke" Coleda
Date: Fri, 6 May 2016 12:11:15 +0200
To: "Itsuki Toyota (via RT)" <perl6-bugs-followup [...] perl.org>
Subject: Re: [perl #122709] [PERF] await Promise in different thread
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Download (untitled) / with headers
text/plain 2.5k
FWIW, I think it was 1ee27e660a8dce3ae Show quoted text
> On 06 May 2016, at 11:55, Lloyd Fournier <lloyd.fourn@gmail.com> wrote: > > It works now! > > whoever fixed it++. Close this! (and #125758). > > On Mon, May 2, 2016 at 11:34 PM Will Coleda via RT <perl6-bugs-followup@perl.org> wrote: > On Wed Apr 27 03:02:14 2016, lloyd.fourn@gmail.com wrote:
> > Now I'm at home I tried it on my Mac, I can confirm that: > > > > perl6 -e 'my $waiter = Proc::Async.new(:path<echo>, :args<Hello
> > World>).start; await start { await $waiter }'
> > > > prints Hello World and then hangs forever. > > > > On Wed, Apr 27, 2016 at 2:58 PM Lloyd Fournier <lloyd.fourn@gmail.com> > > wrote: > >
> > > Not sure if it's relevant here but last time I checked there is an issues > > > with await and Proc::Async on Mac. > > > > > > RT #125758 for example which looks similar to this. > > > On Wed, 27 Apr 2016 at 7:08 AM, Will Coleda via RT < > > > perl6-bugs-followup@perl.org> wrote: > > >
> > >> On Fri Sep 05 14:44:06 2014, elizabeth wrote:
> > >> > (since leont has been so busy with other stuff, I thought to report > > >> > the problem he found) > > >> > > > >> > 12:11 * leont suspects he's observing Promise.allof spinlocking or > > >> > some such. 100% CPU usage, but no input is coming in :-/ > > >> > 12:19 lizmat leont: could you gist that ? > > >> > 12:22 leont Would need to reduce it first, but sure > > >> > 13:14 leont My spinlock seems to have gone away when I await()ed > > >> > in the same thread that created the Proc::Async… > > >> > 13:16 lizmat leont: interesting datapoint :-) > > >> > 13:16 wonder what jnthn would want to say about that :-) > > >> > 13:22 leont perl6 -e 'my $waiter = > > >> > Proc::Async.new(:path($*EXECUTABLE), :args(["helper.pl"])).start; > > >> > await start { await $waiter };' > > >> > 13:23 Let's make that easier: perl6 -e 'my $waiter = > > >> > Proc::Async.new(:path("echo"), :args(<Hello World>)).start; await > > >> > start { await $waiter };' > > >> > 13:29 moritz leont++ # golfing > > >> > 13:30 leont: could you please submit that to > > >> > rakudobugperl.org? > > >> > 13:30 leont Sure
> > >> > > >> This seems to work with no issue here. Is this ticket closable? > > >> > > >> $ perl6 -e 'my $waiter = Proc::Async.new(:path("echo"), :args(<Hello
> > >> World>)).start; await start { await $waiter };'
> > >> Hello World > > >> > > >> -- > > >> Will "Coke" Coleda > > >>
> > >
> > Can you include the output of sw_vers and perl6 --version ? > > -- > Will "Coke" Coleda
Download (untitled) / with headers
text/plain 428b
No, this one-liner... perl6 -e 'my $waiter = Proc::Async.new(:path<echo>, :args<Hello World>).start; await start { await $waiter }' ...still occasionally hangs for me on the latest Rakudo nom: This is Rakudo version 2016.04-117-g7db7b46 built on MoarVM version 2016.04 implementing Perl 6.c. But it does appear to happen more seldomly now. Make sure you run it many times before concluding that it works for you.
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 719b
On Fri May 06 06:54:52 2016, smls75@gmail.com wrote: Show quoted text
> No, this one-liner... > > perl6 -e 'my $waiter = Proc::Async.new(:path<echo>, :args<Hello
> World>).start; await start { await $waiter }'
> > ...still occasionally hangs for me on the latest Rakudo nom: > > This is Rakudo version 2016.04-117-g7db7b46 built on MoarVM version > 2016.04 > implementing Perl 6.c. > > But it does appear to happen more seldomly now. > Make sure you run it many times before concluding that it works for > you.
I can still reproduce it too; seems that occasionally the scheduler starts too few threads (in fact, only one, and that is tied up with the await, and so nothing processes the incoming message saying the process ended).
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 389b
On Wed, 03 Aug 2016 12:23:32 -0700, jnthn@jnthn.net wrote: Show quoted text
> I can still reproduce it too; seems that occasionally the scheduler > starts too few threads (in fact, only one, and that is tied up with > the await, and so nothing processes the incoming message saying the > process ended).
The new scheduler merged a couple weeks back addresses this; added a test in S17-procasync/stress.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