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

Parallel merging of fts index rebuild fails

Details

    Description

      While issuing ALTER on a InnoDB table with FTS MariaDB breaks with a segmentation fault:

      kernel: mysqld[812]: segfault at 0 ip 00005649f0b31ac8 sp 00007febffffd0b0 error 6 in mysqld[5649efe3e000+12c9000]

      MariaDB [test]> optimize table t;
      -----------------------------------------------------------------------------------------+

      Table Op Msg_type Msg_text

      -----------------------------------------------------------------------------------------+

      test.t optimize note Table does not support optimize, doing recreate + analyze instead
      test.t optimize status OK

      -----------------------------------------------------------------------------------------+
      2 rows in set (10.312 sec)

      MariaDB [test]> optimize table t;
      -----------------------------------------------------------------------------------------+

      Table Op Msg_type Msg_text

      -----------------------------------------------------------------------------------------+

      test.t optimize note Table does not support optimize, doing recreate + analyze instead
      test.t optimize status OK

      -----------------------------------------------------------------------------------------+
      2 rows in set (6.379 sec)

      MariaDB [test]> optimize table t;
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      MariaDB [test]> optimize table t;
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      MariaDB [test]> optimize table t;
      ERROR 2013 (HY000): Lost connection to MySQL server during query

      We managed to replicate this after around 3 consecutive calls of ALTER TABLE t ENGINE=InnoDB; after the initial data import.

      If we remove the FTS index there are no more issues.
      It seems the issue appears on FTS index merge, recreate.

      I've attached to this ticket the backtrace, MariaDB log, configuration and sample data used to replicate the issue.

      If you require any additional info, just let me know.

      Attachments

        1. backtrace.txt
          79 kB
        2. mariadb.log
          4 kB
        3. my.cnf
          1 kB
        4. t.sql.gz
          5.16 MB

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Thirunarayanan Balathandayuthapani made transition -
            Open In Progress
            98d 2h 2m 1
            Thirunarayanan Balathandayuthapani made transition -
            In Progress In Review
            60d 5h 30m 1
            Marko Mäkelä made transition -
            In Review Stalled
            1d 14h 9m 1
            Thirunarayanan Balathandayuthapani made transition -
            Stalled Closed
            38m 58s 1

            People

              thiru Thirunarayanan Balathandayuthapani
              ovidiu.stanila Ovidiu Stanila
              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.