client Backend.pm
dormando
dormando at rydia.net
Sat Feb 2 09:38:51 UTC 2008
Good find... we'll try to get this patched up.
Derek Boonstra wrote:
> Hi,
>
> While testing MogileFS, I bumped into an issue that may not be unique to
> my environment.
>
> If a process that contains a MogileFS::Client object closes stdin, as is
> often true if the process is an Apache mod_perl child, there is
> potential for the client to lose readability to its trackers and die in
> the midst of its request.
>
> This event occurs because my systems assign fd(0) to stdin. If stdin is
> shut, fd(0) goes back into the pool of available descriptors. If the
> system then assigns fd(0) to a tracker socket, &_wait_for_readability of
> Backend.pm always returns false.
>
> sub _wait_for_readability {
> my ($fileno, $timeout) = @_;
> return 0 unless $fileno && $timeout;
> ...
> }
>
> :: The patch is simple::
> sub _wait_for_readability {
> my ($fileno, $timeout) = @_;
> return 0 unless defined($fileno) && $timeout;
> ...
> }
>
> I hope this information helps somebody.
> There are also a couple fileno checks in MogileFS::Util that may need
> review.
>
>
>
>
More information about the mogilefs
mailing list