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

LP:947487 - Server crashes in _ma_remove_table_from_trnman on concurrent ALTER and SELECT

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      See also https://bugs.launchpad.net/maria/+bug/947474.
      The reason of both problems might be the same, as they happen with the exact same test case, but since it fails in both threads, sometimes on SELECT with assertion from bug#947474 and sometimes with the crash on ALTER, I will file both.

      #3 <signal handler called>
      #4 0x00000000009610a6 in _ma_remove_table_from_trnman (share=0x30ce0c0, trn=0x307d770)
          at /home/elenst/maria-5.5/storage/maria/ma_state.c:559
      #5 0x00000000009b8fde in maria_extra (info=0x31838f0, function=HA_EXTRA_PREPARE_FOR_RENAME, extra_arg=0x0)
          at /home/elenst/maria-5.5/storage/maria/ma_extra.c:347
      #6 0x0000000000974f3e in ha_maria::extra (this=0x31a6ac8, operation=HA_EXTRA_PREPARE_FOR_RENAME)
          at /home/elenst/maria-5.5/storage/maria/ha_maria.cc:2478
      #7 0x0000000000c859fa in ha_partition::loop_extra (this=0x31a5fe8, operation=HA_EXTRA_PREPARE_FOR_RENAME)
          at /home/elenst/maria-5.5/sql/ha_partition.cc:6226
      #8 0x0000000000c85918 in ha_partition::prepare_for_rename (this=0x31a5fe8)
          at /home/elenst/maria-5.5/sql/ha_partition.cc:6198
      #9 0x0000000000c8531c in ha_partition::extra (this=0x31a5fe8, operation=HA_EXTRA_PREPARE_FOR_RENAME)
          at /home/elenst/maria-5.5/sql/ha_partition.cc:5968
      #10 0x00000000005cc513 in wait_while_table_is_used (thd=0x7fe2ec11f070, table=0x31a5630,
          function=HA_EXTRA_PREPARE_FOR_RENAME) at /home/elenst/maria-5.5/sql/sql_base.cc:2334
      #11 0x00000000006c49bb in mysql_alter_table (thd=0x7fe2ec11f070, new_db=0x3070b20 "test",
          new_name=0x3070540 "A", create_info=0x7fe2f1a5cd70, table_list=0x3070578, alter_info=0x7fe2f1a5ce70,
          order_num=0, order=0x0, ignore=false, require_online=false)
          at /home/elenst/maria-5.5/sql/sql_table.cc:6862
      #12 0x00000000009419eb in Alter_table_statement::execute (this=0x3070d40, thd=0x7fe2ec11f070)
          at /home/elenst/maria-5.5/sql/sql_alter.cc:106
      #13 0x000000000062eaf4 in mysql_execute_command (thd=0x7fe2ec11f070)
          at /home/elenst/maria-5.5/sql/sql_parse.cc:4454
      #14 0x0000000000631bec in mysql_parse (thd=0x7fe2ec11f070,
          rawbuf=0x3070468 "ALTER TABLE `A` PARTITION BY KEY() PARTITIONS 9", length=47,
          parser_state=0x7fe2f1a5d670) at /home/elenst/maria-5.5/sql/sql_parse.cc:5730
      #15 0x0000000000625abd in dispatch_command (command=COM_QUERY, thd=0x7fe2ec11f070,
          packet=0x7fe2ec1247a1 "ALTER TABLE `A` PARTITION BY KEY() PARTITIONS 9", packet_length=47)
          at /home/elenst/maria-5.5/sql/sql_parse.cc:1056
      #16 0x0000000000624d90 in do_command (thd=0x7fe2ec11f070) at /home/elenst/maria-5.5/sql/sql_parse.cc:795
      #17 0x000000000071f729 in do_handle_one_connection (thd_arg=0x7fe2ec11f070)
          at /home/elenst/maria-5.5/sql/sql_connect.cc:1253
      #18 0x000000000071f1ec in handle_one_connection (arg=0x7fe2ec11f070)
          at /home/elenst/maria-5.5/sql/sql_connect.cc:1168
      #19 0x00007fe3096d3a4f in start_thread () from /lib64/libpthread.so.0
      #20 0x00007fe30846882d in clone () from /lib64/libc.so.6

      bzr version-info
      revision-id: <email address hidden>
      date: 2012-03-03 13:22:49 -0800
      build-date: 2012-03-05 23:00:19 +0200
      revno: 3311

      Could not reproduce on 5.3.
      Could not reproduce on the release build 5.5.20.
      Could not convert into an MTR test, it might require a deeper insight into the root of the problem, and possibly usage of synchronization points.

      1. RQG grammar (test.yy):

      partitions:
              ALTER TABLE _table PARTITION BY KEY() PARTITIONS part_num |
              ALTER TABLE _table REMOVE PARTITIONING;

      query:
              SELECT * FROM _table ;

      thread1:
              partitions ;

      part_num:
              1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ;

      1. End of RQG grammar
      1. Run as

      perl runall.pl \
      --threads=2 \
      --duration=3600 \
      --queries=100M \
      --grammar=./test.yy \
      --engine=Aria \
      --rows=1,1,1,1,1,1,1,1,1 \
      --mtr-build-thread=300 \
      --basedir1=<5.5 debug basedir> \
      --vardir1=<your vardir>

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Server crashes in _ma_remove_table_from_trnman on concurrent ALTER and SELECT
            See also bug#947474.
            The reason of both problems might be the same, as they happen with the exact same test case, but since it fails in both threads, sometimes on SELECT with assertion from bug#947474 and sometimes with the crash on ALTER, I will file both.

            #3 <signal handler called>
            #4 0x00000000009610a6 in _ma_remove_table_from_trnman (share=0x30ce0c0, trn=0x307d770)
            at /home/elenst/maria-5.5/storage/maria/ma_state.c:559
            #5 0x00000000009b8fde in maria_extra (info=0x31838f0, function=HA_EXTRA_PREPARE_FOR_RENAME, extra_arg=0x0)
            at /home/elenst/maria-5.5/storage/maria/ma_extra.c:347
            #6 0x0000000000974f3e in ha_maria::extra (this=0x31a6ac8, operation=HA_EXTRA_PREPARE_FOR_RENAME)
            at /home/elenst/maria-5.5/storage/maria/ha_maria.cc:2478
            #7 0x0000000000c859fa in ha_partition::loop_extra (this=0x31a5fe8, operation=HA_EXTRA_PREPARE_FOR_RENAME)
            at /home/elenst/maria-5.5/sql/ha_partition.cc:6226
            #8 0x0000000000c85918 in ha_partition::prepare_for_rename (this=0x31a5fe8)
            at /home/elenst/maria-5.5/sql/ha_partition.cc:6198
            #9 0x0000000000c8531c in ha_partition::extra (this=0x31a5fe8, operation=HA_EXTRA_PREPARE_FOR_RENAME)
            at /home/elenst/maria-5.5/sql/ha_partition.cc:5968
            #10 0x00000000005cc513 in wait_while_table_is_used (thd=0x7fe2ec11f070, table=0x31a5630,
            function=HA_EXTRA_PREPARE_FOR_RENAME) at /home/elenst/maria-5.5/sql/sql_base.cc:2334
            #11 0x00000000006c49bb in mysql_alter_table (thd=0x7fe2ec11f070, new_db=0x3070b20 "test",
            new_name=0x3070540 "A", create_info=0x7fe2f1a5cd70, table_list=0x3070578, alter_info=0x7fe2f1a5ce70,
            order_num=0, order=0x0, ignore=false, require_online=false)
            at /home/elenst/maria-5.5/sql/sql_table.cc:6862
            #12 0x00000000009419eb in Alter_table_statement::execute (this=0x3070d40, thd=0x7fe2ec11f070)
            at /home/elenst/maria-5.5/sql/sql_alter.cc:106
            #13 0x000000000062eaf4 in mysql_execute_command (thd=0x7fe2ec11f070)
            at /home/elenst/maria-5.5/sql/sql_parse.cc:4454
            #14 0x0000000000631bec in mysql_parse (thd=0x7fe2ec11f070,
            rawbuf=0x3070468 "ALTER TABLE `A` PARTITION BY KEY() PARTITIONS 9", length=47,
            parser_state=0x7fe2f1a5d670) at /home/elenst/maria-5.5/sql/sql_parse.cc:5730
            #15 0x0000000000625abd in dispatch_command (command=COM_QUERY, thd=0x7fe2ec11f070,
            packet=0x7fe2ec1247a1 "ALTER TABLE `A` PARTITION BY KEY() PARTITIONS 9", packet_length=47)
            at /home/elenst/maria-5.5/sql/sql_parse.cc:1056
            #16 0x0000000000624d90 in do_command (thd=0x7fe2ec11f070) at /home/elenst/maria-5.5/sql/sql_parse.cc:795
            #17 0x000000000071f729 in do_handle_one_connection (thd_arg=0x7fe2ec11f070)
            at /home/elenst/maria-5.5/sql/sql_connect.cc:1253
            #18 0x000000000071f1ec in handle_one_connection (arg=0x7fe2ec11f070)
            at /home/elenst/maria-5.5/sql/sql_connect.cc:1168
            #19 0x00007fe3096d3a4f in start_thread () from /lib64/libpthread.so.0
            #20 0x00007fe30846882d in clone () from /lib64/libc.so.6

            bzr version-info
            revision-id: igor@askmonty.org-20120303212249-smj4ixph46c126he
            date: 2012-03-03 13:22:49 -0800
            build-date: 2012-03-05 23:00:19 +0200
            revno: 3311

            Could not reproduce on 5.3.
            Could not reproduce on the release build 5.5.20.
            Could not convert into an MTR test, it might require deeper inside into the root of the problem, and possibly usage of synchronization points.

            1. RQG grammar (test.yy):

            partitions:
            ALTER TABLE _table PARTITION BY KEY() PARTITIONS part_num |
            ALTER TABLE _table REMOVE PARTITIONING;

            query:
            SELECT * FROM _table ;

            thread1:
            partitions ;

            part_num:
            1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ;

            1. End of RQG grammar
            1. Run as

            perl runall.pl \
            --threads=2 \
            --duration=3600 \
            --queries=100M \
            --grammar=./test.yy \
            --engine=Aria \
            --rows=1,1,1,1,1,1,1,1,1 \
            --mtr-build-thread=300 \
            --basedir1=<5.5 debug basedir> \
            --vardir1=<your vardir>

            Show
            elenst Elena Stepanova added a comment - Server crashes in _ma_remove_table_from_trnman on concurrent ALTER and SELECT See also bug#947474. The reason of both problems might be the same, as they happen with the exact same test case, but since it fails in both threads, sometimes on SELECT with assertion from bug#947474 and sometimes with the crash on ALTER, I will file both. #3 <signal handler called> #4 0x00000000009610a6 in _ma_remove_table_from_trnman (share=0x30ce0c0, trn=0x307d770) at /home/elenst/maria-5.5/storage/maria/ma_state.c:559 #5 0x00000000009b8fde in maria_extra (info=0x31838f0, function=HA_EXTRA_PREPARE_FOR_RENAME, extra_arg=0x0) at /home/elenst/maria-5.5/storage/maria/ma_extra.c:347 #6 0x0000000000974f3e in ha_maria::extra (this=0x31a6ac8, operation=HA_EXTRA_PREPARE_FOR_RENAME) at /home/elenst/maria-5.5/storage/maria/ha_maria.cc:2478 #7 0x0000000000c859fa in ha_partition::loop_extra (this=0x31a5fe8, operation=HA_EXTRA_PREPARE_FOR_RENAME) at /home/elenst/maria-5.5/sql/ha_partition.cc:6226 #8 0x0000000000c85918 in ha_partition::prepare_for_rename (this=0x31a5fe8) at /home/elenst/maria-5.5/sql/ha_partition.cc:6198 #9 0x0000000000c8531c in ha_partition::extra (this=0x31a5fe8, operation=HA_EXTRA_PREPARE_FOR_RENAME) at /home/elenst/maria-5.5/sql/ha_partition.cc:5968 #10 0x00000000005cc513 in wait_while_table_is_used (thd=0x7fe2ec11f070, table=0x31a5630, function=HA_EXTRA_PREPARE_FOR_RENAME) at /home/elenst/maria-5.5/sql/sql_base.cc:2334 #11 0x00000000006c49bb in mysql_alter_table (thd=0x7fe2ec11f070, new_db=0x3070b20 "test", new_name=0x3070540 "A", create_info=0x7fe2f1a5cd70, table_list=0x3070578, alter_info=0x7fe2f1a5ce70, order_num=0, order=0x0, ignore=false, require_online=false) at /home/elenst/maria-5.5/sql/sql_table.cc:6862 #12 0x00000000009419eb in Alter_table_statement::execute (this=0x3070d40, thd=0x7fe2ec11f070) at /home/elenst/maria-5.5/sql/sql_alter.cc:106 #13 0x000000000062eaf4 in mysql_execute_command (thd=0x7fe2ec11f070) at /home/elenst/maria-5.5/sql/sql_parse.cc:4454 #14 0x0000000000631bec in mysql_parse (thd=0x7fe2ec11f070, rawbuf=0x3070468 "ALTER TABLE `A` PARTITION BY KEY() PARTITIONS 9", length=47, parser_state=0x7fe2f1a5d670) at /home/elenst/maria-5.5/sql/sql_parse.cc:5730 #15 0x0000000000625abd in dispatch_command (command=COM_QUERY, thd=0x7fe2ec11f070, packet=0x7fe2ec1247a1 "ALTER TABLE `A` PARTITION BY KEY() PARTITIONS 9", packet_length=47) at /home/elenst/maria-5.5/sql/sql_parse.cc:1056 #16 0x0000000000624d90 in do_command (thd=0x7fe2ec11f070) at /home/elenst/maria-5.5/sql/sql_parse.cc:795 #17 0x000000000071f729 in do_handle_one_connection (thd_arg=0x7fe2ec11f070) at /home/elenst/maria-5.5/sql/sql_connect.cc:1253 #18 0x000000000071f1ec in handle_one_connection (arg=0x7fe2ec11f070) at /home/elenst/maria-5.5/sql/sql_connect.cc:1168 #19 0x00007fe3096d3a4f in start_thread () from /lib64/libpthread.so.0 #20 0x00007fe30846882d in clone () from /lib64/libc.so.6 bzr version-info revision-id: igor@askmonty.org-20120303212249-smj4ixph46c126he date: 2012-03-03 13:22:49 -0800 build-date: 2012-03-05 23:00:19 +0200 revno: 3311 Could not reproduce on 5.3. Could not reproduce on the release build 5.5.20. Could not convert into an MTR test, it might require deeper inside into the root of the problem, and possibly usage of synchronization points. RQG grammar (test.yy): partitions: ALTER TABLE _table PARTITION BY KEY() PARTITIONS part_num | ALTER TABLE _table REMOVE PARTITIONING; query: SELECT * FROM _table ; thread1: partitions ; part_num: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ; End of RQG grammar Run as perl runall.pl \ --threads=2 \ --duration=3600 \ --queries=100M \ --grammar=./test.yy \ --engine=Aria \ --rows=1,1,1,1,1,1,1,1,1 \ --mtr-build-thread=300 \ --basedir1=<5.5 debug basedir> \ --vardir1=<your vardir>
            Hide
            elenst Elena Stepanova added a comment -

            Re: Server crashes in _ma_remove_table_from_trnman on concurrent ALTER and SELECT
            Also filed as JIRA issue MDEV-171

            Show
            elenst Elena Stepanova added a comment - Re: Server crashes in _ma_remove_table_from_trnman on concurrent ALTER and SELECT Also filed as JIRA issue MDEV-171
            Hide
            monty Michael Widenius added a comment -

            Re: Server crashes in _ma_remove_table_from_trnman on concurrent ALTER and SELECT
            Fixed with patch for lp:947474

            Show
            monty Michael Widenius added a comment - Re: Server crashes in _ma_remove_table_from_trnman on concurrent ALTER and SELECT Fixed with patch for lp:947474
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 947487

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 947487

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: