You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Matthew Emmerton <me...@undergrad.math.uwaterloo.ca> on 1997/11/11 01:56:40 UTC

mod_rewrite/1391: mod_rewrite tries to perform file locking on a pipe

>Number:         1391
>Category:       mod_rewrite
>Synopsis:       mod_rewrite tries to perform file locking on a pipe
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Nov 10 17:00:00 PST 1997
>Last-Modified:
>Originator:     memmerto@undergrad.math.uwaterloo.ca
>Organization:
apache
>Release:        post 1.2b6
>Environment:
SCO OpenServer 5.0.0 and 5.0.2
>Description:
Under SCO OpenServer 5.0.0 and 5.0.2, using fcntl() to lock a pipe is illegal.

This results in an error 22 (EINVAL) when mod_rewrite tries to lock the pipe when fd_lock() is called from lookup_map_program() (which uses unnamed pipes to the lookup process).

When this occurs, the lock isn't created, and the child process of Apache immediately terminates, which causes a host of client errors (conenction unexpectdly terminated, unknown response, etc.)

This bug is documented at SCO's website:

http://www5.sco.com/cgi-bin/waisgate?WAISdocID=0518327359+0+0+0&WAISaction=retrieve
>How-To-Repeat:
Get a SCO 5.0.0 or 5.0.2 box, create a simple shell script to perform some task of a rewrite operation, and watch it provide you with various client errors.

(I've fixed my servers, but I can break one if you want a demonstration.)
>Fix:
If you're running SCO ODT 5.0.0 or 5.0.2, simply add this to mod_rewrite.h
(I guess SCO is as braindead as Sun sometimes... <g>)

#ifdef SCO5
#undef USE_PIPE_LOCKING
#endif
%0
>Audit-Trail:
>Unformatted: