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

MariaBackup prepare crashes with invalid pointer with compression providers and extra options

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • N/A
    • 10.7.1
    • mariabackup
    • None

    Description

      If MariaBackup prepare is run with some compression providers enabled and there are some extra options for the run, it fails with

      preview-10.7-MDEV-12933-provider-plugins 8a800a12

      free(): invalid pointer
      211008 21:33:40 [ERROR] mysqld got signal 6 ;
       
       
      #3  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #4  0x00007f170cb7a859 in __GI_abort () at abort.c:79
      #5  0x00007f170cbe53ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7f170cd0f285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
      #6  0x00007f170cbed47c in malloc_printerr (str=str@entry=0x7f170cd0d4ae "free(): invalid pointer") at malloc.c:5347
      #7  0x00007f170cbeecac in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:4173
      #8  0x000055a7dff5cce5 in msg1(uint, const char *, const char *, typedef __va_list_tag __va_list_tag *) (thread_num=0, prefix=0x55a7e0e55e71 "", fmt=0x55a7e0e5c458 "This target seems to be not prepared yet.", args=0x7ffda92170e8) at /data/src/preview-10.7-MDEV-12933-provider-plugins-deb/extra/mariabackup/common.h:102
      #9  0x000055a7dff5ce61 in msg (fmt=0x55a7e0e5c458 "This target seems to be not prepared yet.") at /data/src/preview-10.7-MDEV-12933-provider-plugins-deb/extra/mariabackup/common.h:122
      #10 0x000055a7dff6c5ed in xtrabackup_prepare_func (argv=0x55a7e40fb508) at /data/src/preview-10.7-MDEV-12933-provider-plugins-deb/extra/mariabackup/xtrabackup.cc:5803
      #11 0x000055a7dff6f2f8 in main_low (argv=0x55a7e40fb508) at /data/src/preview-10.7-MDEV-12933-provider-plugins-deb/extra/mariabackup/xtrabackup.cc:6793
      #12 0x000055a7dff6eb29 in main (argc=4, argv=0x7ffda9217bf8) at /data/src/preview-10.7-MDEV-12933-provider-plugins-deb/extra/mariabackup/xtrabackup.cc:6591
      

      It doesn't appear to happen with the encryption plugin.

      In the test case below the extra option is use-memory, but the exact option seems unimportant.

      --source include/have_innodb.inc
       
      install soname 'provider_lzma';
       
      set global innodb_compression_algorithm = lzma;
      create table t1 (a int, b text) engine = innodb page_compressed=yes;
      insert t1 (a, b) values (0, repeat("abc", 100));
       
      let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
      exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
      --disable_abort_on_error
      exec $XTRABACKUP --prepare --target-dir=$targetdir --use-memory=128M > $MYSQLTEST_VARDIR/tmp/prepare.log 2>&1;
      cat_file $MYSQLTEST_VARDIR/tmp/prepare.log;
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.