[Filterproxy-devel] Re: FilterProxy BUG
Brought to you by:
mcelrath
|
From: Bob M. <mce...@dr...> - 2002-05-02 15:58:03
|
Well that's interesting...
This should never happen and is probably a bug in HTTP::Daemon or
IO::Socket. The $daemon->accept method should wait forever.
This may seem unrelated...but the only thing I can think of is if you're
exhausting the available sockets or something. Somehow the socket is
getting closed forcibly. (maybe exhausting a per-user process or socket
limit?) This seems reasonable if you reload a page with lots of images
many times -- lots of FilterProxy activity.
Try adding this somewhere inside data_handler in FilterProxy.pl:
if(!defined $client->connected()) {
die("Client aborted download");
}
This should close outgoing connections when you hit "stop". Do you hit
reload repeatedly, and wait for the page to finish each time? Or do you
hit reload without waiting for the page to finish? (the above patch
might help in the latter case)
Can you tell me how many FilterProxy processes there are just before it
crashes?
ps aux | grep FilterProxy
and network connections?=20
netstat -anp | grep FilterProxy
And what is the version of LWP and HTTP::Daemon that you have installed?
My only other suggestion is to upgrade your perl, as this could be
caused by a perl bug (and let me know if that works...).
Cheers,
-- Bob
Guillaume Morin [gui...@mo...] wrote:
> Hi Bob,
>=20
> First I'd like to thank for FilterProxy which is pretty cool piece of
> software. I've found a bug in FilterProxy, here is a debug log :
>=20
> [10389 Thu May 2 15:55:44 2002] [ERROR] Exiting outside main loop
> (BUG!)
> [11027 Thu May 2 15:55:44 2002] [Perl WARNING] Use of uninitialized
> value at /usr/lib/perl5/5.00503/i386-linux/Socket.pm line 295.
> [11027 Thu May 2 15:55:44 2002] Use of uninitialized value at
> /usr/lib/perl5/5.00503/i386-linux/Socket.pm line 295.
> FilterProxy::__ANON__('Use of uninitialized value at
> /usr/lib/perl5/5.00503/i386-linux/...') called at
> /usr/lib/perl5/5.00503/i386-linux/Socket.pm line 295
> Socket::sockaddr_in(undef) called at ./FilterProxy.pl line 534
> FilterProxy::handler('HTTP::Daemon::ClientConn=3DGLOB(0x85b56a0)')
> called at ./FilterProxy.pl line 330
> [11027 Thu May 2 15:55:44 2002] [Perl ERROR] Bad arg length for
> Socket::unpack_sockaddr_in, length is 0, should be 16 at
> /usr/lib/perl5/5.00503/i386-linux/Socket.pm line 295.
> [11027 Thu May 2 15:55:44 2002] Bad arg length for
> Socket::unpack_sockaddr_in, length is 0, should be 16 at
> /usr/lib/perl5/5.00503/i386-linux/Socket.pm line 295.
> FilterProxy::__ANON__('Bad arg length for
> Socket::unpack_sockaddr_in, length is 0, shou...') called at
> /usr/lib/perl5/5.00503/i386-linux/Socket.pm line 295
> Socket::sockaddr_in(undef) called at ./FilterProxy.pl line 534
> FilterProxy::handler('HTTP::Daemon::ClientConn=3DGLOB(0x85b56a0)')
> called at ./FilterProxy.pl line 330
>=20
> - There is no other mentions of 11027 in the log)
> - 10389 is of course the main process
>=20
> I think the problem in 11027 causes the BUG in the parent (reported
> first, but I guess it is a race condition);
>=20
> The problem can be triggered only with IE, you just have to load several
> times a page with images.
>=20
> The patch I suggest, untested unfortunately, is
>=20
> 332: my($peername) =3D getpeername($client);
> + next if (! $peername);
>=20
> I will be able to test it tomorrow. I'll report if it works.=20
> If you think this patch is wrong and/or you have another idea, please
> write to me.
>=20
> TIA. Regards,
>=20
> --=20
> Guillaume Morin <gui...@mo...>
>=20
> Support the Debian Project (http://www.debian.org/)
-- Bob
Bob McElrath (rsm...@st...)=20
Univ. of Wisconsin at Madison, Department of Physics
|