[asterisk-bugs] [Asterisk 0011207]: DEBUG_THREADLOCALS: lock in main/threadstorage.c must be untracked?

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Dec 5 12:23:38 CST 2007


The following issue has been set as RELATED TO issue 0011279. 
====================================================================== 
http://bugs.digium.com/view.php?id=11207 
====================================================================== 
Reported By:                ys
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   11207
Category:                   CDR/General
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     closed
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 89126 
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             11-09-2007 07:32 CST
Last Modified:              12-05-2007 11:47 CST
====================================================================== 
Summary:                    DEBUG_THREADLOCALS: lock in main/threadstorage.c
must be untracked?
Description: 
I compile asterisk with DEBUG_THREADS, DEBUG_THREADLOCALS, DONT_OPTIMIZE.

When some thread stoped and thread destructor called,
__ast_threadstorage_object_remove hold the lock "&(&tls_objects)->lock" and
tracking information about this lock are placed into thread storage at
function: ast_store_lock_info() from util.c .

So, thread destructor can't remove all "thread-specific data", and call
destructor again and again...

 Conclusively, kernel kill thread with warning:
"Thread 81ea600 has exited with leftover thread-specific data after 4
destructor iterations".

Also, if MALLOC_DEBUG enabled, the "lock_info->thread_name" are
unallocated in this case. And memory debuger report error: "WARNING:
Freeing unused memory at ...."

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0011279 [patch] trunk: rwlock tracking support ...
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-05-07 12:23  russell        Relationship added       related to 0011279  
======================================================================




More information about the asterisk-bugs mailing list