Skip Menu |
 

This queue is for tickets about the IO-Async CPAN distribution.

Report information
The Basics
Id: 90066
Status: open
Priority: 0/
Queue: IO-Async

People
Owner: Nobody in particular
Requestors: Chris.Wright [...] OntarioSystems.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



X-Asg-Orig-Subj: IO Async Function Issue
MIME-Version: 1.0
X-Spam-Flag: NO
Acceptlanguage: en-US
X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.142076 Rule breakdown below pts rule name description ---- ---------------------- --------------------------------------------------
Content-Type: multipart/mixed; boundary="_002_DB612857EA0A4A4798F20CAE2CA211491A0A21D8ECmunexchontari_"
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Virus-Scanned: by bsmtpd at ontariosystems.com
X-Spam-Score: -6.588
X-Barracuda-Spam-Score: 0.00
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 9223424091C for <cpan-bug+IO-Async [...] hipster.bestpractical.com>; Tue, 5 Nov 2013 11:50:56 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UfSwdSYin2dk for <cpan-bug+IO-Async [...] hipster.bestpractical.com>; Tue, 5 Nov 2013 11:50:55 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 0A4F9240815 for <bug-IO-Async [...] rt.cpan.org>; Tue, 5 Nov 2013 11:50:54 -0500 (EST)
Received: (qmail 27315 invoked by alias); 5 Nov 2013 16:50:54 -0000
Received: from barracuda.ontariosystems.com (HELO barracuda.ontariosystems.com) (192.112.251.147) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 05 Nov 2013 08:50:50 -0800
Received: from munexch.ontariosystems.com (munexch.ontariosystems.com [172.16.0.132]) by barracuda.ontariosystems.com with ESMTP id bqHjFjSzNfVit0rE for <bug-IO-Async [...] rt.cpan.org>; Tue, 05 Nov 2013 11:50:36 -0500 (EST)
Received: from munexch.ontariosystems.com ([172.16.0.132]) by munexch.ontariosystems.com ([172.16.0.132]) with mapi; Tue, 5 Nov 2013 11:50:18 -0500
X-Barracuda-BRTS-Status: 1
Delivered-To: cpan-bug+IO-Async [...] hipster.bestpractical.com
Subject: IO Async Function Issue
Thread-Index: Ac7aRqIK5jm66CMvQJSiozEQcZtA5g==
X-Spam-Check-BY: la.mx.develooper.com
Date: Tue, 5 Nov 2013 11:52:08 -0500
X-Spam-Level:
To: "bug-IO-Async [...] rt.cpan.org" <bug-IO-Async [...] rt.cpan.org>
From Chris.Wright [...] ontariosystems.com Tue Nov 5 11: 50:56 2013
X-Barracuda-Connect: munexch.ontariosystems.com[172.16.0.132]
X-Spam-Status: No, score=-6.588 tagged_above=-99.9 required=10 tests=[AWL=0.312, BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5] autolearn=ham
X-Barracuda-Envelope-From: Chris.Wright [...] OntarioSystems.com
Content-Language: en-US
Message-ID: <DB612857EA0A4A4798F20CAE2CA211491A0A21D8EC [...] munexch.ontariosystems.com>
X-Barracuda-Start-Time: 1383670236
X-MS-Tnef-Correlator:
X-Asg-Debug-ID: 1383670236-05cdb4674a1c4ac0001-IXlcSY
Return-Path: <Chris.Wright [...] ontariosystems.com>
X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests=
X-Original-To: cpan-bug+IO-Async [...] hipster.bestpractical.com
X-RT-Mail-Extension: io-async
X-Barracuda-Url: http://192.112.251.147:8000/cgi-mod/mark.cgi
Thread-Topic: IO Async Function Issue
X-MS-Has-Attach: yes
Accept-Language: en-US
From: Chris Wright <Chris.Wright [...] OntarioSystems.com>
X-RT-Interface: Email
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: ascii
Content-Length: 1500
Download (untitled) / with headers
text/plain 1.4k
The attached script demonstrates what I am seeing with this library. I have run this test on Centos Perl 5.18.1 with IO::Async 0.60 and Windows 7 x64 Strawberry x64 5.16.3 with IO::Async 0.61. The program calls the Function once and the return from that function calls the function 4 more times in quick succession. One of these calls doesn't happen if the function is declared with Max Workers at 1, 2, or 3. If I set Max Workers to 4, all 4 function calls occur. c:\Temp>perl IOAsyncFunction.pl Test started running on MSWin32 CallWebService called with Web Service 1 and Version 10 Function called for Web Service 1 with version 10 Web Service 1 returned version 10 obtained CallWebService called with Web Service 2 and Version 20 Function called for Web Service 2 with version 20 CallWebService called with Web Service 3 and Version 30 CallWebService called with Web Service 4 and Version 40 CallWebService called with Web Service 5 and Version 50 Web Service 2 returned version 20 obtained Function called for Web Service 4 with version 40 Web Service 4 returned version 40 obtained Function called for Web Service 5 with version 50 Web Service 5 returned version 50 obtained Terminating on signal SIGINT(2) c:\Temp> Attention: This message and all attachments are private and may contain information that is confidential and privileged. If you received this message in error, please notify the sender by reply email and delete the message immediately.
Content-Description: IOAsyncFunction.pl
Content-Type: application/octet-stream; name="IOAsyncFunction.pl"
Content-Disposition: attachment; creation-date="Tue, 05 Nov 2013 16:05:02 GMT"; filename="IOAsyncFunction.pl"; modification-date="Tue, 05 Nov 2013 16:36:23 GMT"; size="1840"
Content-Transfer-Encoding: base64
Content-Length: 1840
Download IOAsyncFunction.pl
text/x-perl 1.7k

