You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2008/06/27 14:27:19 UTC

DO NOT REPLY [Bug 42728] mod_ssl thread detaching not releasing handles

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


Joe Mudd <Jo...@sas.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Joe.Mudd@sas.com




--- Comment #3 from Joe Mudd <Jo...@sas.com>  2008-06-27 05:27:19 PST ---
There is a race condition between apr_thread_create() and dummy_worker(). 
dummy_worker() could start and proceed past the access of thd->td before
apr_thread_create() has had a chance to set (*new)->td.  This sets the TLS
tls_apr_thread value to NULL.  So when the created thread calls
apr_os_thread_current(), the current thread's handle is duplicated and placed
in the tls_apr_thread TLS slot.  The tls_apr_thread recorded HANDLE is never
closed.

The race condition and when the thread created as detached (attr->detach) as
described in Comment 1 and Comment 2, leak a HANDLE if apr_os_thread_current()
is called.


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