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

MariaDB could crash after changing the query_cache size

    XMLWordPrintable

Details

    Description

      Hi,

      I've just experienced a crash with mariadb 5.5.34 a few hours after changing the query cache size live.
      Initialy, my query cache size was set to 128M.
      I changed it several time to make some tests on a slave :
      8M, 1M, 512K, 0, then back to 16M

      The syntax used was : SET GLOBAL query_cache_size=8*1024*1024;

      2h after those changes Mariadb finally crashed in the query cache code :

      Server version: 5.5.34-MariaDB-1~squeeze-log
      key_buffer_size=3221225472
      read_buffer_size=4194304
      max_used_connections=206
      max_threads=402
      thread_count=39
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 6446073 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0x7f9f5c22a6c0
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f9f8d97fe58 thread_stack 0x48000
      (my_addr_resolve failure: fork)
      /usr/sbin/mysqld(my_print_stacktrace+0x2e) [0x7fbabbf6521e]
      /usr/sbin/mysqld(handle_fatal_signal+0x4ac) [0x7fbabbb6541c]
      /lib/libpthread.so.0(+0xeff0) [0x7fbabb25dff0]
      /usr/sbin/mysqld(Query_cache::register_all_tables(THD*, Query_cache_block*, TABLE_LIST*, unsigned int)+0x11f) [0x7fbabb9cd69f]
      /usr/sbin/mysqld(Query_cache::store_query(THD*, TABLE_LIST*)+0x42b) [0x7fbabb9cdbcb]
      /usr/sbin/mysqld(+0x379f8f) [0x7fbabba04f8f]
      /usr/sbin/mysqld(mysql_execute_command(THD*)+0x3427) [0x7fbabba0c0c7]
      /usr/sbin/mysqld(mysql_parse(THD*, char*, unsigned int, Parser_state*)+0x29b) [0x7fbabba0ef4b]
      /usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x17f2) [0x7fbabba10802]
      /usr/sbin/mysqld(do_handle_one_connection(THD*)+0x419) [0x7fbabbad7219]
      /usr/sbin/mysqld(handle_one_connection+0x51) [0x7fbabbad72d1]
      /lib/libpthread.so.0(+0x68ca) [0x7fbabb2558ca]
      /lib/libc.so.6(clone+0x6d) [0x7fbab9bd4b6d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f9f74717898): is an invalid pointer
      Connection ID (thread ID): 1157940
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off

      It seems the issue is quite difficult to reproduce, but hopefully with the stack you'll get some clues of what could have been corrupted.

      Thanks and regards,
      Jocelyn Fournier

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              jocel1 jocelyn fournier
              Votes:
              1 Vote for this issue
              Watchers:
              7 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.