Skip Menu |

This queue is for tickets about the POE-XS-Loop-EPoll CPAN distribution.

Report information
The Basics
Id: 55063
Status: resolved
Priority: 0/
Queue: POE-XS-Loop-EPoll

People
Owner: Nobody in particular
Requestors: ASCENT [...] cpan.org
Cc:
AdminCc:

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



Subject: Fatal error fd_alloc < fd_count
Just used POE::Component::Client::TCP (nothing magic) and... Check failed EPoll.xs:214 - fd_alloc (0) < fd_count (1) ----- Please address any warnings or errors above this message, and try again. If there are none, or those messages are from within POE, then please mail them along with the following information to bug-POE@rt.cpan.org: --- <fh> epoll_wait() error: ----- at /usr/local/share/perl/5.10.0/POE/Kernel.pm line 1261
On Sun Feb 28 11:42:47 2010, ASCENT wrote: Show quoted text
> Just used POE::Component::Client::TCP (nothing magic) and... > > Check failed EPoll.xs:214 - fd_alloc (0) < fd_count (1) > ----- > Please address any warnings or errors above this message, and try > again. If there are none, or those messages are from within POE, > then please mail them along with the following information > to bug-POE@rt.cpan.org: > --- > <fh> epoll_wait() error: > ----- > at /usr/local/share/perl/5.10.0/POE/Kernel.pm line 1261
As with your other ticket, could I please have your perl and operating system details? Thanks, Tony
On Sun Feb 28 18:13:23 2010, TONYC wrote: Show quoted text
> > As with your other ticket, could I please have your perl and operating > system details?
I've attached test program. It should crash as I've described. Other POE::Loop::* works well. System: Debian Linux 2.6.31 x86_64 Perl: 5.8.8 and 5.10.0 (standard debian perl) Machine: AMD Opteron 2344 HE (QuadCore) Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: osname=linux, osvers=2.6.30.5-dsa-amd64, archname=x86_64-linux-gnu-thread-multi uname='linux brahms 2.6.30.5-dsa-amd64 #1 smp mon aug 17 02:18:43 cest 2009 x86_64 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=x86_64-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5.10 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.10.0 -Dsitearch=/usr/local/lib/perl/5.10.0 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib -Dlibperl=libperl.so.5.10.0 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2 -g', cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='4.3.2', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.7.so, so=so, useshrplib=true, libperl=libperl.so.5.10.0 gnulibc_version='2.7' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Aug 28 2009 22:24:50 @INC: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .
Subject: epoll_test.pl
#!/usr/bin/perl use warnings; use strict; use POE qw/ XS::Loop::EPoll Component::Client::TCP Component::Server::TCP /; my $port; POE::Component::Server::TCP->new ( Alias => 'server', Address => '127.0.0.1', Port => 0, Started => sub { use Socket qw/sockaddr_in/; $port = (sockaddr_in($_[HEAP]->{listener}->getsockname))[0]; print "Server port: $port\n"; }, ClientInput => sub { print "Server: ". $_[ARG0] ."\n"; }, ); POE::Session->create ( inline_states => { _start => sub { $_[KERNEL]->alarm(run => 3); }, run => sub { POE::Component::Client::TCP->new ( Alias => 'client', RemoteAddress => '127.0.0.1', RemotePort => $port, ConnectTimeout => 5, Started => sub { print "Client /started/\n"; }, Connected => sub { print "Client /connected/\n"; $_[HEAP]->{server}->put("hello\n"); }, ServerInput => sub { print "Client: ". $_[ARG0] ."\n"; }, ); } } ); $poe_kernel->run();
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #55063] Fatal error fd_alloc < fd_count
Date: Mon, 1 Mar 2010 13:45:02 +1100
To: Dariusz Jackowski via RT <bug-POE-XS-Loop-EPoll [...] rt.cpan.org>
From: tonyc [...] cpan.org
On Sun, Feb 28, 2010 at 07:45:52PM -0500, Dariusz Jackowski via RT wrote: Show quoted text
> Queue: POE-XS-Loop-EPoll > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=55063 > > > On Sun Feb 28 18:13:23 2010, TONYC wrote:
> > > > As with your other ticket, could I please have your perl and operating > > system details?
> > I've attached test program. It should crash as I've described. Other > POE::Loop::* works well.
Thanks, I'll look into both tickets tonight (GMT+11). Tony
On Sun Feb 28 18:13:23 2010, TONYC wrote: Show quoted text
> On Sun Feb 28 11:42:47 2010, ASCENT wrote:
> > Just used POE::Component::Client::TCP (nothing magic) and... > > > > Check failed EPoll.xs:214 - fd_alloc (0) < fd_count (1)
This is occurring because the loop hasn't been initialized properly. Unfortunately, loading a loop via POE: use POE qw(Loop::Foo); # use POE::Loop::Foo only works when the loop name starts with POE::Loop, for POE::XS loops you need to use the mechanism described on the POE::XS::Loop::EPoll page: use POE::Kernel { loop => 'POE::XS::Loop::EPoll' }; or by setting the POE_EVENT_LOOP environment variable. This report prompted me to build and test under current POE, which revealed two other bugs. I'll make some changes to better report the missing initialization. Tony
On Sun Feb 28 11:42:47 2010, ASCENT wrote: Show quoted text
> Just used POE::Component::Client::TCP (nothing magic) and... > > Check failed EPoll.xs:214 - fd_alloc (0) < fd_count (1)
This is fixed in 1.000 - methods now check that the loop has been properly initialized. POE svn has a patch to load XS loops correctly when loaded via use POE qw(XS::Loop::Foo); Tony