[MDEV-6340] Mariadb 10.0.12 fatal "Lost connection" error w/ GCC 4.9 'Release' build; workaround ~ CFLAGS="-fno-delete-null-pointer-checks" Created: 2014-06-14  Updated: 2014-07-31  Resolved: 2014-07-31

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.12
Fix Version/s: 10.0.13

Type: Bug Priority: Major
Reporter: GrantK Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

uname -rm
3.15.0-1.gc9b3c8c-desktop x86_64
mysqld --version
mysqld Ver 10.0.12-MariaDB-log for Linux on x86_64 (Source distribution)
bzr log | head
------------------------------------------------------------
revno: 4253
committer: Sergei Golubchik <sergii@pisem.net>
branch nick: 10.0
timestamp: Fri 2014-06-13 13:25:32 +0200
message:
promote server_audit and sequence plugins to stable
------------------------------------------------------------
revno: 4252
committer: Sergei Golubchik <sergii@pisem.net>
php -v
PHP 5.6.0-dev (cli) (built: Jun 12 2014 10:24:30)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0-dev, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies


Issue Links:
Duplicate
is duplicated by MDEV-6360 MariaDB crashes on simple insert or a... Closed
Relates
relates to MDEV-6202 MariaDB 10.0.10 doesn't work with KDE... Closed

 Description   

After a clean/new install of MariaDB 10.0.11, undertaking a completely NEW drush-install from clean Drupal v7.28 source, I get the following fatal error + crash:

    SQLSTATE[HY000]: General error: 2006 MySQL server has gone away



 Comments   
Comment by GrantK [ 2014-06-14 ]

After a clean/new install of MariaDB and it's datadir&files

    uname -rm
        3.15.0-1.gc9b3c8c-desktop x86_64
    mysqld --version
        mysqld  Ver 10.0.11-MariaDB-log for Linux on x86_64 (Source distribution)
    bzr log | head
        ------------------------------------------------------------
        revno: 4253
        committer: Sergei Golubchik <sergii@pisem.net>
        branch nick: 10.0
        timestamp: Fri 2014-06-13 13:25:32 +0200
        message:
          promote server_audit and sequence plugins to stable
        ------------------------------------------------------------
        revno: 4252
        committer: Sergei Golubchik <sergii@pisem.net>
    php -v
        PHP 5.6.0-dev (cli) (built: Jun 12 2014 10:24:30) 
        Copyright (c) 1997-2014 The PHP Group
        Zend Engine v2.6.0-dev, Copyright (c) 1998-2014 Zend Technologies
            with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

undertaking a completely NEW drush-install from clean Drupal v7.28 source,

I get the following fatal error + crash,

    SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

here's the reproducible steps I've taken, and the logs around the problem,

	export myROOT="/srv/www"
	export myPROJ="Drupal7"
	export myVER="7.x"
	export mySITE="Site Name"
	export myMAIL="grantk@localhost"
	export mySUBDIR="dev"
	export myDB="dTEST01_db"
	export myUSRdb="dbUSR"
	export myPWDdb="dbPASS"
	export myUSRadm="admUSR"
	export myPWDadm="admPASS"
 
	mysqladmin --force drop   ${myDB}
	mysqladmin         create ${myDB}
	mysqlshow
	    +--------------------+
	    |     Databases      |
	    +--------------------+
	    | information_schema |
	    | mysql              |
	    | performance_schema |
	    | dTEST01_db         |
	    | test               |
	    +--------------------+
 
	mysql mysql
	  MariaDB [mysql]>
	   GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON `dTEST01_db`.* TO 'dbUSR'@'localhost' IDENTIFIED BY 'dbPASS';
	   FLUSH PRIVILEGES;
	   quit
 
 
	cd ${myROOT}/${myPROJ}
 
	rm -rf drupal-7*
	drush dl drupal
	    Project drupal (7.28) downloaded to /srv/www/Drupal7/drupal-7.28.                  [success]
	    Project drupal contains:                                                                                  [success]
	     - 3 profiles: standard, minimal, testing
	     - 4 themes: bartik, stark, seven, garland
	     - 47 modules: overlay, update, path, openid, file, contextual, dblog, options, number, list, text,
	    field_sql_storage, field, php, simpletest, shortcut, taxonomy, toolbar, search, blog, system, filter,
	    locale, poll, color, trigger, book, field_ui, help, aggregator, syslog, forum, contact, menu, image,
	    translation, user, node, block, profile, comment, tracker, dashboard, rdf, statistics,
	    drupal_system_listing_incompatible_test, drupal_system_listing_compatible_test
 
 
	cp -af drupal-7.28 ${mySUBDIR}
	cd                 ${mySUBDIR}
	cd sites/default
	cp -af default.settings.php settings.php
 
	cd ${myROOT}/${myPROJ}/${mySUBDIR}
	drush -v site-install standard -y --site-name=${mySITE} --sites-subdir=${mySUBDIR} --site-mail=${myMAIL} --db-url=mysql://${myUSRdb}:${myPWDdb}@localhost/${myDB} --account-name=${myUSRadm} --account-pass=${myPWDadm}

console reports,

    ...
    Initialized Drupal 7.28 root directory at /srv/www/Drupal7/dev                        [notice]
    Executing: mysql --defaults-extra-file=/tmp/drush_CLONbD --database=dTEST01_db --host=localhost --silent  < /tmp/drush_SuniOM
    You are about to create a sites/dev/settings.php file and DROP all tables in your 'dTEST01_db' database. Do you want to continue? (y/n): y
    Initialized Drupal site dev at sites/dev                                                                     [notice]
    Executing: mysql --defaults-extra-file=/tmp/drush_DWuUzk --database=dTEST01_db --host=localhost --silent  < /tmp/drush_eq6aRt
    Executing: mysql --defaults-extra-file=/tmp/drush_GZ4Tz2 --database=dTEST01_db --host=localhost --silent  < /tmp/drush_gF3Szb
    Undefined offset: 1 site_install.drush.inc:255                                                               [notice]
    Starting Drupal installation. This takes a few seconds ...                                                [ok]
    WD php: Warning: PDOStatement::execute(): MySQL server has gone away in DatabaseStatementBase->execute()  [warning]
    (line 2171 of /srv/www/Drupal7/dev/includes/database/database.inc).
    WD php: Warning: PDOStatement::execute(): Error reading result set's header in                            [warning]
    DatabaseStatementBase->execute() (line 2171 of
    /srv/www/Drupal7/dev/includes/database/database.inc).
    SQLSTATE[HY000]: General error: 2006 MySQL server has gone away                                           [error]
    Command dispatch complete                                                                                    [notice]

