"-h argument" option makes innobackupex segfault
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB | Status tracked in 2.4 | |||||
2.3 |
Fix Released
|
Low
|
Sergei Glushchenko | |||
2.4 |
Fix Released
|
Low
|
Sergei Glushchenko |
Bug Description
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=
#1 0x0000000000de7357 in my_write_core (sig=sig@entry=11) at /home/hartmut/
#2 0x0000000000d2da55 in handle_fatal_signal (sig=11) at /home/hartmut/
#3 <signal handler called>
#4 my_handle_options (argc=argc@
get_
ignore_
#5 0x0000000000758f40 in handle_options (argc=argc@
get_
at /home/hartmut/
#6 0x00000000006f98a0 in main (argc=17, argv=0x1d0a710) at /home/hartmut/
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
Syntax is incorrect, one should use
xtrabackup --host=host-name --target- dir=target- dir
or
innobackupex --host=host-name target-dir
But nevertheless, innobackupex should not crash.
See also bug 1652044 for introducing shortcuts for introducing shortcuts for client options.