xtrabackup_55 segfaults when defaults file's basename differs from my.cnf

Bug #782447 reported by Valentine Gostev
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Status tracked in 2.4
1.6
Won't Fix
Medium
Unassigned
2.0
Won't Fix
Low
Unassigned
2.1
Won't Fix
Low
Unassigned
2.2
Won't Fix
Low
Unassigned
2.3
Invalid
Low
Unassigned
2.4
Invalid
Low
Unassigned

Bug Description

xtrabackup_55 binary reads configuration file correctly only when its basename is my.cnf

[root@test-cent5-64-t504 ~]# xtrabackup_55 --defaults-file=/tmp/my.cnf --backup --target-dir=/root/backup/full2
xtrabackup_55 Ver 1.6 Rev 245 for 5.5.9 Linux (x86_64)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 5242880
110514 3:12:16 InnoDB: Using Linux native AIO
>> log scanned up to (1597945)
[01] Copying ./ibdata1
     to /root/backup/full2/ibdata1
[01] ...done
xtrabackup: The latest check point (for incremental): '1597945'
>> log scanned up to (1597945)
xtrabackup: Stopping log copying thread.
xtrabackup: Transaction log of lsn (1597945) to (1597945) was copied.

If basename differs from my.cnf xtrabackup_55 segfaults:

[root@test-cent5-64-t504 ~]# xtrabackup_55 --defaults-file=/tmp/trololo --backup --target-dir=/root/backup/full2
Segmentation fault

(gdb) run
Starting program: /usr/bin/xtrabackup_55 --defaults-file=/tmp/trololo --backup --target-dir=/root/backup/full2
[Thread debugging using libthread_db enabled]
[New Thread 0x40a00940 (LWP 1312)]
[Thread 0x40a00940 (LWP 1312) exited]
[New Thread 0x40a00940 (LWP 1313)]
[Thread 0x40a00940 (LWP 1313) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff74d3b80 in strlen () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff74d3b80 in strlen () from /lib64/libc.so.6
#1 0x0000000000530447 in fn_format (to=0xa02c80 "", name=0x7fffffffec8c "trololo", dir=<value optimized out>, extension=0x0, flag=196) at /usr/src/debug/xtrabackup-1.6/Percona-Server-5.5/mysys/mf_format.c:77
#2 0x000000000052f658 in fn_expand (conf_file=0x553681 "my", argc=<value optimized out>, argv=<value optimized out>, args_used=<value optimized out>, func=0x52e5c0 <handle_default_option>, func_ctx=0x7fffffffe640, default_directories=0xa06860)
    at /usr/src/debug/xtrabackup-1.6/Percona-Server-5.5/mysys/default.c:168
#3 my_search_option_files (conf_file=0x553681 "my", argc=<value optimized out>, argv=<value optimized out>, args_used=<value optimized out>, func=0x52e5c0 <handle_default_option>, func_ctx=0x7fffffffe640, default_directories=0xa06860)
    at /usr/src/debug/xtrabackup-1.6/Percona-Server-5.5/mysys/default.c:235
#4 0x000000000052fe3f in my_load_defaults (conf_file=0x553681 "my", groups=0x990f80, argc=0x7fffffffe71c, argv=0x7fffffffe710, default_directories=0xa02c58) at /usr/src/debug/xtrabackup-1.6/Percona-Server-5.5/mysys/default.c:550
#5 0x00000000004141f5 in main (argc=4, argv=0x7fffffffea48) at xtrabackup.c:5783
(gdb)

Tags: xtrabackup
tags: added: xtrabackup
Changed in percona-xtrabackup:
importance: Undecided → High
status: New → Triaged
milestone: none → 1.7
assignee: nobody → Alexey Kopytov (akopytov)
Stewart Smith (stewart)
Changed in percona-xtrabackup:
milestone: 1.7.0beta1 → 1.7.0
Revision history for this message
Stewart Smith (stewart) wrote :

Marking as Won't Fix for the old stable release of 1.6. If you need this bug fixed in a 1.6 tree, please ask for it here or contact us (Percona) to arrange it.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-65

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.