httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41142] New: - Endless loop in apr_allocator_destroy
Date Sun, 10 Dec 2006 12:34:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41142>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41142

           Summary: Endless loop in apr_allocator_destroy
           Product: Apache httpd-2
           Version: 2.2.3
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Keywords: PatchAvailable
          Severity: blocker
          Priority: P1
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: jens@strawberry.com


The function apr_allocator_destroy removes pool nodes
from memory. Those nodes are organized as a chain in which 
each node points to the subsequent one using its 'next'
member.

If mod_dbd in conjunction with apr_dbd_pgsql is in use it
happens, that the 'next' pointer of a node points to the
node itsself. This introduces an endless loop consuming 100%
of CPU.

The problem IMHO is introduced into the chain of nodes at
some other location. However as a workaround I've applied the
following patch to the destroy function to become aware of
the problem and treat it correctly:

*** ./srclib/apr/memory/unix/apr_pools.c.fcs    Sun Dec 10 12:44:28 2006
--- ./srclib/apr/memory/unix/apr_pools.c        Sun Dec 10 12:45:52 2006
***************
*** 107,112 ****
--- 107,115 ----
      for (index = 0; index < MAX_INDEX; index++) {
          ref = &allocator->free[index];
          while ((node = *ref) != NULL) {
+           /* jens 2006/12/10 - this should not happen, however it intro-
+              duced endless loops when apr_dbd_pgsql is in use */
+           if( node->next == node) node->next = NULL;
              *ref = node->next;
              free(node);
          }

This problem is a blocking point for Apache utilizing PostgreSQL
as authentication provider.

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

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


Mime
View raw message