Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-30492

Crash when use mariabackup.exe with config 'innodb_flush_method=async_unbuffered'

Details

    Description

      On windows,
      when use the config option 'innodb_flush_method=async_unbuffered'
      it crashed as below.
      But
      innodb_flush_method=O_DIRECT is okay.

      Question is that
      what innodb_flush_method=O_DIRECT does it mean? fsync?
      --------------------
      2023-01-29 20:50:42 0x443c InnoDB: Assertion failure in file D:\winx64-packages\build\src\extra\mariabackup\xtrabackup.cc line 1909
      InnoDB: Failing assertion: srv_file_flush_method <= IF_WIN(SRV_ALL_O_DIRECT_FSYNC, SRV_O_DIRECT_NO_FSYNC)
      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 mariadbd 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.
      230129 20:50:42 [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.7.7-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 = 5521 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.

      error code - "-2147483645"

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment - for review: https://github.com/MariaDB/server/pull/2465

            You can find some discussion of the values of innodb_flush_method in MDEV-30136.

            marko Marko Mäkelä added a comment - You can find some discussion of the values of innodb_flush_method in MDEV-30136 .
            npdmailing@gmail.com Mitchell Lee added a comment -

            Thanks for the inform MDEV-30136.
            But the reason /pointing I asked is actually the online manual not working as you guys described on the internet.
            So, whatever reason,
            make it right without problem.
            Very sick to use MariaDB due to last minutes critical errors which not working as you guys posted.

            npdmailing@gmail.com Mitchell Lee added a comment - Thanks for the inform MDEV-30136 . But the reason /pointing I asked is actually the online manual not working as you guys described on the internet. So, whatever reason, make it right without problem. Very sick to use MariaDB due to last minutes critical errors which not working as you guys posted.
            wlad Vladislav Vaintroub added a comment - - edited

            Wrote my notes in https://github.com/MariaDB/server/pull/2465 . In short- the assertion was valid, and there needs to be some more code, or we'll have invalid srv_flush_method

            wlad Vladislav Vaintroub added a comment - - edited Wrote my notes in https://github.com/MariaDB/server/pull/2465 . In short- the assertion was valid, and there needs to be some more code, or we'll have invalid srv_flush_method
            danblack Daniel Black added a comment -

            Updated PR with test case.

            danblack Daniel Black added a comment - Updated PR with test case.

            People

              danblack Daniel Black
              npdmailing@gmail.com Mitchell Lee
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.