Bug 493023 - mod_rewrite: apr_global_mutex_lock(rewrite_log_lock) failed
Summary: mod_rewrite: apr_global_mutex_lock(rewrite_log_lock) failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: httpd
Version: 5.3
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Joe Orton
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-31 11:28 UTC by Roland Friedwagner
Modified: 2009-09-02 11:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 11:50:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache Bugzilla 46942 0 None None None Never
Red Hat Product Errata RHBA-2009:1380 0 normal SHIPPED_LIVE httpd bug fix update 2009-09-01 11:48:49 UTC

Description Roland Friedwagner 2009-03-31 11:28:26 UTC
Description of problem:

On httpd graceful restart httpd error log show up this:
[Tue Mar 31 12:50:42 2009] [error] [client 127.1.2.3] (43)Identifier removed: apr_global_mutex_lock(rewrite_log_lock) failed
[Tue Mar 31 12:50:42 2009] [error] [client 127.1.2.3] (43)Identifier removed: apr_global_mutex_unlock(rewrite_log_lock) failed


Version-Release number of selected component (if applicable):

Same Error show up in 2.2.11 upstream apache httpd release


Steps to Reproduce:

1. Create directory /tmp/foo
2. Add (this) minimal server config foo-httpd.conf:
   --%<--
     ServerRoot "/tmp/foo"
     DocumentRoot "/tmp/foo"
     PidFile /tmp/foo/foo-httpd.pid
     LoadModule rewrite_module /usr/lib/httpd/modules/mod_rewrite.so
     User nobody
     Group nobody
     ErrorLog  foo-error_log
     RewriteLog foo-rewrite.log

     RewriteLogLevel 1

     Listen 127.1.2.3:8765
     <VirtualHost 127.1.2.3:8765>
         ServerName foo.bar
         RewriteEngine On

         RewriteOptions Inherit

     </VirtualHost>
   --%<--
3. Start server: /usr/sbin/httpd -f /tmp/foo/foo-httpd.conf -k start
4. Do graceful restart: /usr/sbin/httpd -f /tmp/foo/foo-httpd.conf -k graceful
5. Find the apr_global_mutex_lock errors in /tmp/foo/foo-error_log
  
Additional info:
  The error vanish if 
    the RewriteLogLevel is set to 0
  or 
    the RewriteOptions Inherit ist _not_ set

Kind Regards,
Roland

Comment 1 Joe Orton 2009-03-31 12:38:55 UTC
mod_rewrite uses a global lock around calls to the logging function:

- when logging is enabled, it takes this lock for each log entry written
- when a graceful restart happens, the global lock is deleted even though it may still be used by existing child processes
- those children will hence log an error if they fail to take the lock
- if you are using the default MPM (prefork) not a threaded MPM (worker) this message is entirely harmless as the lock is entirely useless in that case anyway

Comment 7 errata-xmlrpc 2009-09-02 11:50:52 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1380.html


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