Perlbal bug: Race condition with web_server role in _serve_request

Jeremy James jbj at forbidden.co.uk
Wed Sep 12 11:57:54 UTC 2007


Ugh. Brain no worky. Attachment actually included this time.

-------- Original Message --------
Subject: Re: Perlbal bug: Race condition with web_server role in
_serve_request
Date: Wed, 12 Sep 2007 12:48:12 +0100
From: Jeremy James <jbj at forbidden.co.uk>
To: perlbal at lists.danga.com
References: <46D6CF9E.2070906 at forbidden.co.uk>

Jeremy James wrote:
> We've bypassed the problem for now (reproxying affected files from
> apache), but will work on a patch soon - opening the file first, then
> call stat on the filehandle, obviously taking care to handle notfound
> and directory cases.

On Dormando's prodding, here's a patch that we've been using in
production for the last week with no obvious issues. It also fixes a
minor bug that a request for a non-file or directory (eg. a fifo or a
device node) would cause the server to hang until timeout with a 500
Internal Server Error. These now return 403 Forbidden errors directly.

We're running a slightly older version of perlbal, 1.57, but this patch
should be fine against a current version of ClientHTTPBase.pm (svn 697),
albeit with -2 line offsets.

-jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: perlbal_client_serve_request_open_race_fix.patch
Type: text/x-patch
Size: 3894 bytes
Desc: not available
Url : http://lists.danga.com/pipermail/perlbal/attachments/20070912/076bbe1e/perlbal_client_serve_request_open_race_fix.bin


More information about the perlbal mailing list