Bug #76165 NdbEventBuffer leaks Gci_op
Submitted: 5 Mar 2015 7:51 Modified: 25 Mar 2015 10:03
Reporter: Mauritz Sundell Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S3 (Non-critical)
Version:7.4.4 OS:Any
Assigned to: CPU Architecture:Any

[5 Mar 2015 7:51] Mauritz Sundell
Description:
When the NdbEventBuffer is destroyed, remaining Gci_op within contained EventBufData_list are never freed.

Also when all subscription for an NdbEventBuffer are canceled and a new one is added, active and completed (but not moved to user thread) are cleared without releasing gci ops.  Also in this case the EventBufData of the list are not returned to free list and will be lost for reuse.

How to repeat:
run ./mtr --valgrind ndb.ndb_alter_table_online ndb.ndb_statistics0 ndb.ndb_statistics1

Suggested fix:
Free gci ops when EventBufData  are removed from list.
Return EventBufdata to free list when purging gci containers.
[25 Mar 2015 10:03] Jon Stephens
Documented fix in the NDB 7.4.6 changelog, as follows:

    When an instance of NdbEventBuffer was destroyed, remaining
    references to GCI operations in the event buffer data list were
    never freed. Now these are freed, and items from the event bufer
    data list are returned to the free list when purging GCI
    containers.
    
Closed.