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

SEQUENCE related crash when running concurrent I_S.TABLES and FLUSH queries

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3
    • 10.3.1
    • Sequences
    • None
    • Linux, 10.3 branch as of today (2017-07-27, commit e67b816451cb1003fc42755e40327411fd8b7a35 )

    Description

      With at least one SEQUENCE defined in the database a combination of:

      • two tasks concurrently running "SELECT * FROM I_S.TABLES" in a loop
      • one task running "FLUSH TABLES" in a loop

      the server process quickly crashes with the following backtrace:

      /usr/local/mariadb-git-10.3/bin/mysqld(my_print_stacktrace+0x29)[0x55b9694ad369]
      /usr/local/mariadb-git-10.3/bin/mysqld(handle_fatal_signal+0x305)[0x55b968fa5615]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f3489576390]
      /lib/x86_64-linux-gnu/libpthread.so.0(pthread_rwlock_unlock+0x2c)[0x7f3489571edc]
      /usr/local/mariadb-git-10.3/bin/mysqld(_ZN8SEQUENCE19read_initial_valuesEP5TABLE+0x1d6)[0x55b968f19f16]
      /usr/local/mariadb-git-10.3/bin/mysqld(+0xb8bb93)[0x55b96948fb93]
      /usr/local/mariadb-git-10.3/bin/mysqld(_ZN7handler7ha_openEP5TABLEPKcij+0x2a)[0x55b968fa971a]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z21open_table_from_shareP3THDP11TABLE_SHAREPKcjjjP5TABLEb+0x652)[0x55b968e99f32]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z10open_tableP3THDP10TABLE_LISTP18Open_table_context+0x8e4)[0x55b968db0e14]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z11open_tablesP3THDRK14DDL_options_stPP10TABLE_LISTPjjP19Prelocking_strategy+0xa03)[0x55b968db36d3]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z30open_normal_and_derived_tablesP3THDP10TABLE_LISTjj+0x5a)[0x55b968db3f4a]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z31open_tables_only_view_structureP3THDP10TABLE_LISTb+0x4e)[0x55b968db3fde]
      /usr/local/mariadb-git-10.3/bin/mysqld(+0x54964a)[0x55b968e4d64a]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z14get_all_tablesP3THDP10TABLE_LISTP4Item+0x7f4)[0x55b968e5e904]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z24get_schema_tables_resultP4JOIN23enum_schema_table_state+0x27f)[0x55b968e5fecf]
      /usr/local/mariadb-git-10.3/bin/mysqld(_ZN4JOIN10exec_innerEv+0x596)[0x55b968e48726]
      /usr/local/mariadb-git-10.3/bin/mysqld(_ZN4JOIN4execEv+0x29)[0x55b968e48e49]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xee)[0x55b968e48f8e]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x128)[0x55b968e498d8]
      /usr/local/mariadb-git-10.3/bin/mysqld(+0x4ed6f6)[0x55b968df16f6]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z21mysql_execute_commandP3THD+0x5d26)[0x55b968dfd856]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x27d)[0x55b968e0048d]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x1e3e)[0x55b968e02f9e]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z10do_commandP3THD+0x151)[0x55b968e037d1]
      /usr/local/mariadb-git-10.3/bin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x234)[0x55b968ebe554]
      /usr/local/mariadb-git-10.3/bin/mysqld(handle_one_connection+0x34)[0x55b968ebe6c4]
      

      The minimal script I used to reproduce this crash is:

      #! /bin/bash
       
      OPT="-u root"
       
      mysql $OPT test -e "CREATE SEQUENCE s1;"
       
      (while mysql $OPT test -e "SELECT * FROM information_schema.TABLES;" >/dev/null; do echo -n .; done) &
      (while mysql $OPT test -e "SELECT * FROM information_schema.TABLES;" >/dev/null; do echo -n .; done) &
      (while mysql $OPT test -e "FLUSH TABLES;" >/dev/null; do echo -n .; done) &
      

      With all three parallel while loops it crashes within a second, removing any of them I didn't see any crashes even when running things for several minutes.

      This only happens with 10.3 built from current git source, and some customer specific custom builds, but I could not crash the 10.3.0 release. So it looks like something introduced between 10.3.0 and now, which should be easy to track down with "git bisect"

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              hholzgra Hartmut Holzgraefe
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.