Summary: | ASTERISK-12879: tcptls.c: ast_make_file_from_fd() memory leak if DEBUG_THREADLOCALS defined. | ||
Reporter: | Yuri (ys) | Labels: | |
Date Opened: | 2008-10-13 09:06:41 | Date Closed: | 2009-02-25 21:45:43.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/Netsock |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | If i compile and run current asterisk trunk with DEBUG_THREADLOCALS options enabled, after each "wget http://localhost:8088/" memory usage by utils.c are increased... ****** ADDITIONAL INFORMATION ****** For example: *CLI> threadstorage show summary 68260 bytes in 34 allocations in file utils.c 1876 bytes in 7 allocations in file logger.c 70136 bytes allocated in 41 allocations *CLI> // from shell called: "wget http://localhost:8088/" *CLI> threadstorage show summary 70328 bytes in 35 allocations in file utils.c 1876 bytes in 7 allocations in file logger.c 268 bytes in 1 allocation in file cli.c 72472 bytes allocated in 43 allocations Each time, in "CLI> threadstorage show allocations" appear new one entry: 2068 bytes allocated in ast_store_lock_info at line 617 of utils.c (thread 0xXXXXXXX) | ||
Comments: | By: Leif Madsen (lmadsen) 2008-10-14 11:16:20 Initial triage complete. Waiting for developer to confirm issue. By: Digium Subversion (svnbot) 2008-12-16 11:06:24.000-0600 Repository: asterisk Revision: 164736 U branches/1.4/include/asterisk/threadstorage.h U branches/1.4/main/threadstorage.c ------------------------------------------------------------------------ r164736 | russell | 2008-12-16 11:06:24 -0600 (Tue, 16 Dec 2008) | 14 lines Fix memory leak and invalid reporting issues with DEBUG_THREADLOCALS. One issue was that the ast_mutex_* API was being used within the context of the thread local data destructors. We would go off and allocate more thread local data while the pthread lib was in the middle of destroying it all. This led to a memory leak. Another issue was an invalid argument being provided to the the object_add API call. (closes issue ASTERISK-12879) Reported by: ys Tested by: Russell ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=164736 By: Digium Subversion (svnbot) 2009-02-25 21:45:43.000-0600 Repository: asterisk Revision: 164736 U branches/1.4/include/asterisk/threadstorage.h U branches/1.4/main/threadstorage.c ------------------------------------------------------------------------ r164736 | russell | 2008-12-16 11:06:29 -0600 (Tue, 16 Dec 2008) | 14 lines Fix memory leak and invalid reporting issues with DEBUG_THREADLOCALS. One issue was that the ast_mutex_* API was being used within the context of the thread local data destructors. We would go off and allocate more thread local data while the pthread lib was in the middle of destroying it all. This led to a memory leak. Another issue was an invalid argument being provided to the the object_add API call. (closes issue ASTERISK-12879) Reported by: ys Tested by: russell ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=164736 |