Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-1684

Performance Schema crashes prepared statement

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.5
    • 1.1.6, 1.2.0
    • None
    • None

    Description

      Observed in a stack trace, a crash here in parse_sql.cc:

      parser_state->m_lip.m_digest->m_digest_storage.m_charset_number= thd->charset()->number;
      

      Stack for reference:

      /lib64/libc.so.6(__fortify_fail+0x37)[0x7f54bd7aa6e7]
      /lib64/libc.so.6(+0x116862)[0x7f54bd7a8862]
      /lib64/libc.so.6(+0x118647)[0x7f54bd7aa647]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(my_addr_resolve+0xda)[0x55f51cd1586a]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(my_print_stacktrace+0x1aa)[0x55f51cd0396a]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(handle_fatal_signal+0x33d)[0x55f51c836add]
      /lib64/libpthread.so.0(+0xf6d0)[0x7f54bf5df6d0]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z9parse_sqlP3THDP12Parser_stateP19Object_creation_ctxb+0x96)[0x55f51c6d92b6]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z18idb_vtable_processP3THDyP9Statement+0xb21)[0x55f51c6dad41]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN18Prepared_statement7executeEP6Stringb+0x5e2)[0x55f51c6ec5b2]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN18Prepared_statement12execute_loopEP6StringbPhS2_+0x94)[0x55f51c6ec7c4]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(+0x4e3279)[0x55f51c6ed279]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z19mysqld_stmt_executeP3THDPcj+0x23)[0x55f51c6ed313]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1033)[0x55f51c6ddcb3]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z10do_commandP3THD+0xd4)[0x55f51c6df304]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z11tp_callbackP13TP_connection+0xbf)[0x55f51c7cce1f]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(+0x6087ce)[0x55f51c8127ce]
      /usr/local/mariadb/columnstore/mysql//bin/mysqld(+0xac2c74)[0x55f51ccccc74]
      /lib64/libpthread.so.0(+0x7e25)[0x7f54bf5d7e25]
      /lib64/libc.so.6(clone+0x6d)[0x7f54bd790bad]
      

      This happens when performance schema is enabled and a prepared statement is executed on a ColumnStore table. The fix is probably to do this in idb_vtable_process when parse_sql is called for COM_EXECUTE:

            parent_locker= thd->m_statement_psi;
            thd->m_statement_psi= NULL;
            parse_sql(...)
            thd->m_statement_psi= parent_locker;
      

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              LinuxJedi Andrew Hutchings (Inactive)
              Votes:
              1 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.