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