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

Replica server crashes with an invalid pointer when using a user created with the PARSEC plugin for replication

Details

    Description

      source include/master-slave.inc;
       
      sync_slave_with_master;
      install soname 'auth_parsec';
       
      # create a user for replication with PARSEC plugin 
      connection master;
      install soname 'auth_parsec';
      create user rpluser@'%' identified via parsec using PASSWORD('rpl_pass');
      grant replication slave on *.* to rpluser@'%';
       
      sync_slave_with_master;
       
      # Set the slave to connect using the user created with the PARSEC plugin for replication
      stop slave;
      --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
      eval change master to
        master_user='rpluser',
        master_password='rpl_pass';
      start slave;
      

      Leads to

      11.6.0 c7ab761bba21146569932ae001ce154f1eeb7859 (Debug)

      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055748f2adaad in my_write_core (sig=sig@entry=6) at /test/mtest/MDEV-32618/11.6/mysys/stacktrace.c:424
      #2  0x000055748eadb41f in handle_fatal_signal (sig=6) at /test/mtest/MDEV-32618/11.6/sql/signal_handler.cc:357
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000154212579859 in __GI_abort () at abort.c:79
      #6  0x00001542125e426e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x15421270e298 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
      #7  0x00001542125ec2fc in malloc_printerr (str=str@entry=0x15421270c5f5 "realloc(): invalid pointer") at malloc.c:5347
      #8  0x00001542125f20ba in __GI___libc_realloc (oldmem=0x1541d4018db8, bytes=bytes@entry=62) at malloc.c:3175
      #9  0x00001542100054c8 in auth (vio=0x1541edd0df50, mysql=0x1541d4010268) at /test/mtest/MDEV-32618/11.6/libmariadb/plugins/auth/parsec.c:178
      #10 0x000055748ea9c363 in run_plugin_auth (mysql=mysql@entry=0x1541d4010268, data=data@entry=0x1541d4014cf9 "\326\301+\210F\316\353\312{\377\346{\220\225\276(b\310mysql_native_password", 
          data_len=data_len@entry=21, data_plugin=data_plugin@entry=0x1541d4014d0e "ql_native_password", db=db@entry=0x0) at /test/mtest/MDEV-32618/11.6/sql-common/client.c:2563
      #11 0x000055748ea9e66e in server_mysql_real_connect (mysql=mysql@entry=0x1541d4010268, host=<optimized out>, host@entry=0x55749286666e "127.0.0.1", user=<optimized out>, user@entry=0x55749286696c "repl_user", 
          passwd=passwd@entry=0x557492866aed "repl_pass", db=db@entry=0x0, port=4401, unix_socket=<optimized out>, client_flag=2147483648) at /test/mtest/MDEV-32618/11.6/sql-common/client.c:3148
      #12 0x000055748e6a79b1 in connect_to_master (thd=0x1541d4000f88, mysql=mysql@entry=0x1541d4010268, mi=mi@entry=0x557492865f50, reconnect=reconnect@entry=false, suppress_warnings=suppress_warnings@entry=false)
          at /test/mtest/MDEV-32618/11.6/sql/slave.cc:7269
      #13 0x000055748e6ba795 in safe_connect (mi=0x557492865f50, mysql=0x1541d4010268, thd=<optimized out>) at /test/mtest/MDEV-32618/11.6/sql/slave.cc:7203
      #14 handle_slave_io (arg=arg@entry=0x557492865f50) at /test/mtest/MDEV-32618/11.6/sql/slave.cc:4865
      #15 0x000055748edb66e4 in pfs_spawn_thread (arg=0x5574927a8b28) at /test/mtest/MDEV-32618/11.6/storage/perfschema/pfs.cc:2201
      #16 0x0000154212a8a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #17 0x0000154212676133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            ramesh Ramesh Sivaraman added a comment - - edited

            mariabackup has a similar problem when using a user created with the PARSEC plugin

            ramesh@galapq:/test/mtest/MDEV-32618/11.6/mariadb-11.6.0-linux-x86_64$ ./bin/mariabackup --backup --target-dir=/test/mtest/MDEV-32618/11.6/mariadb-11.6.0-linux-x86_64/backup/ --user=testuser --password=pass --port=10074 --disable-ssl-verify-server-cert -h127.0.0.1 --plugin-dir=/test/mtest/MDEV-32618/11.6/mariadb-11.6.0-linux-x86_64/lib/plugin --protocol=tcp
            ./bin/mariabackup: Deprecated program name. It will be removed in a future release, use '/test/mtest/MDEV-32618/11.6/mariadb-11.6.0-linux-x86_64/bin/mariadb-backup' instead
            [00] 2024-06-20 12:26:57 Connecting to MariaDB server host: localhost, user: testuser, password: set, port: 10074, socket: /var/run/mysqld/mysqld.sock
            realloc(): invalid pointer
            240620 12:26:57 [ERROR] mysqld got signal 6 ;
            Sorry, we probably made a mistake, and this is a bug.
            

            back trace

            #0  0x000014ebfb88e3db in kill () at ../sysdeps/unix/syscall-template.S:78
            #1  0x000055ea183fb8b6 in handle_fatal_signal ()
            #2  <signal handler called>
            #3  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #4  0x000014ebfb86d859 in __GI_abort () at abort.c:79
            #5  0x000014ebfb8d826e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x14ebfba02298 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
            #6  0x000014ebfb8e02fc in malloc_printerr (str=str@entry=0x14ebfba005f5 "realloc(): invalid pointer") at malloc.c:5347
            #7  0x000014ebfb8e60ba in __GI___libc_realloc (oldmem=0x55ea1a4247a8, bytes=bytes@entry=57) at malloc.c:3175
            #8  0x000014ebfbe8b4c8 in auth (vio=0x7ffcd1fb9e40, mysql=0x55ea1a423ba8) at /test/mtest/MDEV-32618/11.6/libmariadb/plugins/auth/parsec.c:178
            #9  0x000055ea17f2a2ca in run_plugin_auth ()
            #10 0x000055ea17f2c5d5 in server_mysql_real_connect ()
            #11 0x000055ea17effac1 in xb_mysql_connect() ()
            #12 0x000055ea17ee7904 in xb_init() ()
            #13 0x000055ea17ef08a7 in ?? ()
            #14 0x000055ea17ef2ac0 in main ()
            

            ramesh Ramesh Sivaraman added a comment - - edited mariabackup has a similar problem when using a user created with the PARSEC plugin ramesh@galapq:/test/mtest/MDEV-32618/11.6/mariadb-11.6.0-linux-x86_64$ ./bin/mariabackup --backup --target-dir=/test/mtest/MDEV-32618/11.6/mariadb-11.6.0-linux-x86_64/backup/ --user=testuser --password=pass --port=10074 --disable-ssl-verify-server-cert -h127.0.0.1 --plugin-dir=/test/mtest/MDEV-32618/11.6/mariadb-11.6.0-linux-x86_64/lib/plugin --protocol=tcp ./bin/mariabackup: Deprecated program name. It will be removed in a future release, use '/test/mtest/MDEV-32618/11.6/mariadb-11.6.0-linux-x86_64/bin/mariadb-backup' instead [00] 2024-06-20 12:26:57 Connecting to MariaDB server host: localhost, user: testuser, password: set, port: 10074, socket: /var/run/mysqld/mysqld.sock realloc(): invalid pointer 240620 12:26:57 [ERROR] mysqld got signal 6 ; Sorry, we probably made a mistake, and this is a bug. back trace #0 0x000014ebfb88e3db in kill () at ../sysdeps/unix/syscall-template.S:78 #1 0x000055ea183fb8b6 in handle_fatal_signal () #2 <signal handler called> #3 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #4 0x000014ebfb86d859 in __GI_abort () at abort.c:79 #5 0x000014ebfb8d826e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x14ebfba02298 "%s\n") at ../sysdeps/posix/libc_fatal.c:155 #6 0x000014ebfb8e02fc in malloc_printerr (str=str@entry=0x14ebfba005f5 "realloc(): invalid pointer") at malloc.c:5347 #7 0x000014ebfb8e60ba in __GI___libc_realloc (oldmem=0x55ea1a4247a8, bytes=bytes@entry=57) at malloc.c:3175 #8 0x000014ebfbe8b4c8 in auth (vio=0x7ffcd1fb9e40, mysql=0x55ea1a423ba8) at /test/mtest/MDEV-32618/11.6/libmariadb/plugins/auth/parsec.c:178 #9 0x000055ea17f2a2ca in run_plugin_auth () #10 0x000055ea17f2c5d5 in server_mysql_real_connect () #11 0x000055ea17effac1 in xb_mysql_connect() () #12 0x000055ea17ee7904 in xb_init() () #13 0x000055ea17ef08a7 in ?? () #14 0x000055ea17ef2ac0 in main ()

            same with ed25519

            serg Sergei Golubchik added a comment - same with ed25519

            People

              nikitamalyavin Nikita Malyavin
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.