MIME-Version: | 1.0 |
X-Spam-Status: | No, score=-1.721 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FROM_EXCESS_BASE64=0.979, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001] autolearn=ham |
X-Mailer: | Mail.Ru Mailer 1.0 |
X-Spam-Flag: | NO |
X-Mras: | Ok |
X-Virus-Checked: | Checked |
Content-Type: | multipart/alternative; boundary="--ALT--3WbzTuitYjHpR5HcoFMvJyMtahr1nSKC1450269985" |
Message-ID: | <1450269985.869530398@f93.i.mail.ru> |
Reply-To: | Pavel Limorenko <p.limorenko@corp.mail.ru> |
X-Virus-Scanned: | Debian amavisd-new at bestpractical.com |
X-Spam-Score: | -1.721 |
Received: | from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 339D6240313 for <cpan-bug+IO-AIO@hipster.bestpractical.com>; Wed, 16 Dec 2015 07:46:45 -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 hnEfB1VplXWv for <cpan-bug+IO-AIO@hipster.bestpractical.com>; Wed, 16 Dec 2015 07:46:42 -0500 (EST) |
Received: | from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 882742400FD for <bug-IO-AIO@rt.cpan.org>; Wed, 16 Dec 2015 07:46:42 -0500 (EST) |
Received: | (qmail 15024 invoked by alias); 16 Dec 2015 12:46:41 -0000 |
Received: | from f93.i.mail.ru (HELO f93.i.mail.ru) (94.100.185.21) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 16 Dec 2015 04:46:37 -0800 |
Received: | from [185.6.245.156] (ident=mail) by f93.i.mail.ru with local (envelope-from <p.limorenko@corp.mail.ru>) id 1a9BTO-00061j-1S for bug-IO-AIO@rt.cpan.org; Wed, 16 Dec 2015 15:46:26 +0300 |
Received: | from [185.6.245.156] by e.mail.ru with HTTP; Wed, 16 Dec 2015 15:46:25 +0300 |
Authentication-Results: | hipster.bestpractical.com (amavisd-new); dkim=pass header.i=@corp.mail.ru |
Delivered-To: | cpan-bug+IO-AIO@hipster.bestpractical.com |
Subject: | Issue |
Return-Path: | <p.limorenko@corp.mail.ru> |
X-Priority: | 3 (Normal) |
X-RT-Mail-Extension: | io-aio |
X-Original-To: | cpan-bug+IO-AIO@hipster.bestpractical.com |
X-Spam-Check-BY: | la.mx.develooper.com |
Dkim-Signature: | v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=corp.mail.ru; s=mail; h=Content-Type:Message-ID:Reply-To:Date:MIME-Version:Subject:To:From; bh=xvDSpbIBVv/uoWAUhNOhd43frxhY8xT13FfFhLuGWA4=; b=kzWdawtocYAQmw85P9uzDrWRPMbcGYgn1S+JbeS45UEoHj+j86K4sS61vsR8pqG2CCsNqqpYg64Aidty+T3Af0itf8FYOqVdj3oO58zNCTZXmEd43xzOW+D9KbMae9qacfSX0R1H+WACu1syQFjjdKxCzverhqk88LcAzCeUyVc=; |
X-Spam: | undefined |
Date: | Wed, 16 Dec 2015 15:46:25 +0300 |
X-Spam-Level: | |
X-Originating-Ip: | [185.6.245.156] |
To: | bug-IO-AIO@rt.cpan.org |
From: | Pavel Limorenko <p.limorenko@corp.mail.ru> |
X-RT-Interface: | |
Content-Length: | 0 |
content-type: | text/plain; charset="utf-8" |
Content-Transfer-Encoding: | base64 |
X-RT-Original-Encoding: | utf-8 |
Content-Length: | 2318 |
content-type: | text/html; charset="utf-8" |
Content-Transfer-Encoding: | base64 |
X-RT-Original-Encoding: | utf-8 |
Content-Length: | 2555 |
It seems like I found a bug in IO::AIO module, which was reproduced by me on CentOS 7 Linux distribution. The following environment:
uname -a
Linux mymachine 3.10.0-229.20.1.el7.x86_64 #1 SMP Tue Nov 3 19:10:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
So, a little perl script to reproduce:
-----------------
use strict;
use warnings;
use AnyEvent;
use AnyEvent::IO;
warn $AnyEvent::VERSION;
warn $IO::AIO::VERSION;
my $cv = AnyEvent->condvar();
AnyEvent::IO::aio_stat ('/etc/hosts', sub { warn "i'm free!::: @_"; $cv->send() });
$cv->recv();
my $pid = fork;
defined $pid or die $!;
exit if $pid;
$cv = AnyEvent->condvar();
AnyEvent::IO::aio_stat ('/etc/hosts', sub { warn "i'm free!2::: @_"; $cv->send() });
$cv->recv();
The output is the following:
7.11 at test_tcp.pl line 9.
4.32 at test_tcp.pl line 10.
i'm free!::: 1 at test_tcp.pl line 12.
Also I tried this one script on my Centos 6 machine, where my big application worked just fine,
(with environment:
uname -a
Linux win41.dev.mail.ru 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
perl -v
This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
),
and the output was expectable:
7.04 at test_tcp.pl line 9.
Use of uninitialized value $IO::AIO::VERSION in warn at test_tcp.pl line 10.
Warning: something's wrong at test_tcp.pl line 10.
i'm free!::: 2050 11273496 33188 1 0 0 0 190 1450185241 1450185236 1450185236 4096 8 at test_tcp.pl line 12.
i'm free!2::: 2050 11273496 33188 1 0 0 0 190 1450185241 1450185236 1450185236 4096 8 at test_tcp.pl line 19.
Anyway, problem exists.
My little research showed that before forking there one extra thread in perl process (called perl/eio). After fork done there is only one thread in process. In Centos 6 there is no any extra thread. Also I tried to use on CentOS 7 old version of AnyEvent and IO::AIO (as on CentOS 6, 7.04) -- the result is the same.
I think something went wrong :)
Thanks for reading me. I hope this would help.
Best regards, Pavel.