checking, the mysql server is still up and accessible

    mysqlshow
        +--------------------+
        |     Databases      |
        +--------------------+
        | information_schema |
        | mysql              |
        | performance_schema |
        | dTEST01_db         |
        | test               |
        +--------------------+

during the fail

    tail -f /var/log/mariadb/mariadb.log /var/log/mariadb/mariadb-err.log
 
        ==> /var/log/mariadb/mariadb.log <==
        140613 20:07:18     4 Connect   admUSR@localhost as anonymous on dTEST01_db
                            4 Query     select @@version_comment limit 1
                            4 Query     SELECT 1
                            4 Quit
                            5 Connect   admUSR@localhost as anonymous on dTEST01_db
                            5 Query     select @@version_comment limit 1
                            5 Query     SELECT 1
                            5 Quit
                            6 Connect   admUSR@localhost as anonymous on dTEST01_db
                            6 Query     select @@version_comment limit 1
                            6 Query     SHOW TABLES
                            6 Quit
                            7 Connect   admUSR@localhost as anonymous on dTEST01_db
                            7 Query     select @@version_comment limit 1
                            7 Query     DROP TABLE actions, batch, blocked_ips, cache, cache_bootstrap, cache_form, cache_menu, cache_page, cache_path, date_format_locale, date_format_type, date_formats, file_managed, file_usage, flood, menu_router, variable
        140613 20:07:19     7 Quit
                            8 Connect   admUSR@localhost as anonymous on dTEST01_db
                            8 Query     SET NAMES utf8
                            8 Query     SET sql_mode = 'ANSI,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER'
                            8 Query     CREATE TABLE drupal_install_test (id int NULL)
                            8 Query     INSERT INTO drupal_install_test (id) VALUES (1)
                            8 Query     UPDATE drupal_install_test SET id = 2
                            8 Query     DELETE FROM drupal_install_test
                            8 Query     DROP TABLE drupal_install_test
                            8 Query     SELECT value FROM variable WHERE name = 'install_task'
                            8 Query     SELECT filename FROM system WHERE name = 'text' AND type = 'module'
                            8 Query     SELECT 1 FROM variable LIMIT 0, 1
                            8 Query     CREATE TABLE variable (
        `name` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'The name of the variable.',
        `value` LONGBLOB NOT NULL COMMENT 'The value of the variable.',
        PRIMARY KEY (`name`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Named variable/value pairs created by Drupal core or any...'
                            8 Query     SELECT 1 FROM actions LIMIT 0, 1
                            8 Query     CREATE TABLE actions (
        `aid` VARCHAR(255) NOT NULL DEFAULT '0' COMMENT 'Primary Key: Unique actions ID.',
        `type` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'The object that that action acts on (node, user, comment, system or custom types.)',
        `callback` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The callback function that executes when the action runs.',
        `parameters` LONGBLOB NOT NULL COMMENT 'Parameters to be passed to the callback function.',
        `label` VARCHAR(255) NOT NULL DEFAULT '0' COMMENT 'Label of the action.',
        PRIMARY KEY (`aid`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Stores action information.'
                            8 Query     SELECT 1 FROM batch LIMIT 0, 1
                            8 Query     CREATE TABLE batch (
        `bid` INT unsigned NOT NULL COMMENT 'Primary Key: Unique batch ID.',
        `token` VARCHAR(64) NOT NULL COMMENT 'A string token generated against the current user’s session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it.',
        `timestamp` INT NOT NULL COMMENT 'A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.',
        `batch` LONGBLOB NULL DEFAULT NULL COMMENT 'A serialized array containing the processing data for the batch.',
        PRIMARY KEY (`bid`),
        INDEX `token` (`token`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Stores details about batches (processes that run in...'
        140613 20:07:20     8 Query     SELECT 1 FROM blocked_ips LIMIT 0, 1
                            8 Query     CREATE TABLE blocked_ips (
        `iid` INT unsigned NOT NULL auto_increment COMMENT 'Primary Key: unique ID for IP addresses.',
        `ip` VARCHAR(40) NOT NULL DEFAULT '' COMMENT 'IP address',
        PRIMARY KEY (`iid`),
        INDEX `blocked_ip` (`ip`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Stores blocked IP addresses.'
                            8 Query     SELECT 1 FROM cache LIMIT 0, 1
                            8 Query     CREATE TABLE cache (
        `cid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
        `data` LONGBLOB NULL DEFAULT NULL COMMENT 'A collection of data to cache.',
        `expire` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
        `created` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry was created.',
        `serialized` SMALLINT NOT NULL DEFAULT 0 COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
        PRIMARY KEY (`cid`),
        INDEX `expire` (`expire`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Generic cache table for caching things not separated out...'
                            8 Query     SELECT 1 FROM cache_bootstrap LIMIT 0, 1
                            8 Query     CREATE TABLE cache_bootstrap (
        `cid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
        `data` LONGBLOB NULL DEFAULT NULL COMMENT 'A collection of data to cache.',
        `expire` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
        `created` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry was created.',
        `serialized` SMALLINT NOT NULL DEFAULT 0 COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
        PRIMARY KEY (`cid`),
        INDEX `expire` (`expire`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Cache table for data required to bootstrap Drupal, may be...'
        140613 20:07:21     8 Query     SELECT 1 FROM cache_form LIMIT 0, 1
                            8 Query     CREATE TABLE cache_form (
        `cid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
        `data` LONGBLOB NULL DEFAULT NULL COMMENT 'A collection of data to cache.',
        `expire` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
        `created` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry was created.',
        `serialized` SMALLINT NOT NULL DEFAULT 0 COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
        PRIMARY KEY (`cid`),
        INDEX `expire` (`expire`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Cache table for the form system to store recently built...'
                            8 Query     SELECT 1 FROM cache_page LIMIT 0, 1
                            8 Query     CREATE TABLE cache_page (
        `cid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
        `data` LONGBLOB NULL DEFAULT NULL COMMENT 'A collection of data to cache.',
        `expire` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
        `created` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry was created.',
        `serialized` SMALLINT NOT NULL DEFAULT 0 COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
        PRIMARY KEY (`cid`),
        INDEX `expire` (`expire`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Cache table used to store compressed pages for anonymous...'
                            8 Query     SELECT 1 FROM cache_menu LIMIT 0, 1
                            8 Query     CREATE TABLE cache_menu (
        `cid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
        `data` LONGBLOB NULL DEFAULT NULL COMMENT 'A collection of data to cache.',
        `expire` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
        `created` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry was created.',
        `serialized` SMALLINT NOT NULL DEFAULT 0 COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
        PRIMARY KEY (`cid`),
        INDEX `expire` (`expire`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Cache table for the menu system to store router...'
                            8 Query     SELECT 1 FROM cache_path LIMIT 0, 1
                            8 Query     CREATE TABLE cache_path (
        `cid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
        `data` LONGBLOB NULL DEFAULT NULL COMMENT 'A collection of data to cache.',
        `expire` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
        `created` INT NOT NULL DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry was created.',
        `serialized` SMALLINT NOT NULL DEFAULT 0 COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
        PRIMARY KEY (`cid`),
        INDEX `expire` (`expire`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Cache table for path alias lookup.'
        140613 20:07:22     8 Query     SELECT 1 FROM date_format_type LIMIT 0, 1
                            8 Query     CREATE TABLE date_format_type (
        `type` VARCHAR(64) NOT NULL COMMENT 'The date format type, e.g. medium.',
        `title` VARCHAR(255) NOT NULL COMMENT 'The human readable name of the format type.',
        `locked` TINYINT NOT NULL DEFAULT 0 COMMENT 'Whether or not this is a system provided format.',
        PRIMARY KEY (`type`),
        INDEX `title` (`title`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Stores configured date format types.'
                            8 Query     SELECT 1 FROM date_formats LIMIT 0, 1
                            8 Query     CREATE TABLE date_formats (
        `dfid` INT unsigned NOT NULL auto_increment COMMENT 'The date format identifier.',
        `format` VARCHAR(100) BINARY NOT NULL COMMENT 'The date format string.',
        `type` VARCHAR(64) NOT NULL COMMENT 'The date format type, e.g. medium.',
        `locked` TINYINT NOT NULL DEFAULT 0 COMMENT 'Whether or not this format can be modified.',
        PRIMARY KEY (`dfid`),
        UNIQUE KEY `formats` (`format`, `type`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Stores configured date formats.'
                            8 Query     SELECT 1 FROM date_format_locale LIMIT 0, 1
                            8 Query     CREATE TABLE date_format_locale (
        `format` VARCHAR(100) NOT NULL COMMENT 'The date format string.',
        `type` VARCHAR(64) NOT NULL COMMENT 'The date format type, e.g. medium.',
        `language` VARCHAR(12) NOT NULL COMMENT 'A languages.language for this format to be used with.',
        PRIMARY KEY (`type`, `language`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Stores configured date formats for each locale.'
                            8 Query     SELECT 1 FROM file_managed LIMIT 0, 1
                            8 Query     CREATE TABLE file_managed (
        `fid` INT unsigned NOT NULL auto_increment COMMENT 'File ID.',
        `uid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The users.uid of the user who is associated with the file.',
        `filename` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Name of the file with no path components. This may differ from the basename of the URI if the file is renamed to avoid overwriting an existing file.',
        `uri` VARCHAR(255) BINARY NOT NULL DEFAULT '' COMMENT 'The URI to access the file (either local or remote).',
        `filemime` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The file’s MIME type.',
        `filesize` BIGINT unsigned NOT NULL DEFAULT 0 COMMENT 'The size of the file in bytes.',
        `status` TINYINT NOT NULL DEFAULT 0 COMMENT 'A field indicating the status of the file. Two status are defined in core: temporary (0) and permanent (1). Temporary files older than DRUPAL_MAXIMUM_TEMP_FILE_AGE will be removed during a cron run.',
        `timestamp` INT unsigned NOT NULL DEFAULT 0 COMMENT 'UNIX timestamp for when the file was added.',
        PRIMARY KEY (`fid`),
        UNIQUE KEY `uri` (`uri`),
        INDEX `uid` (`uid`),
        INDEX `status` (`status`),
        INDEX `timestamp` (`timestamp`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Stores information for uploaded files.'
        140613 20:07:23     8 Query     SELECT 1 FROM file_usage LIMIT 0, 1
                            8 Query     CREATE TABLE file_usage (
        `fid` INT unsigned NOT NULL COMMENT 'File ID.',
        `module` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The name of the module that is using the file.',
        `type` VARCHAR(64) NOT NULL DEFAULT '' COMMENT 'The name of the object type in which the file is used.',
        `id` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The primary key of the object using the file.',
        `count` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The number of times this file is used by this object.',
        PRIMARY KEY (`fid`, `type`, `id`, `module`),
        INDEX `type_id` (`type`, `id`),
        INDEX `fid_count` (`fid`, `count`),
        INDEX `fid_module` (`fid`, `module`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Track where a file is used.'
                            8 Query     SELECT 1 FROM flood LIMIT 0, 1
                            8 Query     CREATE TABLE flood (
        `fid` INT NOT NULL auto_increment COMMENT 'Unique flood event ID.',
        `event` VARCHAR(64) NOT NULL DEFAULT '' COMMENT 'Name of event (e.g. contact).',
        `identifier` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'Identifier of the visitor, such as an IP address or hostname.',
        `timestamp` INT NOT NULL DEFAULT 0 COMMENT 'Timestamp of the event.',
        `expiration` INT NOT NULL DEFAULT 0 COMMENT 'Expiration timestamp. Expired events are purged on cron run.',
        PRIMARY KEY (`fid`),
        INDEX `allow` (`event`, `identifier`, `timestamp`),
        INDEX `purge` (`expiration`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Flood controls the threshold of events, such as the...'
                            8 Query     SELECT 1 FROM menu_router LIMIT 0, 1
                            8 Query     CREATE TABLE menu_router (
        `path` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: the Drupal path this entry describes',
        `load_functions` BLOB NOT NULL COMMENT 'A serialized array of function names (like node_load) to be called to load an object corresponding to a part of the current path.',
        `to_arg_functions` BLOB NOT NULL COMMENT 'A serialized array of function names (like user_uid_optional_to_arg) to be called to replace a part of the router path with another string.',
        `access_callback` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The callback which determines the access to this router path. Defaults to user_access.',
        `access_arguments` BLOB NULL DEFAULT NULL COMMENT 'A serialized array of arguments for the access callback.',
        `page_callback` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The name of the function that renders the page.',
        `page_arguments` BLOB NULL DEFAULT NULL COMMENT 'A serialized array of arguments for the page callback.',
        `delivery_callback` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The name of the function that sends the result of the page_callback function to the browser.',
        `fit` INT NOT NULL DEFAULT 0 COMMENT 'A numeric representation of how specific the path is.',
        `number_parts` SMALLINT NOT NULL DEFAULT 0 COMMENT 'Number of parts in this router path.',
        `context` INT NOT NULL DEFAULT 0 COMMENT 'Only for local tasks (tabs) - the context of a local task to control its placement.',
        `tab_parent` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Only for local tasks (tabs) - the router path of the parent page (which may also be a local task).',
        `tab_root` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Router path of the closest non-tab parent page. For pages that are not local tasks, this will be the same as the path.',
        `title` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The title for the current page, or the title for the tab if this is a local task.',
        `title_callback` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'A function which will alter the title. Defaults to t()',
        `title_arguments` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'A serialized array of arguments for the title callback. If empty, the title will be used as the sole argument for the title callback.',
        `theme_callback` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'A function which returns the name of the theme that will be used to render this page. If left empty, the default theme will be used.',
        `theme_arguments` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'A serialized array of arguments for the theme callback.',
        `type` INT NOT NULL DEFAULT 0 COMMENT 'Numeric representation of the type of the menu item, like MENU_LOCAL_TASK.',
        `description` TEXT NOT NULL COMMENT 'A description of this item.',
        `position` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The position of the block (left or right) on the system administration page for this item.',
        `weight` INT NOT NULL DEFAULT 0 COMMENT 'Weight of the element. Lighter weights are higher up, heavier weights go down.',
        `include_file` MEDIUMTEXT DEFAULT NULL COMMENT 'The file to include for this element, usually the page callback function lives in this file.',
        PRIMARY KEY (`path`),
        INDEX `fit` (`fit`),
        INDEX `tab_parent` (`tab_parent`(64), `weight`, `title`),
        INDEX `tab_root_weight_title` (`tab_root`(64), `weight`, `title`)
        ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Maps paths to various callbacks (access, page and title)'
 
        ==> /var/log/mariadb/mariadb-err.log <==
        140613 20:07:24 [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.11-MariaDB-log
        key_buffer_size=268435456
        read_buffer_size=1048576
        max_used_connections=1
        max_threads=66
        thread_count=1
        It is possible that mysqld could use up to
        key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 601410 K  bytes of memory
        Hope that's ok; if not, decrease some variables in the equation.
 
        Thread pointer: 0x0x7fcf132fa008
        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 = 0x7fcf4a6e4e78 thread_stack 0x100000
        /usr/local/mariadb/bin/mysqld(my_print_stacktrace+0x2e)[0xacb60e]
        /usr/local/mariadb/bin/mysqld(handle_fatal_signal+0x390)[0x6f5a10]
        /lib64/libpthread.so.0(+0xf9f0)[0x7fcf4ff2a9f0]
        /usr/local/mariadb/bin/mysqld[0x915cba]
        /usr/local/mariadb/bin/mysqld[0x909e27]
        /usr/local/mariadb/bin/mysqld[0x90a35b]
        /usr/local/mariadb/bin/mysqld[0x90c759]
        /usr/local/mariadb/bin/mysqld[0x9169d5]
        /usr/local/mariadb/bin/mysqld[0x8aaf2b]
        /usr/local/mariadb/bin/mysqld[0x8ab3cf]
        /usr/local/mariadb/bin/mysqld[0x8ab95a]
        /usr/local/mariadb/bin/mysqld[0x895e80]
        /usr/local/mariadb/bin/mysqld[0x89643f]
        /usr/local/mariadb/bin/mysqld[0x9657da]
        /usr/local/mariadb/bin/mysqld[0x965a16]
        /usr/local/mariadb/bin/mysqld[0x96a51d]
        /usr/local/mariadb/bin/mysqld[0x96ac28]
        /usr/local/mariadb/bin/mysqld[0x82de54]
        /usr/local/mariadb/bin/mysqld(_ZN7handler9ha_createEPKcP5TABLEP14HA_CREATE_INFO+0x70)[0x6fcbf0]
        /usr/local/mariadb/bin/mysqld(_Z15ha_create_tableP3THDPKcS2_S2_P14HA_CREATE_INFOP34st_mysql_const_unsigned_lex_string+0x220)[0x6fd560]
        /usr/local/mariadb/bin/mysqld(_Z16rea_create_tableP3THDP34st_mysql_const_unsigned_lex_stringPKcS4_S4_P14HA_CREATE_INFOP7handlerb+0xbb)[0x659d1b]
        /usr/local/mariadb/bin/mysqld[0x62e50d]
        /usr/local/mariadb/bin/mysqld(_Z26mysql_create_table_no_lockP3THDPKcS2_P14HA_CREATE_INFOP10Alter_infoPbi+0xd3)[0x62ee13]
        /usr/local/mariadb/bin/mysqld(_Z18mysql_create_tableP3THDP10TABLE_LISTP14HA_CREATE_INFOP10Alter_info+0xb6)[0x62ef76]
        /usr/local/mariadb/bin/mysqld(_Z21mysql_execute_commandP3THD+0x672d)[0x5be04d]
        /usr/local/mariadb/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x1d7)[0x5bf4f7]
        /usr/local/mariadb/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x15d7)[0x5c1057]
        /usr/local/mariadb/bin/mysqld(_Z24do_handle_one_connectionP3THD+0x20c)[0x66f0ec]
        /usr/local/mariadb/bin/mysqld(handle_one_connection+0x38)[0x66f138]
        /usr/local/mariadb/bin/mysqld[0x9d5184]
        /lib64/libpthread.so.0(+0x80db)[0x7fcf4ff230db]
        /lib64/libc.so.6(clone+0x6d)[0x7fcf4ebd390d]
 
        Trying to get some variables.
        Some pointers may be invalid and cause the dump to abort.
        Query (0x7fcf1143d020): CREATE TABLE menu_router ( `path` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: the Drupal path this entry describes',  `load_functions` BLOB NOT NULL COMMENT 'A serialized array of function names (like node_load) to be called to load an object corresponding to a part of the current path.',  `to_arg_functions` BLOB NOT NULL COMMENT 'A serialized array of function names (like user_uid_optional_to_arg) to be called to replace a part of the router path with another string.',  `access_callback` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The callback which determines the access to this router path. Defaults to user_access.',  `access_arguments` BLOB NULL DEFAULT NULL COMMENT 'A serialized array of arguments for the access callback.',  `page_callback` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The name of the function that renders the page.',  `page_arguments` BLOB NULL DEFAULT NULL COMMENT 'A serialized array of arguments for the page callback.',  `delivery_callback` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The name of the function that sends the result of the page_callback function to the browser.',  `fit` INT NOT NULL DEFAULT 0 COMMENT 'A numeric representation of how specific the path is.',  `number_parts` SMALLINT NOT NULL DEFAULT 0 COMMENT 'Number of parts in this router path.',  `context` INT NOT NULL DEFAULT 0 COMMENT 'Only for local tasks (tabs) - the context of a local task to control its placement.',  `tab_parent` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Only for local tasks (tabs) - the router path of the parent page (which may also be a local task).',  `tab_root` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Router path of the closest non-tab parent page. For pages that are not local tasks, this will be the same as the path.',  `title` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The title for the current page, or the title for the tab if this is a local task.',  `title_callback` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'A function which will alter the title. Defaults to t()',  `title_arguments` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'A serialized array of arguments for the title callback. If empty, the title will be used as the sole argument for the title callback.',  `theme_callback` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'A function which returns the name of the theme that will be used to render this page. If left empty, the default theme will be used.',  `theme_arguments` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'A serialized array of arguments for the theme callback.',  `type` INT NOT NULL DEFAULT 0 COMMENT 'Numeric representation of the type of the menu item, like MENU_LOCAL_TASK.',  `description` TEXT NOT NULL COMMENT 'A description of this item.',  `position` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'The position of the block (left or right) on the system administration page for this item.',  `weight` INT NOT NULL DEFAULT 0 COMMENT 'Weight of the element. Lighter weights are higher up, heavier weights go down.',  `include_file` MEDIUMTEXT DEFAULT NULL COMMENT 'The file to include for this element, usually the page callback function lives in this file.',  PRIMARY KEY (`path`),  INDEX `fit` (`fit`),  INDEX `tab_parent` (`tab_parent`(64), `weight`, `title`),  INDEX `tab_root_weight_title` (`tab_root`(64), `weight`, `title`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Maps paths to various callbacks (access, page and title)'
        Connection ID (thread ID): 8
        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=off
 
        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.
        140613 20:07:24 mysqld_safe Number of processes running now: 0
        140613 20:07:24 mysqld_safe mysqld restarted
        140613 20:07:24 [Note] InnoDB: Using mutexes to ref count buffer pool pages
        140613 20:07:24 [Note] InnoDB: The InnoDB memory heap is disabled
        140613 20:07:24 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
        140613 20:07:24 [Note] InnoDB: Compressed tables use zlib 1.2.8
        140613 20:07:24 [Note] InnoDB: Using Linux native AIO
        140613 20:07:24 [Note] InnoDB: Not using CPU crc32 instructions
        140613 20:07:24 [Note] InnoDB: Initializing buffer pool, size = 256.0M
        140613 20:07:24 [Note] InnoDB: Completed initialization of buffer pool
        140613 20:07:24 [Note] InnoDB: Highest supported file format is Barracuda.
        140613 20:07:24 [Note] InnoDB: Log scan progressed past the checkpoint lsn 2055375
        140613 20:07:24 [Note] InnoDB: Database was not shutdown normally!
        140613 20:07:24 [Note] InnoDB: Starting crash recovery.
        140613 20:07:24 [Note] InnoDB: Reading tablespace information from the .ibd files...
        140613 20:07:24 [Note] InnoDB: Restoring possible half-written data pages
        140613 20:07:24 [Note] InnoDB: from the doublewrite buffer...
        InnoDB: Doing recovery: scanned up to log sequence number 2245927
        140613 20:07:24 [Note] InnoDB: Starting an apply batch of log records to the database...
        InnoDB: Progress in percent: 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
        InnoDB: Apply batch completed
        InnoDB: Last MySQL binlog file position 0 1345, file name /var/log/mariadb/mariadb-bin.000009
        140613 20:07:25 [Note] InnoDB: 128 rollback segment(s) are active.
        140613 20:07:26 [Note] InnoDB: Waiting for purge to start
        140613 20:07:26 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.17-65.0 started; log sequence number 2245927
 
        ==> /var/log/mariadb/mariadb.log <==
        /usr/local/mariadb/bin/mysqld, Version: 10.0.11-MariaDB-log (Source distribution). started with:
        Tcp port: 3306  Unix socket: /var/cache/mariadb/mariadb.sock
        Time                 Id Command    Argument
 
        ==> /var/log/mariadb/mariadb-err.log <==
        140613 20:07:26 [Note] Recovering after a crash using /var/log/mariadb/mariadb-bin
        140613 20:07:26 [Note] Starting crash recovery...
        140613 20:07:26 [Note] Crash recovery finished.
        140613 20:07:26 [Note] Server socket created on IP: '127.0.0.1'.
        140613 20:07:26 [Note] Event Scheduler: Loaded 0 events
        140613 20:07:26 [Note] /usr/local/mariadb/bin/mysqld: ready for connections.
        Version: '10.0.11-MariaDB-log'  socket: '/var/cache/mariadb/mariadb.sock'  port: 3306  Source distribution

Comment by GrantK [ 2014-06-16 ]

removing drush versions from the issue, repeating the following for clean-installs of Drupal 7.28

mariadb ver         drush ver             `install` result
---------------     -------------------   --------------------
10.0.10, r4140      tag-7.x-5.9             OK
10.0.10, r4140      tag-8.x-6.0-beta1       OK
10.0.10, r4140      tag-8.x-6.0-rc4         OK
10.0.10, r4140      master                  OK
10.0.11, r4209      tag-7.x-5.9             FAIL
10.0.11, r4209      tag-8.x-6.0-beta1       FAIL
10.0.11, r4209      tag-8.x-6.0-rc4         FAIL
10.0.11, r4209      master                  FAIL

Comment by Elena Stepanova [ 2014-06-17 ]

Hi,

This crash is totally different from the one that you posted on the mailing list. Is the previous one reproducible?
Could you please also attach your cnf file(s) and/or SHOW VARIABLES output?
Are there any errors/warnings in the error log before the line about signal 11?
If you are building from source, would it be possible for you to build a debug build?

Thanks.

Comment by GrantK [ 2014-06-17 ]

yes, the results are different, and, confusingly, different over time. too many 'moving parts' I guess, so I'm trying to simplify the use case.

I've switched to today's 10.0.12 release, and have finally managed to get a debug build built (it's picky about config parameters):

mysqld  Ver 10.0.12-MariaDB-debug-log for Linux on x86_64 (Source distribution)

That build is in the midst of a test, just to be sure:

sudo -u mysql perl mysql-test-run.pl

it's taking a looooong time. as soon as that finishes, I'll try to reproduce – or, if suddently lucky, close the bug as solved. either way I'll post here; back in a bit ...

Comment by GrantK [ 2014-06-17 ]

with the new build of

	mysqld -V
		mysqld  Ver 10.0.12-MariaDB-debug-log for Linux on x86_64 (Source distribution)

executing tests

	systemctl stop mariadb-custom
	cd                   /usr/local/mariadb/mysql-test
	sudo -u mysql perl mysql-test-run.pl
		...
		The servers were restarted 786 times
		Spent 9845.804 of 12856 seconds executing testcases
 
		Completed: All 3072 tests were successful.
 
		172 tests were skipped, 120 by the test itself.

all PASS.

starting the server

	systemctl start mariadb-custom
	mysqladmin version
		mysqladmin  Ver 9.1 Distrib 10.0.12-MariaDB, for Linux on x86_64
		Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
 
		Server version          10.0.12-MariaDB-debug-log
		Protocol version        10
		Connection              Localhost via UNIX socket
		UNIX socket             /var/cache/mariadb/mariadb.sock
		Uptime:                 2 min 16 sec
 
		Threads: 1  Questions: 612  Slow queries: 0  Opens: 460  Flush tables: 1  Open tables: 29  Queries per second avg: 4.500

creating a clean DB

	mysqladmin --force drop   dTEST01_db
	mysqladmin         create dTEST01_db

getting 'fresh' drupal sources

	rm -rf ./dev
	cp -af ./drupal-7.28 ./dev

exec'ing the drush install of drupal

	cd ./dev
	drush -vvv site-install standard -y ...
		Initialized Drupal 7.28 root directory at /srv/www/Drupal7/dev                       [notice]
		Executing: mysql --defaults-extra-file=/tmp/drush_mBDg5n --database=dTEST01_db --host=localhost --silent  < /tmp/drush_VJ4azc
		You are about to create a sites/dev/settings.php file and DROP all tables in your 'dTEST01_db' database. Do you want to continue? (y/n): y
		Initialized Drupal site dev at sites/dev                                                                     [notice]
		Executing: mysql --defaults-extra-file=/tmp/drush_6dI1mL --database=dTEST01_db --host=localhost --silent  < /tmp/drush_ZEE6Ez
		Executing: mysql --defaults-extra-file=/tmp/drush_lwQ068 --database=dTEST01_db --host=localhost --silent  < /tmp/drush_FHa0eX
		Undefined offset: 1 site_install.drush.inc:255                                                               [notice]
		Starting Drupal installation. This takes a few seconds ...                                                [ok]
		...
		Installation complete.  User name: admUSR  User password: admPASS            [ok]
		Command dispatch complete                                                                                    [notice]

completes successfully with NO ERRORS in mariadb general/error logs.

repeating

	systemctl stop mariadb-custom
	cd ../
	rm -rf ./dev
	cp -af ./drupal-7.28 ./dev
 
	systemctl start mariadb-custom
	mysqladmin --force drop   dTEST01_db
	mysqladmin         create dTEST01_db
 
	cd ./dev
	drush -vvv site-install standard -y ...

again completes successfully with NO ERRORS in mariadb general/error logs.

So, unlike the 10.0.11 builds, this new v10.0.12 build seems to work on my installs!

I DO see one odd output

mysqlshow
+--------------------+
|     Databases      |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| dTEST01_db         |
| test               |
+--------------------+
Warning: 2048 bytes lost at 0x22137f0, allocated by T@0 at addr2line: 'mysqlshow': No such file
0x44799e, 0x44c66a, 0x43adce, 0x43b215, 0x41d08b, 0x41d781, 0x407691, 0x413438
Warning: 2048 bytes lost at 0x2212f70, allocated by T@0 at 0x44799e, 0x44c66a, 0x43ad92, 0x43b215, 0x41d08b, 0x41d781, 0x407691, 0x413438
Warning:  208 bytes lost at 0x2212e20, allocated by T@0 at 0x44c3a3, 0x43ace4, 0x43b215, 0x41d08b, 0x41d781, 0x407691, 0x413438, 0x4050ff
Warning:  152 bytes lost at 0x22119b0, allocated by T@0 at 0x44dfbd, 0x41d749, 0x407691, 0x413438, 0x4050ff, 0x7fc20cffabe5, 0x404e19
Warning:  472 bytes lost at 0x2211610, allocated by T@0 at 0x44e3c7, 0x44aa5f, 0x44922b, 0x449185, 0x404f4f, 0x7fc20cffabe5, 0x404e19
Memory lost: 4928 bytes in 5 chunks

I've never seen those `Warning` before, or the `Memory lost` ... Is that expected with the debug build?

Comment by GrantK [ 2014-06-17 ]

Well, the build works for install in the case of

-DCMAKE_BUILD_TYPE="Debug"

Unfortunately, simply changing to either

-DCMAKE_BUILD_TYPE="Release"

or

-DCMAKE_BUILD_TYPE="RelWithDebInfo"

still ends up with a no-error build, but that build fails, as reported previously, on the Drupal drush-install ...

trying to figure out why :-/

Comment by GrantK [ 2014-06-17 ]

-DCMAKE_BUILD_TYPE"Release"

if GCC 4.9 is used

CC=/usr/bin/gcc-4.9
CXX=/usr/bin/g++-4.9
ln -sf /usr/bin/g++-4.9 /usr/bin/g++
ln -sf /usr/bin/gcc-4.9 /usr/bin/gcc

the MariaDB 10.0.12 build is OK, no error, but using it for the Drupal drush-install, here, fails, as above.

OTOH, if GCC 4.8 is used

CC=/usr/bin/gcc-4.8
CXX=/usr/bin/g++-4.8
ln -sf /usr/bin/g++-4.8 /usr/bin/g++
ln -sf /usr/bin/gcc-4.8 /usr/bin/gcc

the MariaDB 10.0.12 build is also OK, still no error, but, now, using it for the Drupal drush-install, SUCCEEDS – no error.

Comment by GrantK [ 2014-06-17 ]

pointed out by "showaz" in irc,

"Operational Notification – Changes in gcc Code Optimization Can Cause a Crash in BIND"
https://kb.isc.org/article/AA-01167

using GCC 4.9, building MariaDB build type = "Release", and ADDING

-DCMAKE_C_FLAGS="-fno-delete-null-pointer-checks"
-DCMAKE_CXX_FLAGS="-fno-delete-null-pointer-checks"

appears to fix the issue – build completes without error, AND the bin execs – for the Drupal drush-install as above, without error

Comment by Elena Stepanova [ 2014-06-18 ]

Apparently, one can get crashes in various places; e.g I have one on 10.1 tree with gcc 4.9, RelWithDebInfo build, while executing main.ctype_utf8:

gnal handler called>
#3  0x000000000091b708 in btr_cur_ins_lock_and_undo (inherit=<optimized out>, mtr=<optimized out>, thr=<optimized out>, entry=<optimized out>, cursor=<optimized out>, flags=<optimized out>) at 10.1/storage/xtradb/btr/btr0cur.cc:1275
#4  btr_cur_optimistic_insert (flags=1, cursor=0x7fddef6aba50, offsets=0x0, heap=0x7fddddf95ee8, entry=0x7fdde6e8df68, rec=0x0, big_rec=0x7fddef6aba38, n_ext=0, thr=0x0, mtr=0x7fddef6abad0) at 10.1/storage/xtradb/btr/btr0cur.cc:1510
#5  0x00000000008b6ade in row_merge_insert_index_tuples (trx_id=1, index=0x7fddddf95ee8, old_table=0x0, old_table@entry=0x7fddddf94868, fd=-570859800, block=0x7fdde6e8df68 "", block@entry=0x7fddeccff000 "\003\003") at 10.1/storage/xtradb/row/row0merge.cc:2408
#6  0x00000000008b9770 in row_merge_build_indexes (trx=0x7fddddefc068, old_table=0x7fddddf94868, new_table=0x7fddddf95268, online=true, indexes=0x7fdde6e8d298, key_numbers=0x7fdde6e8d2a8, n_indexes=2, table=0x7fddddec2008, add_cols=0x0, col_map=0x7fdde6e8d2e8, add_autoinc=18446744073709551615, sequence=...) at 10.1/storage/xtradb/row/row0merge.cc:3632
#7  0x000000000083d955 in ha_innobase::inplace_alter_table (this=0x7fddddff8020, altered_table=0x7fddddec2008, ha_alter_info=0x7fddef6ac250) at 10.1/storage/xtradb/handler/handler0alter.cc:4045
#8  0x0000000000617d8f in ha_inplace_alter_table (ha_alter_info=<optimized out>, altered_table=<optimized out>, this=<optimized out>) at 10.1/sql/handler.h:3546
#9  mysql_inplace_alter_table (target_mdl_request=<optimized out>, alter_ctx=<optimized out>, inplace_supported=<optimized out>, ha_alter_info=<optimized out>, altered_table=<optimized out>, table=<optimized out>, table_list=<optimized out>, thd=<optimized out>) at 10.1/sql/sql_table.cc:7009
#10 mysql_alter_table (thd=0x7fdde6e81008, new_db=0x7fddef6ac250 "\320\332j\357\335\177", new_name=0x7fddddec2008 "\230)\354\335\335\177", create_info=0x7fddddec7108, table_list=0x7fddddec7108, alter_info=0x7fdde9ff9f08, order_num=0, order=0x0, ignore=false) at 10.1/sql/sql_table.cc:8785
#11 0x0000000000653c89 in Sql_cmd_alter_table::execute (this=0x1, thd=0x7fdde6e81008) at 10.1/sql/sql_alter.cc:312
#12 0x000000000059d445 in mysql_execute_command (thd=0x7fdde6e81008) at 10.1/sql/sql_parse.cc:5080
#13 0x00000000005a4198 in mysql_parse (thd=0x7fdde6e81008, rawbuf=<optimized out>, length=28, parser_state=0x7fddef6af6b0) at 10.1/sql/sql_parse.cc:6409
#14 0x00000000005a5c9b in dispatch_command (command=<optimized out>, thd=0x7fdde6e81008, packet=<optimized out>, packet_length=<optimized out>) at 10.1/sql/sql_parse.cc:1309
#15 0x00000000005a6713 in do_command (thd=<optimized out>) at 10.1/sql/sql_parse.cc:1006
#16 0x0000000000651394 in do_handle_one_connection (thd_arg=thd_arg@entry=0x7fdde6e81008) at 10.1/sql/sql_connect.cc:1379
#17 0x00000000006513d8 in handle_one_connection (arg=arg@entry=0x7fdde6e81008) at 10.1/sql/sql_connect.cc:1293
#18 0x0000000000819554 in pfs_spawn_thread (arg=0x7fdded833208) at 10.1/storage/perfschema/pfs.cc:1860
#19 0x00007fddeed66182 in start_thread (arg=0x7fddef6b0700) at pthread_create.c:312
#20 0x00007fddee48230d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Not reproducible on an identical build using 4.8.

Comment by Elena Stepanova [ 2014-06-22 ]

See also MDEV-6202

Comment by Sergei Golubchik [ 2014-07-06 ]

It seems that gcc 4.9.1 has fixed it. Feel free to reopen this bug report if the issue reappears.

Comment by GrantK [ 2014-07-06 ]

gcc 4.9.1 is neither released, nor shipping with any distribution; GCC 4.9.0 is.

is the decision, then, to simply ignore builds of RELEASE MariaDB being broken with RELEASE GCC, and kick the ball down the road to GCC 4.9.1, whenever it's released?

How, exactly, do we RE-OPEN this?

Comment by Sergei Golubchik [ 2014-07-06 ]

I've reopened it.

But 4.9.0 is pretty much the bleeding edge, most distributions don't ship it (and, as you can see, they have good reasons not to). On the other hand, 4.9.1 is already in Mageia Cauldron (which is in the development stage and won't be declared stable anytime soon).

I will try to see if we can change something in MariaDB to avoid this gcc bug. But given that it is a gcc bug, apparently, and all that I wrote above, this won't be a hight priority bug, sorry.

Comment by GrantK [ 2014-07-06 ]

Can you provide a reference to the specific GCC bug that you suggest is fixed?

In apparent reference to

"Operational Notification – Changes in gcc Code Optimization Can Cause a Crash in BIND"
https://kb.isc.org/article/AA-01167

as pointed out by showaz in bind's #irc, the bind dev team posted a GCC bug here,

"GCC 4.9 generates incorrect object code"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61236,

for which a workaround is the similar

-fno-delete-null-pointer-checks

@ GCC, that bug has been resolved as INVALID by the GCC team, and, as a result, the bind team committed fixes to their repository branches to address the crash and work around the optimization issue.

In that bug report, it's glibc that's called into question, not gcc.

Noting as posted above here, in the mariadb backtrace,

...
/lib64/libpthread.so.0(+0x80db)[0x7fcf4ff230db]
/lib64/libc.so.6(clone+0x6d)[0x7fcf4ebd390d]

So, is it in fact GCC, as you've ascribed, or glibc/other, that's invovled with the MariaDB crashes?

Comment by Sergei Golubchik [ 2014-07-30 ]

jplindst, please take a look at the following patch:

=== modified file 'storage/innobase/include/lock0lock.h'
--- storage/innobase/include/lock0lock.h        2014-05-07 15:32:23 +0000
+++ storage/innobase/include/lock0lock.h        2014-07-30 19:36:42 +0000
@@ -277,31 +277,31 @@
 UNIV_INTERN
 dberr_t
 lock_rec_insert_check_and_lock(
 /*===========================*/
        ulint           flags,  /*!< in: if BTR_NO_LOCKING_FLAG bit is
                                set, does nothing */
        const rec_t*    rec,    /*!< in: record after which to insert */
        buf_block_t*    block,  /*!< in/out: buffer block of rec */
        dict_index_t*   index,  /*!< in: index */
        que_thr_t*      thr,    /*!< in: query thread */
        mtr_t*          mtr,    /*!< in/out: mini-transaction */
        ibool*          inherit)/*!< out: set to TRUE if the new
                                inserted record maybe should inherit
                                LOCK_GAP type locks from the successor
                                record */
-       __attribute__((nonnull, warn_unused_result));
+       __attribute__((nonnull(2,3,4,6,7), warn_unused_result));
 /*********************************************************************//**

(the same for xtradb, of course).

Here's why: old declaration promises that thr can never be NULL, and gcc-4.9.0 trusts that and optimizes accordingly. But in fact, the function starts from

lock_rec_insert_check_and_lock(
/*===========================*/
        ...
	ibool*		inherit)
{
        ...
	if (flags & BTR_NO_LOCKING_FLAG) {
		return(DB_SUCCESS);
	}
 
	trx = thr_get_trx(thr);

so when BTR_NO_LOCKING_FLAG is set, thr can be NULL (and it is NULL in this stack trace: btr_insert_on_non_leaf_level_func → btr_cur_optimistic_insert → btr_cur_ins_lock_and_undo → lock_rec_insert_check_and_lock). The patch fixes this by removing nonnull attribute for thr. Another solution would be to move the check for BTR_NO_LOCKING_FLAG out of the function and keep the nonnull attribute.

Comment by Jan Lindström (Inactive) [ 2014-07-31 ]

Patch is corret, I just do not follow why bother to call this function at all if BTR_NO_LOCKING_FLAG is set. Removing the call(s) could need deeper fix.

Generated at Thu Feb 08 07:11:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.