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

Crash in JOIN_CACHE_BKAH::skip_index_tuple when mrr=on and join_cache_level=6+

    XMLWordPrintable

    Details

      Description

      Crash with the following backtrace:

      Version: '10.4.11-MariaDB-log'  socket: '/var/run/mysql/3302.sock'  port: 3302  MariaDB Server
      200122  9:00:00 [ERROR] mysqld got signal 11 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.4.11-MariaDB-log
      key_buffer_size=17179869184
      read_buffer_size=131072
      max_used_connections=158
      max_threads=2050
      thread_count=164
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 21288472 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7fd8780009a8
      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 = 0x7fdd48181cf0 thread_stack 0x49000
      /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x5647307a9ebe]
      /usr/sbin/mysqld(handle_fatal_signal+0x30f)[0x5647302424cf]
      sigaction.c:0(__restore_rt)[0x7fdd5121b630]
      /usr/sbin/mysqld(_ZN15JOIN_CACHE_BKAH16skip_index_tupleEPv+0xb0)[0x56473014a2d0]
      /usr/sbin/mysqld(+0x7ae35e)[0x56473014a35e]
      /usr/sbin/mysqld(_ZN23Mrr_simple_index_reader8get_nextEPPv+0x47)[0x56473014d2b7]
      /usr/sbin/mysqld(_ZN10DsMrr_impl10dsmrr_nextEPPv+0x42)[0x56473014e4f2]
      /usr/sbin/mysqld(+0xddc910)[0x564730778910]
      /usr/sbin/mysqld(+0xddddb3)[0x564730779db3]
      /usr/sbin/mysqld(_ZN17JOIN_TAB_SCAN_MRR4nextEv+0x30)[0x564730145860]
      /usr/sbin/mysqld(_ZN10JOIN_CACHE21join_matching_recordsEb+0xcd)[0x564730148a2d]
      /usr/sbin/mysqld(_ZN10JOIN_CACHE12join_recordsEb+0xdc)[0x5647301484cc]
      /usr/sbin/mysqld(_Z16sub_select_cacheP4JOINP13st_join_tableb+0x2e)[0x5647300717de]
      /usr/sbin/mysqld(_ZN4JOIN10exec_innerEv+0xa86)[0x564730093636]
      /usr/sbin/mysqld(_ZN4JOIN4execEv+0x33)[0x5647300939a3]
      /usr/sbin/mysqld(_ZN18st_select_lex_unit4execEv+0xb34)[0x5647300d8d14]
      /usr/sbin/mysqld(_Z11mysql_unionP3THDP3LEXP13select_resultP18st_select_lex_unitm+0x32)[0x5647300dbb22]
      /usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x67)[0x5647300926a7]
      /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x942e)[0x56473003d98e]
      /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x3ad)[0x56473003e23d]
      /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x217a)[0x5647300415fa]
      /usr/sbin/mysqld(_Z10do_commandP3THD+0x11c)[0x564730042f3c]
      /usr/sbin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x1fa)[0x56473011f24a]
      /usr/sbin/mysqld(handle_one_connection+0x3d)[0x56473011f32d]
      pthread_create.c:0(start_thread)[0x7fdd51213ea5]
      /lib64/libc.so.6(clone+0x6d)[0x7fdd4f5b48cd]
      

      happens for INSERT ... SELECT accessing several tables when these options are set:

      set join_cache_level =8; -- or 6
      set optimizer_switch='mrr=on';
      set optimizer_switch='mrr_sort_keys=on';
      

      It was not the case fro the same query and data in older 10.2.x and 10.3.x versions.

        Attachments

          Activity

            People

            Assignee:
            igor Igor Babaev
            Reporter:
            valerii Valerii Kravchuk
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: