You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2009/03/31 13:27:04 UTC

DO NOT REPLY [Bug 46942] New: error log messages: apr_global_mutex_lock(rewrite_log_lock) failed

https://issues.apache.org/bugzilla/show_bug.cgi?id=46942

           Summary: error log messages:
                    apr_global_mutex_lock(rewrite_log_lock) failed
           Product: Apache httpd-2
           Version: 2.2.11
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: mod_rewrite
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: roland.friedwagner@wu-wien.ac.at


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:

0. Build test apache: ./configure --prefix=/tmp/httpd-2.2.11
--enable-mods-shared=most --enable-ssl --enable-proxy
1. Create directory /tmp/foo
2. Add (this) minimal server config foo-httpd.conf:
   --%<--
     ServerRoot "/tmp/foo"
     DocumentRoot "/tmp/foo"
     PidFile /tmp/foo/httpd.pid
     LoadModule dir_module /tmp/httpd-2.2.11/modules/mod_dir.so
     LoadModule rewrite_module /tmp/httpd-2.2.11/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: /tmp/httpd-2.2.11/bin/httpd -f /tmp/foo/foo-httpd.conf -k
start
4. Do graceful restart: /tmp/httpd-2.2.11/bin/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 messages vanish if 
    the RewriteLogLevel is set to 0
  or 
    the RewriteOptions Inherit ist _not_ set

Kind Regards,
Roland

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46942] error log messages: apr_global_mutex_lock(rewrite_log_lock) failed

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46942


Roland Friedwagner <ro...@wu-wien.ac.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roland.friedwagner@wu-wien.
                   |                            |ac.at




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46942] error log messages: apr_global_mutex_lock(rewrite_log_lock) failed

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46942

Stefan Fritsch <sf...@sfritsch.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Stefan Fritsch <sf...@sfritsch.de> 2011-09-17 16:00:37 UTC ---
2.2.12 / r792910

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46942] error log messages: apr_global_mutex_lock(rewrite_log_lock) failed

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46942





--- Comment #2 from Joe Orton <jo...@redhat.com>  2009-06-11 01:01:27 PST ---
Ah, this was reported directly to us too - I took a look, and I can't see what
the point of the logging serialisation is at all:

http://marc.info/?l=apache-httpd-dev&m=124282193217344&w=2

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46942] error log messages: apr_global_mutex_lock(rewrite_log_lock) failed

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46942





--- Comment #3 from Dan Poirier <po...@pobox.com>  2009-06-11 04:36:01 PST ---
Created an attachment (id=23792)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23792)
Remove global mod_rewrite log lock

I like it!  The Gordian knot solution.

Here's a patch against trunk to remove the lock.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46942] error log messages: apr_global_mutex_lock(rewrite_log_lock) failed

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46942


Dan Poirier <po...@pobox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3




--- Comment #1 from Dan Poirier <po...@pobox.com>  2009-06-10 13:07:17 PST ---
I think I've figured out what's going on (with some help from Greg Ames).  Not
sure yet how to fix it.

The global mutex used by mod_rewrite to serialize writing to the rewrite log is
created in post_config().  So when the parent starts its graceful restart and
cleans up the old configuration, it's going to clean up - destroy - that global
mutex.  Children still finishing up requests now have a reference to a mutex
that no longer exists, hence attempts to lock the mutex fail.

I think the worst effect of this is the possibility that a few rewritelog
messages get intermingled in the log, which isn't too important.  Still, it
would be nice to figure out a way to make this work right.  Maybe somebody who
knows how modules work better than I knows how to do this.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46942] error log messages: apr_global_mutex_lock(rewrite_log_lock) failed

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46942


Ruediger Pluem <rp...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk




--- Comment #4 from Ruediger Pluem <rp...@apache.org>  2009-06-11 05:20:14 PST ---
Fixed in trunk as r783734 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=783734 ).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org