[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 11:29:25 CST 2007


The following issue has been ASSIGNED. 
====================================================================== 
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:                     assigned
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:              
====================================================================== 
Date Submitted:             11-09-2007 07:32 CST
Last Modified:              12-05-2007 11:29 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 ...."

====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-05-07 11:29  svnbot         Status                   new => assigned     
12-05-07 11:29  svnbot         Assigned To               => russell         
======================================================================




More information about the asterisk-bugs mailing list