Skip Menu |
 

This queue is for tickets about the HTTP-Proxy CPAN distribution.

Report information
The Basics
Id: 13048
Status: resolved
Priority: 0/
Queue: HTTP-Proxy

People
Owner: Nobody in particular
Requestors: john [...] loverso.southborough.ma.us
Cc:
AdminCc:

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



Subject: getsockname() on closed socket Symbol::GEN0
Running the example 'eg/proxy.pl', I get a four warnings for each client connection: getsockname() on closed socket Symbol::GEN0 at /usr/local/lib/perl5/5.6.1/mach/IO/Socket.pm line 186. getsockname() on closed socket Symbol::GEN0 at /usr/local/lib/perl5/5.6.1/mach/IO/Socket.pm line 186. Use of uninitialized value in numeric ne (!=) at /usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm line 53. Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm line 53. The documentation for Devel::SimpleTrace says: "For example, HTTP::Proxy 0.14 suffered from strange warnings, and its author Philippe Bruhat had a hard time trying to understand where they could come from." And it lists a very similar error. Does this bug still exist in 0.15? Here is a run with Devel::SimpleTrace: $ perl -MDevel::SimpleTrace HTTP-Proxy-0.15/eg/proxy.pl port 8088 getsockname() on closed socket Symbol::GEN0 at IO::Socket::sockname(/usr/local/lib/perl5/5.6.1/mach/IO/Socket.pm:186) at IO::Socket::INET::sockaddr(/usr/local/lib/perl5/5.6.1/IO/Socket/INET.pm:230) at HTTP::Daemon::url(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm:44) at HTTP::Daemon::ClientConn::get_request(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm:149) at HTTP::Proxy::serve_connections(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Proxy.pm:287) at HTTP::Proxy::start(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Proxy.pm:179) at main::(proxies/HTTP-Proxy-0.15/eg/proxy.pl:7) getsockname() on closed socket Symbol::GEN0 at IO::Socket::sockname(/usr/local/lib/perl5/5.6.1/mach/IO/Socket.pm:186) at IO::Socket::INET::sockport(/usr/local/lib/perl5/5.6.1/IO/Socket/INET.pm:237) at HTTP::Daemon::url(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm:52) at HTTP::Daemon::ClientConn::get_request(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm:149) at HTTP::Proxy::serve_connections(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Proxy.pm:287) at HTTP::Proxy::start(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Proxy.pm:179) at main::(proxies/HTTP-Proxy-0.15/eg/proxy.pl:7) Use of uninitialized value in numeric ne (!=) at HTTP::Daemon::url(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm:53) at HTTP::Daemon::ClientConn::get_request(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm:149) at HTTP::Proxy::serve_connections(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Proxy.pm:287) at HTTP::Proxy::start(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Proxy.pm:179) at main::(proxies/HTTP-Proxy-0.15/eg/proxy.pl:7) Use of uninitialized value in concatenation (.) or string at HTTP::Daemon::url(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm:53) at HTTP::Daemon::ClientConn::get_request(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm:149) at HTTP::Proxy::serve_connections(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Proxy.pm:287) at HTTP::Proxy::start(/usr/local/lib/perl5/site_perl/5.6.1/HTTP/Proxy.pm:179) at main::(proxies/HTTP-Proxy-0.15/eg/proxy.pl:7)
Download (untitled) / with headers
text/plain 149b
I am using the latest HTTP::Daemon, from libwww-perl-5.803. The warnings go away if I use 'maxclient 0'. The system is FreeBSD 4.9 with Perl 5.6.1.
RT-Send-CC: book [...] cpan.org
Download (untitled) / with headers
text/plain 1.3k
[guest - Tue May 31 23:28:46 2005]: Show quoted text
> Running the example 'eg/proxy.pl', I get a four warnings for each > client connection: > > getsockname() on closed socket Symbol::GEN0 at > /usr/local/lib/perl5/5.6.1/mach/IO/Socket.pm line 186. > getsockname() on closed socket Symbol::GEN0 at > /usr/local/lib/perl5/5.6.1/mach/IO/Socket.pm line 186. > Use of uninitialized value in numeric ne (!=) at > /usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm line 53. > Use of uninitialized value in concatenation (.) or string at > /usr/local/lib/perl5/site_perl/5.6.1/HTTP/Daemon.pm line 53. > > > The documentation for Devel::SimpleTrace says: > > "For example, HTTP::Proxy 0.14 suffered from strange warnings, and its > author Philippe Bruhat had a hard time trying to understand where they > could come from." > > And it lists a very similar error. Does this bug still exist in 0.15?
The bug still exists in 0.15, but it'll be patched in 0.16. In the mean time, here's the patch: --- lib/HTTP/Proxy.pm 5 Apr 2005 19:18:41 -0000 1.99 +++ lib/HTTP/Proxy.pm 6 Apr 2005 13:52:50 -0000 1.100 @@ -175,8 +175,8 @@ # the child process handles the whole connection else { $SIG{INT} = 'DEFAULT'; - $fh->close; $self->serve_connections($conn); + $fh->close; exit; # let's die! } }


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.