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

Backup produces garbage when using memory-mapped log (PMEM)

Details

    Description

      MDEV-14425 introduced a memory-mapped interface to the redo log when the log is stored in persistent memory, or in the /dev/shm file system. This improves performance and makes debugging more convenient, because the entire circular log file will be accessible at log_sys.buf in rr replay traces.

      However, this also exposed us to a (very reasonable) limitation of the rr debugger: it is assumed that the memory-mapped file will not be changed by processes that are not traced by the same rr record instance.

      Because it may be hard to remember the rule that mariadb-backup --backup must not be traced with rr record when the PMEM interface is being used, we’d better make backup refuse the use of the "fake PMEM" (mmap on redo log located in /dev/shm) when the process is apparently being run under rr record. Normal file system calls should be fine. We can use innodb_use_native_aio=0 as a proxy for detecting rr record, because both the old io_setup (libaio) nor the newer io_uring interface will return ENOSYS under rr record.

      Access to log files on real persistent memory (mount -o dax) will not be affected. It is assumed that rr record mariadb-backup --backup seldomly needs to be run such that the log is stored in persistent memory.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            Status In Progress [ 3 ] In Testing [ 10301 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Matthias Leich [ mleich ]
            marko Marko Mäkelä made changes -
            Labels affects-tests
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Labels affects-tests affects-tests corruption
            Summary Backup produces garbage when run under "rr record" on /dev/shm Backup produces garbage when using memory-mapped log (PMEM)
            mleich Matthias Leich made changes -
            Status In Testing [ 10301 ] Stalled [ 10000 ]
            mleich Matthias Leich made changes -
            Assignee Matthias Leich [ mleich ] Marko Mäkelä [ marko ]
            mleich Matthias Leich made changes -
            Assignee Marko Mäkelä [ marko ] Matthias Leich [ mleich ]
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2022-07-01 15:34:13.0 2022-07-01 15:34:13.536
            marko Marko Mäkelä made changes -
            Fix Version/s 10.8.4 [ 27503 ]
            Fix Version/s 10.9.2 [ 27115 ]
            Fix Version/s 10.10.1 [ 27913 ]
            Fix Version/s 10.8 [ 26121 ]
            Assignee Matthias Leich [ mleich ] Marko Mäkelä [ marko ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.