Details
Description
In order to create backups on my containerized MariaDB, I start another Docker containing the mariadb-backup executable and mount the volume used by the MariaDB server into the mariadb-backup container. I have this setup running in a test where create a backup of a fresh installation of the server. This test fails in 10.11.10 on both Alpine 3.18 and 3.20.
/app # gdb --args mariadb-backup --backup -H 127.0.0.1 -P 3306 --user=root --password=root --target-dir=/tmp/tmp
|
GNU gdb (GDB) 14.2
|
Copyright (C) 2023 Free Software Foundation, Inc.
|
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
This is free software: you are free to change and redistribute it.
|
There is NO WARRANTY, to the extent permitted by law.
|
Type "show copying" and "show warranty" for details.
|
This GDB was configured as "x86_64-alpine-linux-musl".
|
Type "show configuration" for configuration details.
|
For bug reporting instructions, please see:
|
<https://www.gnu.org/software/gdb/bugs/>.
|
Find the GDB manual and other documentation resources online at:
|
<http://www.gnu.org/software/gdb/documentation/>.
|
 |
For help, type "help".
|
Type "apropos word" to search for commands related to "word"...
|
Reading symbols from mariadb-backup...
|
(No debugging symbols found in mariadb-backup)
|
(gdb) run
|
Starting program: /usr/bin/mariadb-backup --backup -H 127.0.0.1 -P 3306 --user=root --password=root --target-dir=/tmp/tmp
|
warning: Error disabling address space randomization: Operation not permitted
|
[New LWP 53]
|
[00] 2024-12-17 07:58:27 Connecting to MariaDB server host: 127.0.0.1, user: root, password: set, port: 3306, socket: not set
|
[00] 2024-12-17 07:58:27 Using server version 10.11.10-MariaDB-log
|
/usr/bin/mariadb-backup based on MariaDB server 10.11.10-MariaDB Linux (x86_64)
|
[00] 2024-12-17 07:58:27 uses posix_fadvise().
|
[00] 2024-12-17 07:58:27 cd to /app/data/db/
|
[00] 2024-12-17 07:58:27 open files limit requested 0, set to 1048576
|
[00] 2024-12-17 07:58:27 mariabackup: using the following InnoDB configuration:
|
[00] 2024-12-17 07:58:27 innodb_data_home_dir =
|
[00] 2024-12-17 07:58:27 innodb_data_file_path = ibdata1:12M:autoextend
|
[00] 2024-12-17 07:58:27 innodb_log_group_home_dir = ./
|
[00] 2024-12-17 07:58:27 InnoDB: Using Linux native AIO
|
2024-12-17 7:58:27 0 [Note] InnoDB: Number of transaction pools: 1
|
[New LWP 54]
|
2024-12-17 7:58:27 0 [Note] InnoDB: Memory-mapped log (block size=512 bytes)
|
[00] 2024-12-17 07:58:27 mariabackup: Generating a list of tablespaces
|
[00] 2024-12-17 07:58:27 DDL tracking : create 5 "./x/a.ibd"
|
[00] 2024-12-17 07:58:27 DDL tracking : rename 4 "./mysql/gtid_slave_pos.ibd","./mysql/#sql-ib17.ibd"
|
[00] 2024-12-17 07:58:27 DDL tracking : create 6 "./mysql/gtid_slave_pos.ibd"
|
[00] 2024-12-17 07:58:27 DDL tracking : delete 4 "./mysql/#sql-ib17.ibd"
|
[00] 2024-12-17 07:58:27 DDL tracking : create 7 "./x/b.ibd"
|
[New LWP 55]
|
[00] 2024-12-17 07:58:27 Retrying read of log at LSN=58354
|
[00] 2024-12-17 07:58:27 Connecting to MariaDB server host: 127.0.0.1, user: root, password: set, port: 3306, socket: not set
|
[00] 2024-12-17 07:58:27 Connecting to MariaDB server host: 127.0.0.1, user: root, password: set, port: 3306, socket: not set
|
[New LWP 56]
|
[00] 2024-12-17 07:58:27 BACKUP STAGE START
|
[00] 2024-12-17 07:58:27 Acquiring BACKUP LOCKS...
|
[00] 2024-12-17 07:58:27 Copying /app/data/db//aria_log_control to /tmp/tmp/aria_log_control
|
[00] 2024-12-17 07:58:27 ...done
|
[00] 2024-12-17 07:58:27 Loading aria_log_control.
|
[00] 2024-12-17 07:58:27 aria_log_control: last_log_number: 1
|
[00] 2024-12-17 07:58:27 Start scanning aria tables.
|
[00] 2024-12-17 07:58:27 Start scanning aria log files.
|
[00] 2024-12-17 07:58:27 Found 1 aria log files, minimum log number 1, maximum log number 1
|
[00] 2024-12-17 07:58:27 Stop scanning aria tables.
|
[00] 2024-12-17 07:58:27 Copying ./mysql/innodb_index_stats.ibd to /tmp/tmp/mysql/innodb_index_stats.ibd
|
 |
Thread 5 "mariadb-backup" received signal SIGSEGV, Segmentation fault.
|
[Switching to LWP 56]
|
0x0000564c2e3a1b94 in ?? ()
|
(gdb) bt
|
#0 0x0000564c2e3a1b94 in ?? ()
|
#1 0x0000564c2dd67255 in ?? ()
|
#2 0x0000564c2dd6780c in xb_fil_cur_read(xb_fil_cur_t*, CorruptedPages&) ()
|
#3 0x0000564c2dd519e5 in ?? ()
|
#4 0x0000564c2dd60de4 in InnodbDataCopier::copy_job(fil_node_t*, unsigned int) ()
|
#5 0x0000564c2dd80c99 in ThreadPool::thread_func(unsigned int) ()
|
#6 0x00007fdd240044bf in ?? () from /usr/lib/libstdc++.so.6
|
#7 0x00007fdd247db349 in start (p=0x7fdd23cc2a70) at src/thread/pthread_create.c:207
|
#8 0x00007fdd247dd95f in __clone () at src/thread/x86_64/clone.s:22
|
Backtrace stopped: frame did not save the PC
|
(gdb) exit
|
The above is a run after I manually set CHANGE MASTER TO master_use_gtid = current_pos; on the server, because at the first Segmentation fault occured at
[00] 2024-12-16 15:32:36 Streaming ./mysql/gtid_slave_pos.ibd
|
Segmentation fault (core dumped)
|
When I install mariadb-backup from Alpine 3.19 which uses 10.11.6, the test runs with no problem at all. In my tests I was able to see that my last successful test was with 10.11.8 on Alpine 3.18. Then Alpine 3.18 went from 10.11.8 to 10.11.10, skipping 10.11.9. I cannot test if 10.11.9 is also affected, because somehow Alpine 3.20 does not let me install the 10.11.9 version of mariadb-backup.
My own guess is that the backup fails on empty files, because both ./mysql/gtid_slave_pos.ibd and ./mysql/innodb_index_stats.ibd are empty at backup time with a fresh installation.
Attachments
Issue Links
- duplicates
-
MDEV-34388 mariadb-backup segfault on 10.4.8 and 11.4.2, under Alpine 3.20, 3.21 and 3.22
-
- Closed
-
-
MDEV-34772 Overuse of big stackvariables results in stackoverflows
-
- Stalled
-
- relates to
-
MDBF-244 Add support for musl-libc
-
- Closed
-
- links to