[MDEV-358] safemalloc memory leak warnings for rpl.rpl_auto_increment Created: 2012-06-20  Updated: 2012-06-20  Resolved: 2012-06-20

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.24
Fix Version/s: 5.5.25

Type: Bug Priority: Major
Reporter: Kristian Nielsen Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: None


 Description   

This bug was introduced with merge from MySQL 5.5:

rpl.rpl_auto_increment 'mix,xtradb' w1 [ pass ] 1972
***Warnings generated in error logs during shutdown after running tests: rpl.rpl_auto_increment

Warning: 114 bytes lost, allocated at sql/log_event.cc:3223, sql/log_event.cc:1527, sql/log_event.cc:1379, sql/slave.cc:5017, sql/slave.cc:2711, sql/slave.cc:3622, perfschema/pfs.cc:1015, ??:0
Warning: 288 bytes lost, allocated at sql/log_event.h:1101, sql/log_event.cc:1527, sql/log_event.cc:1379, sql/slave.cc:5017, sql/slave.cc:2711, sql/slave.cc:3622, perfschema/pfs.cc:1015, ??:0
Warning: 70 bytes lost, allocated at sql/log_event.cc:1367, sql/slave.cc:5017, sql/slave.cc:2711, sql/slave.cc:3622, perfschema/pfs.cc:1015, ??:0, ??:0
...

The problem is the newly introduced class in MySQL 5.5, class
Deferred_log_events:

bool is_last(Log_event *ev)

{ return ev == last_added; }

;

But when the memory pointed to by last_added is freed, the last_added pointer
is not reset. This causes is_last() to randomly return true incorrectly,
depending on what exact pointer is returned by malloc(). This in turn causes
exec_relay_log_event() to randomly not free its events.



 Comments   
Comment by Kristian Nielsen [ 2012-06-20 ]

Fix pushed to lp:maria/5.5

Generated at Thu Feb 08 06:28:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.