apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45291] New: apr_thread_t is leaking
Date Thu, 26 Jun 2008 21:39:06 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45291

           Summary: apr_thread_t is leaking
           Product: APR
           Version: HEAD
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: Joe.Mudd@sas.com


Created an attachment (id=22184)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22184)
Proposed updates to 1.3 copy of win32/thread.c

I was trying to locate memory leaks while running an application on Windows and
found that the apr_thread_t allocated w/in apr_thread_create() is never freed.

This leak is noticable when the process has lots of transient threads.  In my
case the transient threads are managed by the thread pooling support in
apr_thread_pool.c.

In a test copy I updated apr_thread_create() to allocate the apr_thread_t out
of the pool created by apr_thread_create().  apr_thread_exit() and
apr_thread_join() had to be updated as well.  I will attach a diff of the
changes.

The updates assume that the thread creator will call either apr_thread_detach()
followed by apr_thread_exit() or apr_thread_join() to clean up the thread.


-- 
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@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message