Skip Menu |
 

This queue is for tickets about the POE-Component-Client-HTTP CPAN distribution.

Report information
The Basics
Id: 59846
Status: resolved
Priority: 0/
Queue: POE-Component-Client-HTTP

People
Owner: Nobody in particular
Requestors: jleader [...] alumni.caltech.edu
Cc:
AdminCc:

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



Subject: "getpeername on unopened socket" warning
Download (untitled) / with headers
text/plain 785b
Under some circumstances, I get a "getpeername on unopened socket" warning when using PoCo::Client::HTTP (with PoCo::SSLify installed) to retrieve an https url. Oddly, I see the warning when I run the testcase under Module::Build's "Build test", but when I run it with prove or perl, I don't see the warning. I've attached a Build.PL (which specifies the versions of all the modules I use), and testcase.t. If you put testcase.t in a t subdirectory, and do "perl Build.PL; ./Build test", you should see the warning, as in the attached jl.log. uname -a: Linux dev05.rnd.dev.corp.oversee.net 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST 2010 x86_64 x86_64 x86_64 GNU/Linux perl -v: This is perl, v5.8.8 built for x86_64-linux-thread-multi I've attached perl-V output as well.
Subject: jl.log
Download jl.log
text/x-log 2.3k
t/testcase.... # Failed test 'no warnings' # at /usr/lib/perl5/vendor_perl/5.8.8/Test/NoWarnings.pm line 45. # There were 1 warning(s) # Previous test 0 '' # getpeername() on unopened socket GEN4 at /usr/lib/perl5/vendor_perl/5.8.8/POE/Component/Client/HTTP.pm line 344. # at /usr/lib/perl5/vendor_perl/5.8.8/POE/Component/Client/HTTP.pm line 344 # POE::Component::Client::HTTP::_poco_weeble_connect_done('undef', 'POE::Session=ARRAY(0x1e0c1160)', 'POE::Kernel=ARRAY(0x1d46f6f0)', 'HASH(0x1e0c1010)', 'got_connect_done', 'POE::Session=ARRAY(0x1e0cce70)', 'undef', '/usr/lib/perl5/vendor_perl/5.8.8/POE/Component/Client/Keepali...', 1068, ...) called at /usr/lib/perl5/site_perl/5.8.8/POE/Session.pm line 463 # POE::Session::_invoke_state('POE::Session=ARRAY(0x1e0c1160)', 'POE::Session=ARRAY(0x1e0cce70)', 'got_connect_done', 'ARRAY(0x1e12ed00)', '/usr/lib/perl5/vendor_perl/5.8.8/POE/Component/Client/Keepali...', 1068, 'POE::Wheel::SocketFactory(1) -> select connect') called at /usr/lib/perl5/site_perl/5.8.8/POE/Kernel.pm line 1111 # eval {...} called at /usr/lib/perl5/site_perl/5.8.8/POE/Kernel.pm line 1110 # POE::Kernel::_dispatch_event('POE::Kernel=ARRAY(0x1d46f6f0)', 'POE::Session=ARRAY(0x1e0c1160)', 'POE::Session=ARRAY(0x1e0cce70)', 'got_connect_done', 1, 'ARRAY(0x1e12ed00)', '/usr/lib/perl5/vendor_perl/5.8.8/POE/Component/Client/Keepali...', 1068, 'POE::Wheel::SocketFactory(1) -> select connect', ...) called at /usr/lib/perl5/site_perl/5.8.8/POE/Resource/Events.pm line 364 # POE::Kernel::_data_ev_dispatch_due('POE::Kernel=ARRAY(0x1d46f6f0)') called at /usr/lib/perl5/site_perl/5.8.8/POE/Loop/Select.pm line 315 # POE::Kernel::loop_do_timeslice('POE::Kernel=ARRAY(0x1d46f6f0)') called at /usr/lib/perl5/site_perl/5.8.8/POE/Loop/Select.pm line 323 # POE::Kernel::loop_run('POE::Kernel=ARRAY(0x1d46f6f0)') called at /usr/lib/perl5/site_perl/5.8.8/POE/Kernel.pm line 1287 # POE::Kernel::run('POE::Kernel=ARRAY(0x1d46f6f0)') called at t/testcase.t line 29 # # Looks like you failed 1 test of 1. dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/testcase.t 1 256 1 1 100.00% 1 Failed 1/1 test scripts, 0.00% okay. 1/1 subtests failed, 0.00% okay.
Subject: perl-V.log
Download perl-V.log
text/x-log 4.5k
Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.9-42.0.3.elsmp, archname=x86_64-linux-thread-multi uname='linux builder6.centos.org 2.6.9-42.0.3.elsmp #1 smp fri oct 6 06:28:26 cdt 2006 x86_64 x86_64 x86_64 gnulinux ' config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Dversion=5.8.8 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dprivlib=/usr/lib/perl5/5.8.8 -Dsitelib=/usr/lib/perl5/site_perl/5.8.8 -Dvendorlib=/usr/lib/perl5/vendor_perl/5.8.8 -Darchlib=/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi -Dsitearch=/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi -Dvendorarch=/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi -Darchname=x86_64-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dinc_version_list=5.8.7 5.8.6 5.8.5 -Dscriptdir=/usr/bin' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef 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='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='4.1.1 20070105 (Red Hat 4.1.1-52)', 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='gcc', ldflags ='' libpth=/usr/local/lib64 /lib64 /usr/lib64 libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY 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 Nov 8 2007 06:49:06 %ENV: PERL5LIB=":/usr/local/oversee/lib/perl5" @INC: /usr/local/oversee/lib/perl5/x86_64-linux-thread-multi /usr/local/oversee/lib/perl5 /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .
Subject: Build.PL
Download Build.PL
text/x-perl 666b
#!/usr/bin/perl use strict; use warnings; use Module::Build; Module::Build->new( module_name => 'testcase', dist_author => 'Jeremy Leader <jleader@alumni.caltech.edu>', dist_abstract => 'test case', dist_version => '0.01', build_requires => { 'Test::More' => '0.92', 'Test::NoWarnings' => '0.084', }, requires => { 'HTTP::Request::Common' => '5.824', # perl-libwww-perl 'POE' => '1.291', 'POE::Component::Client::HTTP' => '0.895', 'POE::Component::SSLify' => '0.20', }, )->create_build_script;
Subject: testcase.t
Download testcase.t
text/x-perl 572b
#!/usr/bin/perl use strict; use warnings; use HTTP::Request::Common qw(GET); use POE qw(Component::Client::HTTP); use Test::More tests=>1; use Test::NoWarnings; POE::Component::Client::HTTP->spawn( Alias => 'ua', FollowRedirects => 3, Timeout => 7, ); POE::Session->create(inline_states =>{ _start => sub { $poe_kernel->post(ua=>'request', 'got_response', GET 'https://www.paypal.com/'); }, got_response => sub {}, _stop => sub { $poe_kernel->call(ua=>'shutdown'); }, }); $poe_kernel->run();
From: jleader [...] alumni.caltech.edu
Download (untitled) / with headers
text/plain 538b
For what it's worth, when I tried to reproduce this on another box with some older packages installed, I couldn't. The warning doesn't occur with: 'POE' => '1.268', 'POE::Component::Client::HTTP' => '0.890', The OS versions differ between the boxes only at the patch level, bug: 2.6.18-92.1.22.el5 vs no bug: 2.6.18-164.11.1.el5 The Perl versions differ in the patch level of the OS they were built on, the patch level of gcc they were built with, and the non-bug perl has one extra entry in @INC (/usr/local/oversee/lib/perl5/5.8.6).
Download (untitled) / with headers
text/plain 337b
I've linked this ticket to #58265, which is the root cause of this. It should be resolved in the next release, which I expect to be soon. However, you are saying it's an intermittent problem? Please test the next version when it's on CPAN and let us know if it does the trick for you or not. Thanks for reporting this! -- ~Apocalypse
Hello, v0.910 on CPAN includes the patch for this. Thanks again! -- ~Apocalypse


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.