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

Reproducible sub select join crash on 5.3.8 and 5.3.9

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.28a, 5.3.8, 5.3.9
    • Fix Version/s: 5.3.11
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux 2.6.32-279.1.1.el6.x86_64 (Red Hat EL6)

      Description

      Hello and thank you for mariadb,

      I have a crash I can reproduce against 5.3.8 and 5.3.9 (only versions tried so far), it is currently a select with some sub select and joins against 5 MyISAM tables, about 1.2G in size, but the mysqldump compresses to 116M. Using the binary tar file images, running on Red Hat EL6. I have not spent time reducing it into a smaller reproducer.

      Once I have created this issue I will send the private compressed mysqldump by anonymous FTP.

      From the error log:

      121006 7:58:26 [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 http://kb.askmonty.org/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: 5.3.9-MariaDB
      key_buffer_size=134213632
      read_buffer_size=131072
      max_used_connections=1
      max_threads=152
      thread_count=1
      connection_count=1
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 463795 K bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.

      Thread pointer: 0x0x367dee0
      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 = 0x7fd27c6ece68 thread_stack 0x48000
      ./bin/mysqld(my_print_stacktrace+0x2e) [0xa3015e]
      ./bin/mysqld(handle_fatal_signal+0x3f9) [0x7662c9]
      /lib64/libpthread.so.0() [0x3f5dc0f4a0]
      ./bin/mysqld(PROFILING::~PROFILING()+0x49) [0x6df649]
      ./bin/mysqld(create_internal_tmp_table_from_heap(THD*, st_table*, st_maria_columndef*, st_maria_columndef**, int, bool)+0x25) [0x6c0275]
      ./bin/mysqld(select_union::send_data(List<Item>&)+0x133) [0x7af483]
      ./bin/mysqld() [0x6ab22b]
      ./bin/mysqld() [0x6c13dc]
      ./bin/mysqld(sub_select(JOIN*, st_join_table*, bool)+0xe0) [0x6c1610]
      ./bin/mysqld() [0x6c1b13]
      ./bin/mysqld(JOIN::exec()+0x859) [0x6d2e69]
      Fatal signal 6 while backtracing
      121006 07:58:26 mysqld_safe Number of processes running now: 0
      121006 07:58:26 mysqld_safe mysqld restarted

      This is the query:

      SELECT t1.deal_id AS `deal_id` FROM table_e AS t1 JOIN table_d AS t10 ON (t1.deal_id = t10.deal_id) AND (t10.co_role_id IN ( SELECT co_role_id FROM table_a WHERE target ) = '1') JOIN table_c AS t11 ON ((t10.deal_id = t11.deal_id) AND (t10.feid = t11.feid)) AND (t10.co_role_id IN ( SELECT co_role_id FROM table_a WHERE target ) = '1') WHERE ((t1.deal_id) IN ( SELECT * FROM ( (SELECT DISTINCT t1.deal_id FROM table_e AS t1 JOIN table_d AS t2 ON (t1.deal_id = t2.deal_id) AND (t2.co_role_id IN ( SELECT co_role_id FROM table_a WHERE target_all ) = '1') JOIN table_c AS t3 ON ((t2.deal_id = t3.deal_id) AND (t2.feid = t3.feid)) AND (t2.co_role_id IN ( SELECT co_role_id FROM table_a WHERE target ) = '1') JOIN table_f AS t4 ON t3.exchange = t4.exchange WHERE t4.exchange IN ('CT','ND','NY','AM')) UNION (SELECT DISTINCT t1.deal_id FROM table_e AS t1 JOIN table_d AS t2 ON (t1.deal_id = t2.deal_id) AND (t2.co_role_id IN ( SELECT co_role_id FROM table_a WHERE target_all ) = '1') JOIN table_c AS t3 ON ((t2.deal_id = t3.deal_id) AND (t2.feid = t3.feid)) AND (t2.co_role_id IN ( SELECT co_role_id FROM table_a WHERE target ) = '1') JOIN table_b AS t5 ON t3.country = t5.country WHERE t5.country = 'US') ) tU )) AND ((t1.deal_id) IN ( SELECT * FROM ( (SELECT DISTINCT t1.deal_id FROM table_e AS t1 JOIN table_d AS t6 ON (t1.deal_id = t6.deal_id) AND (t6.co_role_id IN ( SELECT co_role_id FROM table_a WHERE acquirer_all ) = '1') JOIN table_c AS t7 ON ((t6.deal_id = t7.deal_id) AND (t6.feid = t7.feid)) AND (t6.co_role_id IN ( SELECT co_role_id FROM table_a WHERE acquirer_all ) = '1') JOIN table_f AS t8 ON t7.exchange = t8.exchange WHERE t8.exchange IN ('CT','ND','NY','AM')) UNION (SELECT DISTINCT t1.deal_id FROM table_e AS t1 JOIN table_d AS t6 ON (t1.deal_id = t6.deal_id) AND (t6.co_role_id IN ( SELECT co_role_id FROM table_a WHERE acquirer_all ) = '1') JOIN table_c AS t7 ON ((t6.deal_id = t7.deal_id) AND (t6.feid = t7.feid)) AND (t6.co_role_id IN ( SELECT co_role_id FROM table_a WHERE acquirer_all ) = '1') ) ) tU )) LIMIT 200 ;

          • glibc detected *** ./bin/mysqld: corrupted double-linked list: 0x00007fd22811cb70 ***
            ======= Backtrace: =========
            /lib64/libc.so.6[0x3f5d8750c6]
            /lib64/libc.so.6[0x3f5d878b34]
            /lib64/libc.so.6(__libc_malloc+0x6d)[0x3f5d87948d]
            /usr/lib64/libstdc++.so.6[0x3f620c0f5b]
            /usr/lib64/libstdc++.so.6[0x3f620c2aff]
            /usr/lib64/libstdc++.so.6(__cxa_demangle+0x6e)[0x3f620c2cce]
            ./bin/mysqld(my_print_stacktrace+0xe6)[0xa30216]
            ./bin/mysqld(handle_fatal_signal+0x3f9)[0x7662c9]
            /lib64/libpthread.so.0[0x3f5dc0f4a0]
            ./bin/mysqld(_ZN9PROFILINGD2Ev+0x49)[0x6df649]
            ./bin/mysqld(_Z35create_internal_tmp_table_from_heapP3THDP8st_tableP18st_maria_columndefPS4_ib+0x25)[0x6c0275]
            ./bin/mysqld(_ZN12select_union9send_dataER4ListI4ItemE+0x133)[0x7af483]
            ./bin/mysqld[0x6ab22b]
            ./bin/mysqld[0x6c13dc]
            ./bin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0xe0)[0x6c1610]
            ./bin/mysqld[0x6c1b13]
            ./bin/mysqld(_ZN4JOIN4execEv+0x859)[0x6d2e69]
            ./bin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x199)[0x6d4f69]
            ./bin/mysqld(_ZN18st_select_lex_unit4execEv+0xf59)[0x7b0709]
            ./bin/mysqld(_Z18mysql_derived_fillP3THDP6st_lexP10TABLE_LIST+0x198)[0x7b20b8]
            ./bin/mysqld(_Z27mysql_handle_single_derivedP6st_lexP10TABLE_LISTj+0xb8)[0x7b31d8]
            ./bin/mysqld(_ZN13st_join_table12preread_initEv+0xa1)[0x6ae131]
            ./bin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x496)[0x6c19c6]
            ./bin/mysqld(_Z26join_tab_execution_startupP13st_join_table+0xd8)[0x748928]
            ./bin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x251)[0x6c1781]
            ./bin/mysqld[0x6c1b13]
            ./bin/mysqld(_ZN4JOIN4execEv+0x859)[0x6d2e69]
            ./bin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x199)[0x6d4f69]
            ./bin/mysqld(_Z13handle_selectP3THDP6st_lexP13select_resultm+0x16f)[0x6d593f]
            ./bin/mysqld[0x64a7be]
            ./bin/mysqld(_Z21mysql_execute_commandP3THD+0x3a43)[0x6503a3]
            ./bin/mysqld(_Z11mysql_parseP3THDPcjPPKc+0x299)[0x653189]
            ./bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xa9b)[0x65407b]
            ./bin/mysqld(_Z10do_commandP3THD+0x101)[0x654bd1]
            ./bin/mysqld(handle_one_connection+0xfd)[0x645fbd]
            /lib64/libpthread.so.0[0x3f5dc077f1]
            /lib64/libc.so.6(clone+0x6d)[0x3f5d8e570d]

        Attachments

          Activity

            People

            • Assignee:
              timour Timour Katchaounov (Inactive)
              Reporter:
              thatsafunnyname Peter (Stig) Edwards
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: