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/05/02 00:27:17 UTC

DO NOT REPLY [Bug 47138] New: Reverse Proxy & Balancer generate error fault when shutting down on windows

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

           Summary: Reverse Proxy & Balancer generate error fault when
                    shutting down on windows
           Product: Apache httpd-2
           Version: 2.2.11
          Platform: PC
        OS/Version: Windows Server 2003
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: dbuss@novell.com


Created an attachment (id=23591)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23591)
patch for ~2.2.11

Improperly shared resources?

 While shutting down a debug version of apache on a windows server 2003 with
debug MSDev libraries,  the underlying os libraries were complaining about the
double free of a block of memory.   

  It appears that when ap_proxy_add_worker_to_balancer(apr_pool_t *pool,
proxy_balancer *balancer, proxy_worker *worker) is called it uses memcpy to
duplicate the proxy worker but doesn't do anything to change the cleanup
routines or to make it's own copy of allocated resources like the pool and
possibly the semaphore.  This results in two proxy workers structures each
pointing to the same pool and semaphore.  

  During cleanup the original worker and the balancer worker each free their
pool (which is the same pool), resulting in the pool being placed in the pool
free list twice, now when the memory is freed there will be a double free of
the memory representing the pool.

My patch for the issue is attached.

-- 
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