Details
-
Bug
-
Resolution: Fixed
-
Major
-
master, 5.0.0
-
Untriaged
-
Unknown
Description
valgrind flags a small memory leak (16 bytes) which is explained in the commit http://review.couchbase.org/#/c/76854/ (0bfe53645a)
Note the back trace may differ as it is the first allocation that triggers the allocation of the TLS counter.
==24449== 16 bytes in 1 blocks are definitely lost in loss record 2 of 14
|
==24449== at 0x4C2E1D6: operator new(unsigned long) (vg_replace_malloc.c:334)
|
==24449== by 0xAA3ED5D: EPStats::memAllocated(unsigned long) (stats.cc:30)
|
==24449== by 0xAA9CBEB: ObjectRegistry::memoryAllocated(unsigned long) (objectregistry.cc:196)
|
==24449== by 0xAA29D0D: MemoryTracker::NewHook(void const*, unsigned long) (memory_tracker.cc:87)
|
==24449== by 0x65757B3: cb_invoke_new_hook(void const*, unsigned long) (cb_malloc.cc:130)
|
==24449== by 0x65755B2: cb_calloc (cb_malloc.cc:64)
|
==24449== by 0x635EC4E: cJSON_calloc(unsigned long, unsigned long) (cJSON.cc:78)
|
==24449== by 0x635ED23: cJSON_New_Item() (cJSON.cc:101)
|
==24449== by 0x6360D2B: cJSON_CreateArray (cJSON.cc:979)
|
==24449== by 0xA9E9C96: FailoverTable::cacheTableJSON() (failover-table.cc:241)
|
==24449== by 0xA9E9189: FailoverTable::createEntry(unsigned long) (failover-table.cc:96)
|
==24449== by 0xA9E8C70: FailoverTable::FailoverTable(unsigned long) (failover-table.cc:30)
|
This leak is to be suppressed as part of this MB whilst we investigate a suitable fix.
We should investigate the use of Boost TLS which suggests such a leak would be addressed by their library - http://www.boost.org/doc/libs/1_64_0/doc/html/thread/thread_local_storage.html
Attachments
Issue Links
For Gerrit Dashboard: MB-24860 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
79542,4 | MB-24860: Suppress the TL counter leak | master | tlm | Status: MERGED | +2 | +1 |
82428,1 | [MB-24860] - Add boost thread lib support | master | kv_engine | Status: ABANDONED | 0 | -1 |
82535,4 | MB-24860 Cleanup thread-locals properly when ThreadLocal destructor runs | master | kv_engine | Status: MERGED | +2 | +1 |
82572,3 | MB-24860 WIP | spock | kv_engine | Status: ABANDONED | -1 | -1 |
87683,2 | MB-24860 WIP | master | kv_engine | Status: ABANDONED | 0 | -1 |
87894,8 | MB-24860: Add get_cpu_count and get_cpu_index | master | platform | Status: ABANDONED | 0 | -1 |
87905,3 | MB-24860: Add get_cpu_count and get_cpu_index | master | platform | Status: MERGED | +2 | +1 |
87911,16 | MB-24860: Use CoreStore for totalMemory | master | kv_engine | Status: MERGED | +2 | +1 |
87972,9 | MB-24860: Add benchmark for memoryUsed stat | master | kv_engine | Status: MERGED | +2 | +1 |
88184,2 | MB-24860: Add CoreStore container class | master | platform | Status: MERGED | +2 | +1 |
88609,10 | MB-24860: Switch memory tracking to be more read efficient | master | kv_engine | Status: MERGED | +2 | +1 |
88610,12 | MB-24860: Make mem_used merge threshold a percent of max_size | master | kv_engine | Status: MERGED | +2 | +1 |
88611,12 | MB-24860: Rename getTotalMemUsed to getEstimatedTotalMemoryUsed | master | kv_engine | Status: MERGED | +2 | +1 |
88690,3 | MB-24860: Add compare_and_exchange onto RelaxedAtomic | master | platform | Status: MERGED | +2 | +1 |
88703,2 | MB-24860: Add exchange onto RelaxedAtomic | master | platform | Status: MERGED | +2 | +1 |
88714,1 | MB-24860: Switch memory tracking to be more read efficient | master | kv_engine | Status: ABANDONED | 0 | -1 |
88716,10 | MB-24860: Change memory stats from estimates to precise | master | kv_engine | Status: MERGED | +2 | +1 |
88765,4 | MB-24860: Make mem_used_merge_threshold_percent dynamic | master | kv_engine | Status: MERGED | +2 | +1 |
88920,2 | MB-24860: Prevent estimated memory returning negative | master | kv_engine | Status: MERGED | +2 | +1 |
88921,4 | MB-24860: Change getPreciseTotalMemoryUsed to be more precise | master | kv_engine | Status: MERGED | +2 | +1 |
93695,1 | Revert "MB-24860: Use CoreStore for totalMemory" | vulcan | kv_engine | Status: ABANDONED | 0 | -1 |