Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-358

safemalloc memory leak warnings for rpl.rpl_auto_increment

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.24
    • Fix Version/s: 5.5.25
    • Component/s: None
    • 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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            knielsen Kristian Nielsen added a comment -

            Fix pushed to lp:maria/5.5

            Show
            knielsen Kristian Nielsen added a comment - Fix pushed to lp:maria/5.5

              People

              • Assignee:
                knielsen Kristian Nielsen
                Reporter:
                knielsen Kristian Nielsen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 30 minutes
                  4h 30m