Comment 0 for bug 487568

Revision history for this message
merikonjatta (merikonjatta-bots) wrote :

MySQL crashes when it attempts to write-lock a table partitioned by Spider.

MySQL version: 5.1.39 (from source)
Spider version: Spider 2.8 for 5.1.39

Spider table:
mysql> SHOW CREATE TABLE `table_one`\G
CREATE TABLE `table_one` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=SPIDER DEFAULT CHARSET=utf8 CONNECTION='database "mtest", table "table_one", user "user", password ""'
/*!50100 PARTITION BY LINEAR HASH (id)
(PARTITION pt1 COMMENT = 'host "remotenode1"' ENGINE = SPIDER,
 PARTITION pt2 COMMENT = 'host "remotenode2"' ENGINE = SPIDER,
 PARTITION pt3 COMMENT = 'host "remotenode3"' ENGINE = SPIDER) */

Remote InnoDB partition tables:
mysql> SHOW CREATE TABLE `table_one`\G
CREATE TABLE `table_one` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

Now I try to lock the local table and MySQL crashes:
mysql> LOCK TABLES `table_one` WRITE;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> 091124 21:37:19 mysqld_safe Number of processes running now: 0
091124 21:37:19 mysqld_safe mysqld restarted
091124 21:37:20 mysqld_safe mysqld from pid file /usr/local/mysql/data/localnode.pid ended

Here is an excerpt from the MySQL error log:
091124 21:37:19 - 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.
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.

thd: 0x8ef6be0
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 = 0x8c9c5398 thread_stack 0x30000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x22) [0x84f8922]
/usr/local/mysql/bin/mysqld(handle_segfault+0x3d9) [0x8216c79]
[0xb7fe5400]
/usr/local/mysql/lib/mysql/plugin/ha_spider.so(ha_spider::external_lock(THD*, int)+0x28c) [0xb4b9640c]
/usr/local/mysql/bin/mysqld(handler::ha_external_lock(THD*, int)+0x28) [0x830bd18]
/usr/local/mysql/bin/mysqld(ha_partition::external_lock(THD*, int)+0x94) [0x8315094]
/usr/local/mysql/bin/mysqld(handler::ha_external_lock(THD*, int)+0x28) [0x830bd18]
/usr/local/mysql/bin/mysqld(mysql_lock_tables(THD*, st_table**, unsigned int, unsigned int, bool*)+0x229) [0x820f509]
/usr/local/mysql/bin/mysqld(lock_tables(THD*, TABLE_LIST*, unsigned int, bool*)+0x470) [0x8262540]
/usr/local/mysql/bin/mysqld(open_and_lock_tables_derived(THD*, TABLE_LIST*, bool)+0x5d) [0x826903d]
/usr/local/mysql/bin/mysqld(mysql_execute_command(THD*)+0x1181) [0x8228731]
/usr/local/mysql/bin/mysqld(mysql_parse(THD*, char const*, unsigned int, char const**)+0x340) [0x822f530]
/usr/local/mysql/bin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x1112) [0x8230652]
/usr/local/mysql/bin/mysqld(do_command(THD*)+0xdf) [0x82311ef]
/usr/local/mysql/bin/mysqld(handle_one_connection+0x253) [0x8221123]
/lib/tls/i686/cmov/libpthread.so.0 [0xb7fcc4ff]
/lib/tls/i686/cmov/libc.so.6(clone+0x5e) [0xb7dd349e]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x9c76640 = LOCK TABLES `table_one` WRITE
thd->thread_id=2
thd->killed=NOT_KILLED
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.
091124 21:37:19 mysqld_safe Number of processes running now: 0
091124 21:37:19 mysqld_safe mysqld restarted