Bug 493023 - mod_rewrite: apr_global_mutex_lock(rewrite_log_lock) failed
mod_rewrite: apr_global_mutex_lock(rewrite_log_lock) failed
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: httpd (Show other bugs)
All Linux
low Severity low
: rc
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2009-03-31 07:28 EDT by Roland Friedwagner
Modified: 2009-09-02 07:50 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-02 07:50:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Apache Bugzilla 46942 None None None Never

  None (edit)
Description Roland Friedwagner 2009-03-31 07:28:26 EDT
Description of problem:

On httpd graceful restart httpd error log show up this:
[Tue Mar 31 12:50:42 2009] [error] [client] (43)Identifier removed: apr_global_mutex_lock(rewrite_log_lock) failed
[Tue Mar 31 12:50:42 2009] [error] [client] (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

         ServerName foo.bar
         RewriteEngine On

         RewriteOptions Inherit

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
    the RewriteOptions Inherit ist _not_ set

Kind Regards,
Comment 1 Joe Orton 2009-03-31 08:38:55 EDT
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 07:50:52 EDT
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.


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