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

MariaDB 10.0.13 crash with optimizer_use_condition_selectivity > 1

    XMLWordPrintable

    Details

      Description

      I got this bug with optimizer_use_condition_selectivity = 2

      140929 14:15:15 [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: 10.0.13-MariaDB-log
      key_buffer_size=268435456
      read_buffer_size=8388608
      max_used_connections=2
      max_threads=402
      thread_count=2
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 10149994 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0x7f7cbaad0008
      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 = 0x7f7da527fd10 thread_stack 0x48000
      /usr/sbin/mysqld(my_print_stacktrace+0x2b)[0xb7054b]
      /usr/sbin/mysqld(handle_fatal_signal+0x398)[0x727588]
      /lib64/libpthread.so.0(+0xf710)[0x7f7da4efa710]
      /usr/sbin/mysqld[0x5f2d68]
      /usr/sbin/mysqld[0x600b24]
      /usr/sbin/mysqld[0x60114b]
      /usr/sbin/mysqld(_Z11choose_planP4JOINy+0xf5)[0x6016b5]
      /usr/sbin/mysqld[0x528e3d]
      /usr/sbin/mysqld(_ZN4JOIN14optimize_innerEv+0x6de)[0x61c8de]
      /usr/sbin/mysqld(_ZN4JOIN8optimizeEv+0x28)[0x61ed98]
      /usr/sbin/mysqld(_ZN18st_select_lex_unit8optimizeEv+0x1e6)[0x660616]
      /usr/sbin/mysqld(_Z22mysql_derived_optimizeP3THDP3LEXP10TABLE_LIST+0xe8)[0x5b1228]
      /usr/sbin/mysqld(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0x1bd)[0x5b252d]
      /usr/sbin/mysqld(_ZN13st_select_lex14handle_derivedEP3LEXj+0x47)[0x5c7457]
      /usr/sbin/mysqld(_ZN4JOIN14optimize_innerEv+0x136)[0x61c336]
      /usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xd8)[0x61efb8]
      /usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x28d)[0x62284d]
      /usr/sbin/mysqld[0x5ca456]
      /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x4c4f)[0x5d51af]
      /usr/sbin/mysqld[0x5d6cc2]
      /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1b20)[0x5d8e80]
      /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x453)[0x696993]
      /usr/sbin/mysqld(handle_one_connection+0x42)[0x696a62]
      /lib64/libpthread.so.0(+0x79d1)[0x7f7da4ef29d1]
      /lib64/libc.so.6(clone+0x6d)[0x7f7da360f86d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f7cb9c1f020): is an invalid pointer
      Connection ID (thread ID): 3
      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=on,exists_to_in=on
       
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash.
       

      CREATE TABLE `engine4_event_membership` (
        `resource_id` int(11) unsigned NOT NULL,
        `user_id` int(11) unsigned NOT NULL,
        `active` tinyint(1) NOT NULL DEFAULT '0',
        `resource_approved` tinyint(1) NOT NULL DEFAULT '0',
        `user_approved` tinyint(1) NOT NULL DEFAULT '0',
        `message` text COLLATE utf8_unicode_ci,
        `rsvp` tinyint(3) NOT NULL DEFAULT '3',
        `title` text COLLATE utf8_unicode_ci,
        `behalf_guid` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
        `additional_member_count` int(11) NOT NULL DEFAULT '1',
        `come_with_count` int(11) NOT NULL DEFAULT '0',
        PRIMARY KEY (`resource_id`,`user_id`),
        KEY `REVERSE` (`user_id`),
        KEY `BEHALF` (`behalf_guid`),
        KEY `BEHALF_COMPOUND` (`resource_id`,`user_id`,`behalf_guid`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
       
      CREATE TABLE `engine4_event_events` (
        `event_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
        `title` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
        `description` text COLLATE utf8_unicode_ci NOT NULL,
        `user_id` int(11) unsigned NOT NULL,
        `parent_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
        `parent_id` int(11) unsigned NOT NULL,
        `search` tinyint(1) NOT NULL DEFAULT '1',
        `creation_date` datetime NOT NULL,
        `modified_date` datetime NOT NULL,
        `starttime` datetime NOT NULL,
        `endtime` datetime NOT NULL,
        `host` varchar(115) COLLATE utf8_unicode_ci NOT NULL,
        `location` varchar(115) COLLATE utf8_unicode_ci NOT NULL,
        `view_count` int(11) unsigned NOT NULL DEFAULT '0',
        `member_count` int(11) unsigned NOT NULL DEFAULT '0',
        `approval` tinyint(1) NOT NULL DEFAULT '0',
        `invite` tinyint(1) NOT NULL DEFAULT '0',
        `photo_id` int(11) unsigned NOT NULL,
        `category_id` int(11) unsigned NOT NULL DEFAULT '0',
        `is_private` tinyint(1) DEFAULT '0',
        `person` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
        `phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
        `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
        `country` int(11) NOT NULL DEFAULT '0',
        `region` int(11) NOT NULL DEFAULT '0',
        `city` int(11) NOT NULL DEFAULT '0',
        `adress` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
        `website` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
        `short_info` text COLLATE utf8_unicode_ci NOT NULL,
        `membership_privacy` enum('no_confirm','confirm','invite') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no_confirm',
        `membership_no_confirm` enum('all','friends','parent_members','friends_and_parent_members','nobody') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'all',
        `unique_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
        `region_part` int(11) NOT NULL DEFAULT '0',
        PRIMARY KEY (`event_id`),
        UNIQUE KEY `PROFILE_ADRESS` (`unique_name`),
        KEY `user_id` (`user_id`),
        KEY `parent_type` (`parent_type`,`parent_id`),
        KEY `starttime` (`starttime`),
        KEY `search` (`search`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
       
       CREATE TABLE `engine4_activity_reposts` (
        `repost_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
        `user_id` int(11) unsigned NOT NULL,
        `subject_type` varchar(24) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
        `subject_id` int(11) unsigned NOT NULL,
        `object_type` varchar(24) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
        `object_id` int(11) unsigned NOT NULL,
        `params` text COLLATE utf8_unicode_ci,
        `date` datetime NOT NULL,
        `order` int(11) NOT NULL DEFAULT '0',
        `autoposted` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
        `is_private` int(1) NOT NULL DEFAULT '0',
        PRIMARY KEY (`repost_id`),
        UNIQUE KEY `BETWEEN` (`subject_type`,`subject_id`,`object_type`,`object_id`,`is_private`),
        KEY `SUBJECT` (`subject_type`,`subject_id`),
        KEY `OBJECT` (`object_type`,`object_id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

      Query:

      SELECT 
         COUNT(1) AS `zend_paginator_row_count` 
      FROM 
      (
         (
          SELECT 
            `engine4_event_events`.*, 
            0 AS is_reposted 
          FROM 
            `engine4_event_events` 
          WHERE 
            ((engine4_event_events.is_private = 0)) AND 
            ((event_id in (SELECT 
                             `engine4_event_membership`.`resource_id` 
                           FROM 
                             `engine4_event_membership` 
                           WHERE 
                              (user_id = 127994) AND (active = 1)
                          )
             ))
          ) 
       
           UNION 
       
          (
           SELECT 
             `engine4_event_events`.*, 
              repost_id AS is_reposted 
           FROM 
              `engine4_activity_reposts` INNER JOIN `engine4_event_events` 
           WHERE 
               (engine4_activity_reposts.object_type = 'event') AND 
               (engine4_activity_reposts.object_id = engine4_event_events.event_id) AND 
               (engine4_activity_reposts.is_private = 0) AND 
               (engine4_activity_reposts.subject_id = 127994) AND 
               (engine4_activity_reposts.subject_type in ('user'))
          )
      ) AS `t`;

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psergey Sergei Petrunia
              Reporter:
              aquarius Andrew U.
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: