handle_fatal_signal (sig=11) in prepare_inplace_alter_table_dict | handler/handler0alter.cc:2772

Description

GDB info

Environment

None

Smart Checklist

Activity

Show:

Ramesh Sivaraman April 3, 2017 at 6:42 AM
Edited

Able to reproduce the issue with Upstream 5.6 version. Logged upstream issue : https://github.com/codership/mysql-wsrep/issues/307

Krunal Bauskar April 3, 2017 at 5:56 AM

As quoted above by Kenn the issue is due to sharing of path by 2 independent node. Not a recommended practice of running PXC.
You can still reproduce it with galera/codership-5.6 and if found you can log the issue .. quoting that u are starting 2 nodes on same machine.

KennT April 3, 2017 at 1:31 AM

Reproed this on 5.6:

Node A:
mysql> CREATE TABLE t1 (id INT, purchased DATE) PARTITION BY RANGE(YEAR(purchased)) SUBPARTITION BY HASH(TO_DAYS(purchased)) SUBPARTITIONS 2 (PARTITION p0 VALUES LESS THAN MAXVALUE (SUBPARTITION sp0 DATA DIRECTORY = '/tmp/not-existing' INDEX DIRECTORY = '/tmp/not-existing', SUBPARTITION sp1));
Query OK, 0 rows affected, 1 warning (0.02 sec)

Node B: (note, the CREATE TABLE from above will fail to replicate since these nodes are writing to the same location)
mysql> create table t1 (id int primary key, purchased date);
Query OK, 0 rows affected (0.01 sec)

mysql> alter table t1 add column(b int);
Query OK, 0 rows affected (0.05 sec)
Records: 0 Duplicates: 0 Warnings: 0

RESULT: We hit the assert on Node A.

KennT April 1, 2017 at 9:14 AM

I see errors in this log corresponding to this table path "/tmp/not-existing/t1#P#p0#SP#sp0",
I see errors in node1.err and node2.err, using the same tmpdir for different instances, this will cause problems.

node2.domain.tld_thread-0.sql:CREATE TABLE t1 (id INT, purchased DATE) PARTITION BY RANGE(YEAR(purchased)) SUBPARTITION BY HASH(TO_DAYS(purchased)) SUBPARTITIONS 2 (PARTITION p0 VALUES LESS THAN MAXVALUE (SUBPARTITION sp0 DATA DIRECTORY = '/tmp/not-existing' INDEX DIRECTORY = '/tmp/not-existing', SUBPARTITION sp1));#ERROR: 1813 - Tablespace for table '"test"."t1" /* Partition "p0", Subpartition "sp0" */' exists. Please DISCARD the tablespace before IMPORT.

KennT March 31, 2017 at 12:15 AM

The error occurs here, the user_table->data_dir_path is 0x0, so the mem_heap_strdup() aborts.

handler0alter.cc, line 2770:

if (DICT_TF_HAS_DATA_DIR(flags)) {
ctx->new_table->data_dir_path =
mem_heap_strdup(ctx->new_table->heap,
user_table->data_dir_path);
}

Done

Details

Assignee

Reporter

Affects versions

Priority

Smart Checklist

Created March 29, 2017 at 1:08 PM
Updated January 17, 2020 at 3:47 PM
Resolved April 3, 2017 at 6:43 AM