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

For Galera, ALTER SEQUENCE crash DB server

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      Got signal 6 error in 10.6.20 in the following scenario:

      1. CREATE SEQUENCE s INCREMENT=0 cache 100;

      2. CREATE TABLE t2 ( id int primary key default (next value for s), name varchar(50));

      3. Create test.sql file like (see test.sql.zip attached):
      insert into test.t2 (name) values ('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),(
      'AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),
      ('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA')
      ,('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'
      ),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA
      '),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAA
      A'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AA
      AA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('A
      AAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('
      AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),(
      'AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),
      ('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA'),('AAAA');
      insert into test.t2 (name) values ('AAAA')....
      [repeat above line for 1000000 times in the file]

      4. Set DB server autocommit=ON

      5. On either one DB node (let's say node1) load the test.sql file by running the command:
      mysql -h..... --port.... -u... -p... < test.sql

      6. On the same DB node (node1), run Mysql client and run:
      use test;
      ALTER SEQUENCE s START 2 RESTART 2 INCREMENT BY 0 CACHE 100;

      7. If loading test.sql gets Duplicate entry error, clean up table t2 and reset sequence s again in the Mysql Client by running:
      truncate table t2;
      drop sequence s;
      create sequence s INCREMENT BY 0 cache 100;

      Repeat step 5, 6 and 7 again.

      8. After several tries, node1 will get signal 6 error on node1:
      2025-01-23 10:25:32 1377005 [ERROR] WSREP: FSM: no such a transition REPLICATING -> COMMITTED
      250123 10:25:32 [ERROR] mysqld got signal 6 ;

      Attachments

        1. my.cnf
          5 kB
        2. test.sql.zip
          3.34 MB

        Issue Links

          Activity

            People

              janlindstrom Jan Lindström
              ktchow_ogcio Chow King Tak
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.