[MDEV-26398] mariabackup failed on Windows 10 Created: 2021-08-18  Updated: 2024-01-23

Status: Needs Feedback
Project: MariaDB Server
Component/s: mariabackup
Affects Version/s: 10.6.4
Fix Version/s: 10.6

Type: Bug Priority: Major
Reporter: Renat Assignee: Marko Mäkelä
Resolution: Unresolved Votes: 0
Labels: Papercut, Windows, backup, crash, mariabackup
Environment:

Windows 10 x64 20H2 (Build 19042.789). PC DELL OptiPlex 5080, RAM 16 Gb, Intel Core i7-10700


Attachments: File mariabackup.dmp    
Issue Links:
Relates
relates to MDEV-18200 MariaBackup full backup failed with I... Closed

 Description   

I'm try to make backup by command:

mariabackup --backup --target-dir="C:/Program Files/MariaDB 10.6/data" --user=root --password=########

, but I've got this messages:

[00] 2021-08-18 15:39:15 Connecting to MariaDB server host: localhost, user: root, password: set, port: 3306, socket: not set
[00] 2021-08-18 15:39:15 Using server version 10.6.4-MariaDB
[00] 2021-08-18 15:39:15 Warning: option 'datadir' has different values:
  'C:/Program Files/MariaDB 10.6/data' in defaults file
  'C:\Program Files\MariaDB 10.6\data\' in SHOW VARIABLES
mariabackup based on MariaDB server 10.6.4-MariaDB Win64 (AMD64)
[00] 2021-08-18 15:39:15 cd to C:\Program Files\MariaDB 10.6\data\
[00] 2021-08-18 15:39:15 open files limit requested 0, set to 0
[00] 2021-08-18 15:39:15 mariabackup: using the following InnoDB configuration:
[00] 2021-08-18 15:39:15 innodb_data_home_dir =
[00] 2021-08-18 15:39:15 innodb_data_file_path = ibdata1:12M:autoextend
[00] 2021-08-18 15:39:15 innodb_log_group_home_dir = ./
2021-08-18 15:39:15 0 [Note] InnoDB: Number of pools: 1
2021-08-18 15:39:15 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-08-18 15:39:15 0 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
2021-08-18 15:39:15 0 [ERROR] InnoDB: File ./ib_logfile0: 'open' returned OS error 71.
2021-08-18 15:39:15 0 [ERROR] [FATAL] InnoDB: open(./ib_logfile0) returned Generic error
210818 15:39:15 [ERROR] mysqld got exception 0x80000003 ;
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.6.4-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 = 5473 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...
mariabackup.exe!???
ucrtbase.dll!raise()
ucrtbase.dll!abort()
mariabackup.exe!???
mariabackup.exe!???
mariabackup.exe!???
mariabackup.exe!???
mariabackup.exe!???
mariabackup.exe!???
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()
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 at C:\Program Files\MariaDB 10.6\data\
Minidump written to C:\Program Files\MariaDB 10.6\data\mariabackup.dmp



 Comments   
Comment by Vladislav Vaintroub [ 2021-08-19 ]

What happens if you run your command without --target-dir? as it looks like, you're trying to store backup in existing data directory, this is going to fail one way or another.

Comment by Renat [ 2021-08-20 ]

If I run without --target-dir I've got same error:
[00] 2021-08-20 07:41:07 Connecting to MariaDB server host: localhost, user: root, password: set, port: 3306, socket: not set
[00] 2021-08-20 07:41:07 Using server version 10.6.4-MariaDB
[00] 2021-08-20 07:41:07 Warning: option 'datadir' has different values:
'C:/Program Files/MariaDB 10.6/data' in defaults file
'C:\Program Files\MariaDB 10.6\data\' in SHOW VARIABLES
mariabackup based on MariaDB server 10.6.4-MariaDB Win64 (AMD64)
[00] 2021-08-20 07:41:07 cd to C:\Program Files\MariaDB 10.6\data\
[00] 2021-08-20 07:41:07 open files limit requested 0, set to 0
[00] 2021-08-20 07:41:07 mariabackup: using the following InnoDB configuration:
[00] 2021-08-20 07:41:07 innodb_data_home_dir =
[00] 2021-08-20 07:41:07 innodb_data_file_path = ibdata1:12M:autoextend
[00] 2021-08-20 07:41:07 innodb_log_group_home_dir = ./
2021-08-20 7:41:07 0 [Note] InnoDB: Number of pools: 1
2021-08-20 7:41:07 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-08-20 7:41:07 0 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
2021-08-20 7:41:07 0 [ERROR] InnoDB: File ./ib_logfile0: 'open' returned OS error 71.
2021-08-20 7:41:07 0 [ERROR] [FATAL] InnoDB: open(./ib_logfile0) returned Generic error
210820 7:41:07 [ERROR] mysqld got exception 0x80000003 ;
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.6.4-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 = 5473 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...
mariabackup.exe!???
ucrtbase.dll!raise()
ucrtbase.dll!abort()
mariabackup.exe!???
mariabackup.exe!???
mariabackup.exe!???
mariabackup.exe!???
mariabackup.exe!???
mariabackup.exe!???
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()
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 at C:\Program Files\MariaDB 10.6\data\
Minidump written to C:\Program Files\MariaDB 10.6\data\mariabackup.dmp

Comment by Vladislav Vaintroub [ 2022-06-24 ]

it is crashing in Innodb, It is not helpful in context of mariabackup to crash. The expected behavior , in case of e.g insufficient privileges, is to

  • Print an understandable error, which gives user a hint what to do
  • exit(), not abort(). no dumps, no stacktraces.
    The cleanups that make LSAN so happy, can be spared.
Comment by Marko Mäkelä [ 2024-01-05 ]

According to https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499- the error code would be the following:
ERROR_REQ_NOT_ACCEP No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.

According to https://social.msdn.microsoft.com/Forums/vstudio/en-US/42bbd4c2-7dd5-4072-b79c-5d6e698703a6/errorreqnotaccep-on-createfile?forum=vcgeneral this could be an error in the Microsoft Windows kernel. Does the file reside in a remote file system? I see no mention of that in this ticket.

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