[MDEV-25436] mariabackup crashes on raspberrypi Created: 2021-04-17  Updated: 2021-05-17  Resolved: 2021-05-17

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.3.27
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Enno H Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: need_feedback
Environment:

raspberrypi, raspbian 2021-01-11-raspios-buster-armhf-lite
local socket access with root user



 Description   

pi@basar3-85:~ $ mariabackup --user=[user-replaced] --password=[pw-replaced] --backup --target-dir=/home/pi/backuptest-export.sql
[00] 2021-04-17 12:26:12 Connecting to MySQL server host: localhost, user: [replaced, root access], password: set, port: not set, socket: /var/run/mysqld/mysqld.sock
[00] 2021-04-17 12:26:12 Using server version 10.3.27-MariaDB-0+deb10u1
mariabackup based on MariaDB server 10.3.27-MariaDB debian-linux-gnueabihf (armv8l)
[00] 2021-04-17 12:26:12 uses posix_fadvise().
[00] 2021-04-17 12:26:12 cd to /var/lib/mysql/
[00] 2021-04-17 12:26:12 open files limit requested 0, set to 1024
[00] 2021-04-17 12:26:12 mariabackup: using the following InnoDB configuration:
[00] 2021-04-17 12:26:12 innodb_data_home_dir = 
[00] 2021-04-17 12:26:12 innodb_data_file_path = ibdata1:12M:autoextend
[00] 2021-04-17 12:26:12 innodb_log_group_home_dir = ./
[00] 2021-04-17 12:26:12 InnoDB: Using Linux native AIO
2021-04-17 12:26:12 0 [Note] InnoDB: Number of pools: 1
2021-04-17 12:26:12 0 [Warning] InnoDB: Unable to open "./ib_logfile0" to check native AIO read support.
2021-04-17 12:26:12 0 [Warning] InnoDB: Linux Native AIO disabled.
2021-04-17 12:26:12 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2021-04-17 12:26:12 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2021-04-17 12:26:12 0x76f5d210  InnoDB: Assertion failure in file /build/mariadb-10.3-S9bYSW/mariadb-10.3-10.3.27/storage/innobase/fil/fil0fil.cc line 671
InnoDB: Failing assertion: success
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
InnoDB: about forcing recovery.
210417 12:26:12 [ERROR] mysqld got signal 6 ;
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.3.27-MariaDB-0+deb10u1
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 = 4390 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
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /var/lib/mysql
Resource Limits:
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            8388608              unlimited            bytes     
Max core file size        0                    unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             6873                 6873                 processes 
Max open files            1024                 1048576              files     
Max locked memory         67108864             67108864             bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       6873                 6873                 signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                    
Max realtime priority     0                    0                    
Max realtime timeout      unlimited            unlimited            us        
Core pattern: core
 
Abgebrochen
pi@basar3-85:~ $ 

#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
 
# this is read by the standalone daemon and embedded servers
[server]
port	=	{{ mariadb_port }}
 
# this is only for the mysqld standalone daemon
[mysqld]
 
#
# * Basic Settings
#
 
user                    = mysql
pid-file                = /run/mysqld/mysqld.pid
basedir                 = /usr
datadir                 = /var/lib/mysql
tmpdir                  = /tmp
lc-messages-dir         = /usr/share/mysql
lc-messages             = en_US
skip-external-locking
 
# Broken reverse DNS slows down connections considerably and name resolve is
# safe to skip if there are no "host by domain name" access grants
#skip-name-resolve
 
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            = 127.0.0.1
 
#
# * Fine Tuning
#
 
#key_buffer_size        = 128M
#max_allowed_packet     = 1G
#thread_stack           = 192K
#thread_cache_size      = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
#myisam_recover_options = BACKUP
#max_connections        = 100
#table_cache            = 64
 
#
# * Logging and Replication
#
 
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# Recommend only changing this at runtime for short testing periods if needed!
# general_log_file       = /var/log/mysql/mysql.log
# general_log            = 1
 
 
# When running under systemd, error logging goes via stdout/stderr to journald
# and when running legacy init error logging goes to syslog due to
# /etc/mysql/conf.d/mariadb.conf.d/50-mysqld_safe.cnf
# Enable this if you want to have error logging into a separate file
log_error = /var/log/mysql/error.log
# Enable the slow query log to see queries with especially long duration
#slow_query_log_file    = /var/log/mysql/mariadb-slow.log
#long_query_time        = 10
#log_slow_verbosity     = query_plan,explain
#log-queries-not-using-indexes
#min_examined_row_limit = 1000
 
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id              = 1
#log_bin                = /var/log/mysql/mysql-bin.log
expire_logs_days        = 10
#max_binlog_size        = 100M
 
#
# * SSL/TLS
#
 
# For documentation, please read
# https://mariadb.com/kb/en/securing-connections-for-client-and-server/
#ssl-ca = /etc/mysql/cacert.pem
#ssl-cert = /etc/mysql/server-cert.pem
#ssl-key = /etc/mysql/server-key.pem
 
#
# * Character sets
#
 
# MySQL/MariaDB default is Latin1, but in Debian we rather default to the full
# utf8 4-byte character set. See also client.cnf
character-set-server  = utf8mb4
collation-server      = utf8mb4_general_ci
 
#
# * InnoDB
#
 
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# Most important is to give InnoDB 80 % of the system RAM for buffer use:
# https://mariadb.com/kb/en/innodb-system-variables/#innodb_buffer_pool_size
#innodb_buffer_pool_size = 8G
 
# this is only for embedded server
[embedded]
 
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
#ssl = 1
#ssl_cert = /etc/mysql/cert/server-cert.pem
#ssl_key =  /etc/mysql/cert/server-key.pem
#ssl_ca =   /etc/mysql/cert/ca-cert.pem
 
# This group is only read by MariaDB-10.5 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.5]



 Comments   
Comment by Enno H [ 2021-04-17 ]

on the machine the port is automatically set to a valid port, the {{ mariadb_port }} is set to a valid value there (i checked this)

Comment by Marko Mäkelä [ 2021-04-18 ]

Did you notice the somewhat misleading error message (which fails to say mariabackup)?

2021-04-17 12:26:12 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.

Yes, the intentional crash could be changed to a graceful erroneous return. Can you figure out the permission problem, and once you have fixed that, show what exactly was wrong?

I suppose that mysqld and mariabackup are running as different users.

Generated at Thu Feb 08 09:37:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.