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

LP:850647 - Assertion `! is_set()' failed in Diagnostics_area::set_ok_status() with concurrent subquery workload

    Details

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

      Description

      mysqld: sql_class.cc:563: void Diagnostics_area::set_ok_status(THD*, ha_rows, ulonglong, const char*): Assertion `! is_set()' failed.
      
      /lib64/libc.so.6(__assert_fail+0xf6) [0x33b58296e6]
      /home/philips/bzr/maria-5.3/sql/mysqld(Diagnostics_area::set_ok_status(THD*, unsigned long long, unsigned long long, char const*)+0x68) [0x67665c]
      /home/philips/bzr/maria-5.3/sql/mysqld(my_ok(THD*, unsigned long long, unsigned long long, char const*)+0x3b) [0x585bdf]
      /home/philips/bzr/maria-5.3/sql/mysqld(select_insert::send_eof()+0x5d1) [0x75dfe3]
      /home/philips/bzr/maria-5.3/sql/mysqld(select_create::send_eof()+0x15) [0x75e02b]
      /home/philips/bzr/maria-5.3/sql/mysqld [0x755340]
      /home/philips/bzr/maria-5.3/sql/mysqld(JOIN::exec()+0x788) [0x755b30]
      /home/philips/bzr/maria-5.3/sql/mysqld(mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*)+0x3da) [0x751cde]
      /home/philips/bzr/maria-5.3/sql/mysqld(handle_select(THD*, st_lex*, select_result*, unsigned long)+0x1d6) [0x758108]
      /home/philips/bzr/maria-5.3/sql/mysqld(mysql_execute_command(THD*)+0x1ad2) [0x6a75ce]
      /home/philips/bzr/maria-5.3/sql/mysqld(mysql_parse(THD*, char*, unsigned int, char const**)+0x2c5) [0x6af02f]
      /home/philips/bzr/maria-5.3/sql/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x9cb) [0x6afbbd]
      /home/philips/bzr/maria-5.3/sql/mysqld(do_command(THD*)+0x259) [0x6b11fb]
      /home/philips/bzr/maria-5.3/sql/mysqld(handle_one_connection+0x18f) [0x69ba0b]
      
      Query (0x3aa5e20): CREATE TABLE transforms.insert_select_2012   SELECT    alias2 . `pk` AS field1 , alias1 . `col_varchar_key` AS field2 , alias1 . `col_int_key` AS field3 , alias1 . `col_int_key` AS field4 , alias1 . `col_varchar_key` AS field5 FROM ( C AS alias1 INNER JOIN ( ( D AS alias2 STRAIGHT_JOIN BB AS alias3 ON (alias3 . `col_int_key` = alias2 . `pk`  ) ) ) ON (alias3 . `col_varchar_nokey` = alias2 . `col_varchar_key`  ) ) WHERE  ( 7, 1 )  IN ( SELECT   SQ1_alias2 . `col_int_nokey` AS SQ1_field1 , SQ1_alias1 . `col_int_nokey` AS SQ1_field2 FROM ( C AS SQ1_alias1 STRAIGHT_JOIN BB AS SQ1_alias2 ON (SQ1_alias2 . `pk` = SQ1_alias1 . `pk`  ) ) WHERE  SQ1_alias1 . `col_varchar_key` < ANY ( SELECT   C_SQ1_alias2 . `col_varchar_key` AS C_SQ1_field1 FROM ( C AS C_SQ1_alias1 INNER JOIN C AS C_SQ1_alias2 ON (C_SQ1_alias2 . `col_varchar_nokey` = C_SQ1_alias1 . `col_varchar_key` ) ) WHERE C_SQ1_alias2 . `pk` <= SQ1_alias1 . `pk` OR C_SQ1_alias2 . `col_varchar_key` != C_SQ1_alias2 . `col_varchar_nokey` ) GROUP BY SQ1_field1 , SQ1_field2  )  HAVING (field2 <= 9 OR field4 >= 6)  /* 4 */
      
      Optimizer switch: semijoin=ON,materialization=OFF,firstmatch=OFF,loosescan=OFF
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            philipstoev Philip Stoev added a comment - - edited

            Re: Assertion `! is_set()' failed in Diagnostics_area::set_ok_status() with concurrent subquery workload
            To reproduce:

             perl runall.pl --queries=100000000 --debug --mysqld1=--debug-assert-if-crashed-table --queries=100M --duration=1200 --threads=6 --seed=time --mysqld1=--log-output=file --no-mask --views --reporter=QueryTimeout,Backtrace,ErrorLog,Deadlock --mysqld1=--optimizer_switch=semijoin=ON,materialization=OFF,firstmatch=OFF,loosescan=OFF --validator=Transformer --transformers=DisableChosenPlan,ConvertLiteralsToSubqueries,ExecuteAsInsertSelect,ExecuteAsSelectItem,ExecuteAsUpdateDelete,ExecuteAsWhereSubquery,InlineSubqueries,ExecuteAsPreparedTwice --notnull --engine=MyISAM --skip-gendata --seed=1316018912  --basedir1=/home/philips/bzr/maria-5.3  --mysqld1=--init-file=`pwd`/conf/optimizer/world.sql  --grammar=bug850647.yy
            
            Show
            philipstoev Philip Stoev added a comment - - edited Re: Assertion `! is_set()' failed in Diagnostics_area::set_ok_status() with concurrent subquery workload To reproduce: perl runall.pl --queries=100000000 --debug --mysqld1=--debug-assert-if-crashed-table --queries=100M --duration=1200 --threads=6 --seed=time --mysqld1=--log-output=file --no-mask --views --reporter=QueryTimeout,Backtrace,ErrorLog,Deadlock --mysqld1=--optimizer_switch=semijoin=ON,materialization=OFF,firstmatch=OFF,loosescan=OFF --validator=Transformer --transformers=DisableChosenPlan,ConvertLiteralsToSubqueries,ExecuteAsInsertSelect,ExecuteAsSelectItem,ExecuteAsUpdateDelete,ExecuteAsWhereSubquery,InlineSubqueries,ExecuteAsPreparedTwice --notnull --engine=MyISAM --skip-gendata --seed=1316018912 --basedir1=/home/philips/bzr/maria-5.3 --mysqld1=--init-file=`pwd`/conf/optimizer/world.sql --grammar=bug850647.yy
            Hide
            philipstoev Philip Stoev added a comment - - edited

            To reproduce:

             perl runall.pl --queries=100000000 --debug --mysqld1=--debug-assert-if-crashed-table --queries=100M --duration=1200 --threads=6 --seed=time --mysqld1=--log-output=file --no-mask --views --reporter=QueryTimeout,Backtrace,ErrorLog,Deadlock --mysqld1=--optimizer_switch=semijoin=ON,materialization=OFF,firstmatch=OFF,loosescan=OFF --validator=Transformer --transformers=DisableChosenPlan,ConvertLiteralsToSubqueries,ExecuteAsInsertSelect,ExecuteAsSelectItem,ExecuteAsUpdateDelete,ExecuteAsWhereSubquery,InlineSubqueries,ExecuteAsPreparedTwice --notnull --engine=MyISAM --skip-gendata --seed=1316018912  --basedir1=/home/philips/bzr/maria-5.3  --mysqld1=--init-file=`pwd`/conf/optimizer/world.sql  --grammar=bug850647.yy 
            

            grammar file
            LPexportBug850647_bug850647.yy

            Show
            philipstoev Philip Stoev added a comment - - edited To reproduce: perl runall.pl --queries=100000000 --debug --mysqld1=--debug-assert-if-crashed-table --queries=100M --duration=1200 --threads=6 --seed=time --mysqld1=--log-output=file --no-mask --views --reporter=QueryTimeout,Backtrace,ErrorLog,Deadlock --mysqld1=--optimizer_switch=semijoin=ON,materialization=OFF,firstmatch=OFF,loosescan=OFF --validator=Transformer --transformers=DisableChosenPlan,ConvertLiteralsToSubqueries,ExecuteAsInsertSelect,ExecuteAsSelectItem,ExecuteAsUpdateDelete,ExecuteAsWhereSubquery,InlineSubqueries,ExecuteAsPreparedTwice --notnull --engine=MyISAM --skip-gendata --seed=1316018912 --basedir1=/home/philips/bzr/maria-5.3 --mysqld1=--init-file=`pwd`/conf/optimizer/world.sql --grammar=bug850647.yy grammar file LPexportBug850647_bug850647.yy
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 850647

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 850647
            Hide
            elenst Elena Stepanova added a comment -

            There are no revision IDs for the server and RQG in the bug report, so they can only be guessed approximately by the date of reporting.
            MariaDB 5.3.1 which was released a few days before the report, and several revisions after it, fail on the same test with https://bugs.launchpad.net/maria/+bug/849717 , which was fixed by revno 3188; so, apparently to reproduce this bug, either another tree or some other conditions are needed.
            Alternatively, it's possible that the race condition itself happened when bug#849717 was hit, only the server managed to assert on create table before it crashed in another thread.

            Show
            elenst Elena Stepanova added a comment - There are no revision IDs for the server and RQG in the bug report, so they can only be guessed approximately by the date of reporting. MariaDB 5.3.1 which was released a few days before the report, and several revisions after it, fail on the same test with https://bugs.launchpad.net/maria/+bug/849717 , which was fixed by revno 3188; so, apparently to reproduce this bug, either another tree or some other conditions are needed. Alternatively, it's possible that the race condition itself happened when bug#849717 was hit, only the server managed to assert on create table before it crashed in another thread.

              People

              • Assignee:
                elenst Elena Stepanova
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: