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

crash/read of freed memory when changing master with named connection

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.0.0
    • Fix Version/s: 10.0.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      On Linux, produced valgrind warnings.
      On Windows mysqld.exe segfaulted.

      Description

      How to repeat:
      ----------------
      change master 'abc' to relay_log_file='';

      Description:
      ---------------------
      Linux, valgrind output:

      Invalid read of size 8
      at: mysql_execute_command (sql_parse.cc:2589)
      by: mysql_parse (sql_parse.cc:6056)
      by: dispatch_command (sql_parse.cc:1216)
      by: do_command (sql_parse.cc:945)
      by: do_handle_one_connection (sql_connect.cc:1254)
      by: handle_one_connection (sql_connect.cc:1168)
      by: start_thread (pthread_create.c:309)
      by: clone (clone.S:115)
      Address 0x15b2dae0 is 0 bytes inside a block of size 16,216 free'd
      at: operator delete (vg_replace_malloc.c:480)
      by: free_key_master_info (rpl_mi.cc:635)
      by: my_hash_delete (hash.c:604)
      by: Master_info_index::remove_master_info (rpl_mi.cc:1049)
      by: mysql_execute_command (sql_parse.cc:2588)
      by: mysql_parse (sql_parse.cc:6056)
      by: dispatch_command (sql_parse.cc:1216)
      by: do_command (sql_parse.cc:945)
      by: do_handle_one_connection (sql_connect.cc:1254)
      by: handle_one_connection (sql_connect.cc:1168)
      by: start_thread (pthread_create.c:309)
      by: clone (clone.S:115)

      Windows, call stack:
      mysqld.exe!mysql_execute_command()[sql_parse.cc:2592]
      mysqld.exe!mysql_parse()[sql_parse.cc:6061]
      mysqld.exe!dispatch_command()[sql_parse.cc:1219]
      mysqld.exe!do_command()[sql_parse.cc:951]
      mysqld.exe!threadpool_process_request()[threadpool_common.cc:225]
      mysqld.exe!io_completion_callback()[threadpool_win.cc:568]

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            Elena, is that applicable to 5.x too?

            Show
            serg Sergei Golubchik added a comment - Elena, is that applicable to 5.x too?
            Hide
            elenst Elena Stepanova added a comment - - edited

            No, not applicable to 5.5, named connections came with multi-source replication.
            (And there is no crash with "change master to", without a name).
            Assigned to Monty for now, please re-assign if needed.

            Show
            elenst Elena Stepanova added a comment - - edited No, not applicable to 5.5, named connections came with multi-source replication. (And there is no crash with "change master to", without a name). Assigned to Monty for now, please re-assign if needed.
            Hide
            knielsen Kristian Nielsen added a comment -

            Verified as described

            Show
            knielsen Kristian Nielsen added a comment - Verified as described
            Hide
            knielsen Kristian Nielsen added a comment -

            Fixed and pushed to 10.0-base.
            Will be fixed in 10.0 after next merge of 10.0-base to 10.0.

            Show
            knielsen Kristian Nielsen added a comment - Fixed and pushed to 10.0-base. Will be fixed in 10.0 after next merge of 10.0-base to 10.0.

              People

              • Assignee:
                knielsen Kristian Nielsen
                Reporter:
                sbester1 sbester1
              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 - 3 hours
                  3h