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

Crash when MariaDB is replica of MySQL 8.0

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
    • 10.6.21, 10.11.11, 11.4.5, 11.7.2
    • Replication
    • None

    Description

      Configure MySQL to use non-default settings:

      character_set_server = 'utf8mb4'
      collation_server='utf8mb4_unicode_520_ci'
      character_set_client_handshake=0
      binlog_checksum=0
      

      Configure MariaDB with skip-slave-start

      Connect to MySQL:

      MariaDB [(none)]> system truncate -s0 /var/lib/mysql/mg.err
      MariaDB [(none)]> set global replicate_wild_do_table='test.%';
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> change master to master_host='mysql8', master_user='replica', master_password='SDfkhskj53!';
      Query OK, 0 rows affected (0.008 sec)
       
      MariaDB [(none)]> start slave io_thread;
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> stop slave;
      ERROR 2013 (HY000): Lost connection to server during query
      

      2022-09-14  5:09:20 4 [Note] Slave I/O thread: Start asynchronous replication to master 'replica@mysql8:3306' in log '' at position 4
      2022-09-14  5:09:20 4 [ERROR] Slave I/O: error connecting to master 'replica@mysql8:3306' - retry-time: 60  maximum-retries: 100000  message: Access denied for user 'replica'@'104.130.132.75' (using password: YES), Internal MariaDB error code: 1045
      2022-09-14  5:09:27 4 [Note] Slave I/O thread killed while connecting to master
      2022-09-14  5:09:27 4 [Note] Slave I/O thread exiting, read up to log 'FIRST', position 4, master mysql8:3306
      220914  5:09:27 [ERROR] mysqld got signal 11 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed,
      something is definitely wrong and this may fail.
       
      Server version: 10.7.5-MariaDB-log
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=2
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467995 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7fe11c0009b8
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7fe15869aa70 thread_stack 0x49000
      /usr/sbin/mariadbd(my_print_stacktrace+0x2e)[0x5574175f047e]
      /usr/sbin/mariadbd(handle_fatal_signal+0x307)[0x55741705edf7]
      sigaction.c:0(__restore_rt)[0x7fe17235b630]
      /usr/sbin/mariadbd(+0x9ea8f7)[0x5574170318f7]
      /usr/sbin/mariadbd(mysql_close+0x22)[0x557417034eb2]
      /usr/sbin/mariadbd(handle_slave_io+0x887)[0x557416d7e857]
      /usr/sbin/mariadbd(+0xc3b8ac)[0x5574172828ac]
      nptl/pthread_create.c:307(start_thread)[0x7fe172353ea5]
      x86_64/clone.S:113(__clone)[0x7fe17186eb0d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x0): (null)
      Connection ID (thread ID): 4
      Status: NOT_KILLED
      

      Attachments

        Issue Links

          Activity

            Thank you for the report, mg. I can reproduce this. For now I will gather more information about the behavior.

            angelique.sklavounos Angelique Sklavounos (Inactive) added a comment - Thank you for the report, mg . I can reproduce this. For now I will gather more information about the behavior.

            I've attached a core dump for the crash.

            I did a standard install of MySQL 8.0.30, then started the client as root and ran the following:

            create user 'r1'@'%' identified by 'password';
            grant replication slave on *.* to 'r1'@'%';
            

            I found that the non-default settings in the MySQL my.cnf in the description were not necessary to recreate the crash.

            In MariaDB 10.7.5, only the following is needed for the crash:

            change master to master_host='mysql8', master_user='r1', master_password='password';
            start slave io_thread;
            stop slave;
            

            I still need to test against other versions of MariaDB.

            angelique.sklavounos Angelique Sklavounos (Inactive) added a comment - I've attached a core dump for the crash. I did a standard install of MySQL 8.0.30, then started the client as root and ran the following: create user 'r1' @ '%' identified by 'password' ; grant replication slave on *.* to 'r1' @ '%' ; I found that the non-default settings in the MySQL my.cnf in the description were not necessary to recreate the crash. In MariaDB 10.7.5, only the following is needed for the crash: change master to master_host= 'mysql8' , master_user= 'r1' , master_password= 'password' ; start slave io_thread; stop slave; I still need to test against other versions of MariaDB.
            mg MG added a comment -

            Thanks for looking at this, @angelique.sklavounos

            In my earlier testing of 10.4 and 10.6, I would not get a crash before the MySQL my.cnf changes:

            MariaDB [(none)]> SET @@session.character_set_client=255,@@session.collation_connection=255,@@session.collation_server=255/*!*/;
            ERROR 1115 (42000): Unknown character set: '255'
            

            mg MG added a comment - Thanks for looking at this, @angelique.sklavounos In my earlier testing of 10.4 and 10.6, I would not get a crash before the MySQL my.cnf changes: MariaDB [(none)]> SET @@session.character_set_client=255,@@session.collation_connection=255,@@session.collation_server=255/*!*/; ERROR 1115 (42000): Unknown character set: '255'

            In my earlier testing of 10.4 and 10.6, I would not get a crash before the MySQL my.cnf changes:

            mg which version of 10.4 and 10.6 did you use? I tested with 10.6.9 and still get a crash.

            angelique.sklavounos Angelique Sklavounos (Inactive) added a comment - In my earlier testing of 10.4 and 10.6, I would not get a crash before the MySQL my.cnf changes: mg which version of 10.4 and 10.6 did you use? I tested with 10.6.9 and still get a crash.
            mg MG added a comment - - edited

            Hello,

            My apologies, the original error ERROR 1273 (HY000) at line 18259: Unknown collation was on an ancient 10.4.6

            With 10.4.26 I get the crash with MySQL 8 defaults as long as any % grant exists:

            [root@maria ~]# yum install MariaDB-server-10.4.26-1.el7.centos
            [root@maria ~]# systemctl start mariadb
            [root@maria ~]# mysql -e 'change master to master_host="mysql8", master_user="random", master_password="anything"'
            [root@maria ~]# mysql -e 'start slave'
            [root@maria ~]# mysql -e 'stop slave'
            ERROR 2013 (HY000) at line 1: Lost connection to MySQL server during query
            

            mg MG added a comment - - edited Hello, My apologies, the original error ERROR 1273 (HY000) at line 18259: Unknown collation was on an ancient 10.4.6 With 10.4.26 I get the crash with MySQL 8 defaults as long as any % grant exists: [root@maria ~]# yum install MariaDB-server-10.4.26-1.el7.centos [root@maria ~]# systemctl start mariadb [root@maria ~]# mysql -e 'change master to master_host="mysql8", master_user="random", master_password="anything"' [root@maria ~]# mysql -e 'start slave' [root@maria ~]# mysql -e 'stop slave' ERROR 2013 (HY000) at line 1: Lost connection to MySQL server during query
            mg MG added a comment -

            Hello,

            Actually I can't reproduce Unknown collation on my own 10.4.6 but (I see the same crash as my last comment) but on a MySQL 8 instance (Ali) that I don't have access to that is the error I get.

            Sorry, I can't provide more at this time.

            mg MG added a comment - Hello, Actually I can't reproduce Unknown collation on my own 10.4.6 but (I see the same crash as my last comment) but on a MySQL 8 instance (Ali) that I don't have access to that is the error I get. Sorry, I can't provide more at this time.

            Great, thanks for the clarification, mg.

            angelique.sklavounos Angelique Sklavounos (Inactive) added a comment - Great, thanks for the clarification, mg .

            This MDEV will be fixed when MDEV-35643 is pushed

            monty Michael Widenius added a comment - This MDEV will be fixed when MDEV-35643 is pushed

            Fixed as part of MDEV-35643 Add support for MySQL 8.0 binlog events

            monty Michael Widenius added a comment - Fixed as part of MDEV-35643 Add support for MySQL 8.0 binlog events

            People

              monty Michael Widenius
              mg MG
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.