[MDEV-13332] mariabackup from 10.2.x crashes with --ftwrl-* options Created: 2017-07-16  Updated: 2020-08-25  Resolved: 2017-07-17

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.2.7, 10.2.8
Fix Version/s: 10.2.8

Type: Bug Priority: Major
Reporter: Valerii Kravchuk Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: upstream


 Description   

Unfortunately mariabackup from current GitHub code of 10.2 crashes in the same way as xtrabackup 2.4.7 (see https://bugs.launchpad.net/percona-xtrabackup/+bug/1704636) while backing up MariaDB 10.2.x data.

This does not let backup to complete successfully when there are no long running queries, but NOT block everything with FTWRL waiting when they are present.

Test case is simple, just run the following with 10.2.7+ started with all/almost all default:

openxs@ao756:~/dbs/maria10.2$ rm -rf /home/openxs/backup/*
openxs@ao756:~/dbs/maria10.2$ ls /home/openxs/backup
openxs@ao756:~/dbs/maria10.2$ bin/mariabackup --no-defaults --host=127.0.0.1 --port=3308 --datadir=/home/openxs/dbs/maria10.2/data --user=root --backup --compress --ftwrl-wait-timeout=5 --ftwrl-wait-threshold=300 --ftwrl-wait-query-type=all --target-dir=/home/openxs/backup
170716 15:36:16 Connecting to MySQL server host: 127.0.0.1, user: root, password: not set, port: 3308, socket: not set
Using server version 10.2.8-MariaDB-log
bin/mariabackup based on MariaDB server 10.2.8-MariaDB Linux (x86_64)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /home/openxs/dbs/maria10.2/data/
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
2017-07-16 15:36:16 140640590980992 [Note] InnoDB: Number of pools: 1
170716 15:36:16 >> log scanned up to (298878873)
xtrabackup: Generating a list of tablespaces
2017-07-16 15:36:16 140640590980992 [Warning] InnoDB: Allocated tablespace ID 1 for mysql/innodb_table_stats, old maximum was 0
170716 15:36:16 [01] Compressing ./ibdata1 to /home/openxs/backup/ibdata1.qp
170716 15:36:17 [01]        ...done
170716 15:36:17 [01] Compressing ./mysql/innodb_table_stats.ibd to /home/openxs/backup/mysql/innodb_table_stats.ibd.qp
170716 15:36:17 [01]        ...done
170716 15:36:17 [01] Compressing ./mysql/innodb_index_stats.ibd to /home/openxs/backup/mysql/innodb_index_stats.ibd.qp
170716 15:36:17 [01]        ...done
170716 15:36:17 [01] Compressing ./mysql/gtid_slave_pos.ibd to /home/openxs/backup/mysql/gtid_slave_pos.ibd.qp
170716 15:36:17 [01]        ...done
170716 15:36:17 [01] Compressing ./test/sbtest1.ibd to /home/openxs/backup/test/sbtest1.ibd.qp
170716 15:36:17 >> log scanned up to (298878873)
170716 15:36:26 [01]        ...done
170716 15:36:26 [01] Compressing ./test/tt1.ibd to /home/openxs/backup/test/tt1.ibd.qp
170716 15:36:26 [01]        ...done
170716 15:36:26 [01] Compressing ./test/task.ibd to /home/openxs/backup/test/task.ibd.qp
170716 15:36:26 [01]        ...done
170716 15:36:26 [01] Compressing ./test/incident.ibd to /home/openxs/backup/test/incident.ibd.qp
170716 15:36:26 [01]        ...done
170716 15:36:26 [01] Compressing ./test/tt2.ibd to /home/openxs/backup/test/tt2.ibd.qp
170716 15:36:26 [01]        ...done
170716 15:36:26 [01] Compressing ./test/t1i.ibd to /home/openxs/backup/test/t1i.ibd.qp
170716 15:36:26 [01]        ...done
170716 15:36:26 [01] Compressing ./test/t.ibd to /home/openxs/backup/test/t.ibd.qp
170716 15:36:26 [01]        ...done
170716 15:36:26 [01] Compressing ./test/bd.ibd to /home/openxs/backup/test/bd.ibd.qp
170716 15:36:26 [01]        ...done
170716 15:36:26 [01] Compressing ./test/tt.ibd to /home/openxs/backup/test/tt.ibd.qp
170716 15:36:26 [01]        ...done
170716 15:36:26 Waiting 5 seconds for queries running longer than 300 seconds to finish
170716 15:36:26 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
 
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
 
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
 
Server version: 10.2.8-MariaDB
key_buffer_size=0
read_buffer_size=131072
max_used_connections=0
max_threads=1
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 5383 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x0 thread_stack 0x49000
addr2line: 'bin/mariabackup': No such file
bin/mariabackup(my_print_stacktrace+0x29)[0x7fe970048499]
bin/mariabackup(handle_fatal_signal+0x30d)[0x7fe96fb8724d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7fe96f092330]
/lib/x86_64-linux-gnu/libc.so.6(+0x3d467)[0x7fe96d032467]
bin/mariabackup(_Z11lock_tablesP8st_mysql+0xea)[0x7fe96f91e6ca]
bin/mariabackup(_Z12backup_startv+0x80)[0x7fe96f925710]
bin/mariabackup(+0x44fbfa)[0x7fe96f914bfa]
bin/mariabackup(main+0x11b)[0x7fe96f8f34cb]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fe96d016f45]
bin/mariabackup(+0x447658)[0x7fe96f90c658]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Segmentation fault (core dumped)
openxs@ao756:~/dbs/maria10.2$



 Comments   
Comment by Vladislav Vaintroub [ 2017-07-16 ]

A good callstack in 10.2

terribly wrong...
mariabackup.exe!my_parameter_handler()[my_init.c:259]
mariabackup.exe!_invalid_parameter()[invalid_parameter.cpp:93]
mariabackup.exe!_invalid_parameter_noinfo()[invalid_parameter.cpp:97]
mariabackup.exe!__crt_strtox::c_string_character_source<char>::validate()[corecr
t_internal_strtox.h:1772]
mariabackup.exe!__crt_strtox::parse_integer<unsigned long,__crt_strtox::c_string
_character_source<char> >()[corecrt_internal_strtox.h:197]
mariabackup.exe!atoi()[atox.cpp:22]
mariabackup.exe!have_queries_to_wait_for()[backup_mysql.cc:727]
mariabackup.exe!wait_for_no_updates()[backup_mysql.cc:785]
mariabackup.exe!lock_tables()[backup_mysql.cc:909]
mariabackup.exe!backup_start()[backup_copy.cc:1361]
mariabackup.exe!xtrabackup_backup_func()[xtrabackup.cc:3733]
mariabackup.exe!main_low()[xtrabackup.cc:5813]
mariabackup.exe!main()[xtrabackup.cc:5616]
mariabackup.exe!__scrt_common_main_seh()[exe_common.inl:259]

Generated at Thu Feb 08 08:04:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.