Uploaded image for project: 'Percona XtraBackup'
  1. Percona XtraBackup
  2. PXB-947

LP #1655438: "-h argument" option makes innobackupex segfault

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      **Reported in Launchpad by Hartmut Holzgraefe last update 09-02-2017 12:22:05

      When using "-h" with an argument with innobackupex (v2.4.4), e.g. "innobackupex -h hostname" the binary segfaults with the following backtrace:

      #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
      #1 0x0000000000de7357 in my_write_core (sig=sig@entry=11) at /home/hartmut/projects/percona/releases/percona-xtrabackup-2.4.4/mysys/stacktrace.c:247
      #2 0x0000000000d2da55 in handle_fatal_signal (sig=11) at /home/hartmut/projects/percona/releases/percona-xtrabackup-2.4.4/sql/signal_handler.cc:151
      #3 <signal handler called>
      #4 my_handle_options (argc=argc@entry=0x7ffd93dc6aec, argv=argv@entry=0x7ffd93dc6ae0, longopts=longopts@entry=0x19e3120 <xb_long_options>,
      get_one_option=get_one_option@entry=0x7195f0 <xb_get_one_option(int, my_option const*, char*)>, command_list=command_list@entry=0x0,
      ignore_unknown_option=ignore_unknown_option@entry=0 '\000') at /home/hartmut/projects/percona/releases/percona-xtrabackup-2.4.4/mysys_ssl/my_getopt.cc:252
      #5 0x0000000000758f40 in handle_options (argc=argc@entry=0x7ffd93dc6aec, argv=argv@entry=0x7ffd93dc6ae0, longopts=longopts@entry=0x19e3120 <xb_long_options>,
      get_one_option=get_one_option@entry=0x7195f0 <xb_get_one_option(int, my_option const*, char*)>)
      at /home/hartmut/projects/percona/releases/percona-xtrabackup-2.4.4/mysys_ssl/my_getopt.cc:99
      #6 0x00000000006f98a0 in main (argc=17, argv=0x1d0a710) at /home/hartmut/projects/percona/releases/percona-xtrabackup-2.4.4/storage/innobase/xtrabackup/src/xtrabackup.cc:7791

      As far as I can tell this only happens after the innobackupex.cc call to handle_options() has not found anything useful and has passed control back to xtrabackup.cc, which calls handle_options() a second time. This time the argv element that originally pointed to the argument to "-h" now has been replaced with a NULL pointer though, and so causes the 2nd run of handle_options() to crash

      This only happens with "-h" and not with any of the 25 other possible single character options

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              lpjirasync lpjirasync (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: