Bug 138428 - The RewriteLock file is not be created
Summary: The RewriteLock file is not be created
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: httpd
Version: 3.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-09 07:05 UTC by Y
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-11-10 09:51:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Y 2004-11-09 07:05:51 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
The file of RewriteLock directive is not created.  It is important 
for using rewrite maps with external programs.

The machine runs RHEL3 (Update 2) and the httpd-2.0.46-32.ent 
actually comes with the RHEL3 (Update 2).

Version-Release number of selected component (if applicable):
httpd-2.0.46-32.ent

How reproducible:
Always

Steps to Reproduce:
1.Define the directive RewriteLock
2.Turn on the rewrite engine and define some rewrite maps with 
external programs
3.Start the Apache daemon
    

Actual Results:  The RewriteLock file is not created.

Expected Results:  The RewriteLock is created.

Additional info:

Comment 1 Joe Orton 2004-11-09 12:16:16 UTC
The RewriteLock directive is used to ensure that only one httpd child
writes to the RewriteMap program at a time.  The RewriteLock is
implemented as a SysV semaphore by default on Linux in Apache httpd
2.0, so no file will be created on the filesystem.

Can you describe exactly what issue you are seeing with the RewriteLock?

Comment 2 Y 2004-11-10 08:44:04 UTC
Thanks for you reply, Joe.

Below are the build parameters of the httpd:

# /usr/sbin/httpd -V
Server version: Apache/2.0.46
Server built:   Mar  1 2004 12:14:32
Server's Module Magic Number: 20020903:4
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

Do you mean that the RewriteMap program will work properly when many 
requests fall into the RewriteRule at the same time even though the 
RewriteLock file is not created?

Also, as I defined serveral RewriteMap programs for different 
RewriteRules, can the Apache handle properly under this case?

Thanks a lot!


Comment 3 Joe Orton 2004-11-10 09:51:29 UTC
> Do you mean that the RewriteMap program will work properly when many 
> requests fall into the RewriteRule at the same time even though the 
> RewriteLock file is not created?

Yes, so long as the RewriteLock directive is present in the
configuration it will work correctly.  Internally the choice of lock
means that no file will be present on Linux.

> Also, as I defined serveral RewriteMap programs for different 
> RewriteRules, can the Apache handle properly under this case?

Yes, that should work fine too.   I'll mark this report NOTABUG.


Note You need to log in before you can comment on or make changes to this bug.