Message body is not shown because sender requested not to inline it.

MIME-Version: 1.0
In-Reply-To: <DB612857EA0A4A4798F20CAE2CA211491A0A21D8EC [...] munexch.ontariosystems.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
References: <DB612857EA0A4A4798F20CAE2CA211491A0A21D8EC [...] munexch.ontariosystems.com>
Content-Type: multipart/mixed; boundary="----------=_1390315967-2710-2"
Message-ID: <rt-4.0.18-2710-1390315967-1758.90066-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
RT-Send-CC: rho [...] devc.at
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 2272
Download (untitled) / with headers
text/plain 2.2k
On Tue Nov 05 11:50:57 2013, Chris.Wright@OntarioSystems.com wrote: Show quoted text
> The program calls the Function once and the return from that function > calls the function 4 more times in quick succession. One of these > calls doesn't happen if the function is declared with Max Workers at > 1, 2, or 3. If I set Max Workers to 4, all 4 function calls occur.
My problem here might be related. If max_workers is NOT left undefined, but is rather specified, the system hangs in certain constellations (see attached). Output should be worker top-aaa_0 at /tmp/hang.pl line 8. worker top-bbbb_0 at /tmp/hang.pl line 8. worker top-ccccccc_0 at /tmp/hang.pl line 8. worker top-ddddd_0 at /tmp/hang.pl line 8. worker top-eeee_0 at /tmp/hang.pl line 8. worker top-ffff_0 at /tmp/hang.pl line 8. worker top-gggg_0 at /tmp/hang.pl line 8. worker top-bbbb_1 at /tmp/hang.pl line 8. worker top-ccccccc_1 at /tmp/hang.pl line 8. worker top-ddddd_1 at /tmp/hang.pl line 8. worker top-eeee_1 at /tmp/hang.pl line 8. worker top-ffff_1 at /tmp/hang.pl line 8. worker top-gggg_1 at /tmp/hang.pl line 8. worker top-ccccccc_2 at /tmp/hang.pl line 8. worker top-ddddd_2 at /tmp/hang.pl line 8. worker top-eeee_2 at /tmp/hang.pl line 8. worker top-ffff_2 at /tmp/hang.pl line 8. worker top-gggg_2 at /tmp/hang.pl line 8. worker top-ddddd_3 at /tmp/hang.pl line 8. worker top-eeee_3 at /tmp/hang.pl line 8. worker top-ffff_3 at /tmp/hang.pl line 8. worker top-gggg_3 at /tmp/hang.pl line 8. worker top-eeee_4 at /tmp/hang.pl line 8. worker top-ffff_4 at /tmp/hang.pl line 8. worker top-gggg_4 at /tmp/hang.pl line 8. worker top-ffff_5 at /tmp/hang.pl line 8. worker top-gggg_5 at /tmp/hang.pl line 8. worker top-gggg_6 at /tmp/hang.pl line 8. but with max_workers => 5 it is worker top-aaa_0 at /tmp/hang.pl line 8. worker top-bbbb_0 at /tmp/hang.pl line 8. worker top-ccccccc_0 at /tmp/hang.pl line 8. worker top-ddddd_0 at /tmp/hang.pl line 8. worker top-eeee_0 at /tmp/hang.pl line 8. worker top-ffff_0 at /tmp/hang.pl line 8. worker top-gggg_0 at /tmp/hang.pl line 8. worker top-bbbb_1 at /tmp/hang.pl line 8. worker top-ccccccc_1 at /tmp/hang.pl line 8. worker top-ddddd_1 at /tmp/hang.pl line 8. worker top-eeee_1 at /tmp/hang.pl line 8. worker top-ffff_1 at /tmp/hang.pl line 8. cheers, \rho
MIME-Version: 1.0
Subject: hang.pl
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Type: application/octet-stream; name="hang.pl"
Content-Disposition: inline; filename="hang.pl"
Content-Transfer-Encoding: base64
Content-Length: 781
Download hang.pl
text/x-perl 781b
use IO::Async::Loop; my $loop = IO::Async::Loop->new; use IO::Async::Function; my $function = IO::Async::Function->new( max_workers => 5, # one less than length of @SCHEDULE is ok, but NOT LESS code => sub { my $tid = "top-".$_[0]; warn "worker $tid"; return 5; }, ); $loop->add( $function ); my @SCHEDULE = ( 'aaa', 'bbbb', 'ccccccc', 'ddddd', 'eeee', 'ffff', 'gggg' ); my $schedule = _mk_future_front (); sub _mk_future_front { my $round = shift || 0; my $front = Future->needs_all( map { $function->call( args => [ $_.'_'.$round ], ) } @SCHEDULE ); $front->on_ready ( sub { shift @SCHEDULE; # $function->restart; $schedule = _mk_future_front ($round+1) if @SCHEDULE; }); return $front; } $loop->run;


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.