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

mariadb-backup 10.11.10 segfault under Alpine 3.20

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 10.11.10
    • 10.11.14, 11.4.8, 11.8.3
    • Backup
    • None
    • Alpine 3.20/3.21, x86_64

    Description

      As of Alpine 3.20 and 3.21, mariadb-backup (installed from Alpine sources) crashes with a segfault. Alpine 3.19 is not affected.

      Alpine 3.20 packages MariaDB 10.11.10 while Alpine 3.19 has 10.11.6.

      This seems related/identical to MDEV-34388, but affected versions do not match.

      I dug a little deeper and compiled MariaDB from source in an Alpine container to check if it could backup it's default databases (see attachments for details).
      I found that MariaDB 10.11.9 works fine and 10.11.10 is broken.
      I did a bisect on the changes between these versions using the attached files.

      It seems that the error was introduced in eca552a1a45959876bd830a45094c03016b33441.
      The full git bisect log is:

      # bad: [3d0fb150289716ca75cd64d62823cf715ee47646] Merge branch '10.6' into 10.11
      git bisect start 'mariadb-10.11.10'
      # status: waiting for good commit(s), bad commit known
      # good: [0e8fb977b00983d98c4c35e39bc1f36463095938] Merge branch '10.6' into 10.11
      git bisect good 0e8fb977b00983d98c4c35e39bc1f36463095938
      # good: [391c9db4862ab50a7c074a27b46cd686f09f4dd2] MDEV-34952 main.log_slow test failure on opensuse builder
      git bisect good 391c9db4862ab50a7c074a27b46cd686f09f4dd2
      # good: [0403313bdb4e891f42dcd19ac1d9d7a33a7e5d55] Fixed connect to not call strlen() over and over again in a loop
      git bisect good 0403313bdb4e891f42dcd19ac1d9d7a33a7e5d55
      # good: [1cad1dbde678cf47d5696ba88b8d29d0392f68bb] MDEV-35235 innodb_snapshot_isolation=ON fails to signal transaction rollback
      git bisect good 1cad1dbde678cf47d5696ba88b8d29d0392f68bb
      # good: [6aa47fae304bd1f3efc0ebd2035bc1481ded73a3] MDEV-35276 Assertion failure in find_producing_item upon a query from a view
      git bisect good 6aa47fae304bd1f3efc0ebd2035bc1481ded73a3
      # good: [8a6a4c947a0ca3d2fdca752d7440bdc5c6c83e37] Cleanup: Replace some is_predefined_tablespace()
      git bisect good 8a6a4c947a0ca3d2fdca752d7440bdc5c6c83e37
      # bad: [eb2919039845baf8b785bddeae1836c2f65e1cb4] MDEV-34753 memory pressure - erroneous termination condition
      git bisect bad eb2919039845baf8b785bddeae1836c2f65e1cb4
      # good: [7842cab8c0a239a7509acfed4ce0c28675318732] MDEV-34318 post-merge fix
      git bisect good 7842cab8c0a239a7509acfed4ce0c28675318732
      # bad: [eca552a1a45959876bd830a45094c03016b33441] MDEV-34830: LSN in the future is not being treated as serious corruption
      git bisect bad eca552a1a45959876bd830a45094c03016b33441
      

      I tested the commit in an Alpine 3.19 container. The result was the same: mariadb-backup crashed with a segfault.

      I did not test in glibc-based environments.
      Also, I did not test anything but MariaDB 10.11.x.

      Attachments:

      • lfs64.patch - Required to build MariaDB on Alpine, from the Alpine package source
      • Dockerfile - The container image I used to test this
      • test.sh - Script to build and test MariaDB inside the container
      • bisect.sh - Script to start the container. May be passed to git bisect run.
      • mariadb-backup.log - Output of mariadb-backup --backup --target-dir /tmp/backup when it crashes

      Attachments

        1. test.sh
          2 kB
          Sebastian Hamann
        2. mariadb-backup.log
          2 kB
          Sebastian Hamann
        3. lfs64.patch
          37 kB
          Sebastian Hamann
        4. Dockerfile
          0.2 kB
          Sebastian Hamann
        5. bisect.sh
          0.1 kB
          Sebastian Hamann

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              black2754 Sebastian Hamann
              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.