handle_fatal_signal (sig=11) in filesort | sql/filesort.cc:208

Bug #1384595 reported by Ramesh Sivaraman on 2014-10-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Invalid
Undecided
Unassigned
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
High
Unassigned
5.7
Invalid
Undecided
Unassigned

Bug Description

** GDB info

#0 0x00007f1e0bc43771 in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000ab7586 in my_write_core (sig=11) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/mysys/stacktrace.c:422
#2 0x000000000072f9ff in handle_fatal_signal (sig=11) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/signal_handler.cc:236
#3 <signal handler called>
#4 0x0000000000936796 in filesort (thd=0x2ce65b0, table=0x7f1db09c9d20, filesort=0x7f1dec46b4c0, sort_positions=true, examined_rows=0x7f1dec46bb38, found_rows=0x7f1dec46bb30) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/filesort.cc:208
#5 0x00000000009accfe in mysql_delete (thd=0x2ce65b0, table_list=0x7f1db09b5ea8, conds=0x7f1db09b6788, order_list=0x2ce93d8, limit=18446744073709551615, options=0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_delete.cc:303
#6 0x00000000007e58c6 in mysql_execute_command (thd=0x2ce65b0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:3977
#7 0x00000000007ed193 in mysql_parse (thd=0x2ce65b0, rawbuf=0x7f1db09b5d90 "DELETE FROM t2 WHERE c1 IN(-2,0) ORDER BY c1 DESC", length=49, parser_state=0x7f1dec46ce30) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:6773
#8 0x00000000007df5fc in dispatch_command (command=COM_QUERY, thd=0x2ce65b0, packet=0x34e3491 "DELETE FROM t2 WHERE c1 IN(-2,0) ORDER BY c1 DESC;", packet_length=50) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:1432
#9 0x00000000007de528 in do_command (thd=0x2ce65b0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:1049
#10 0x00000000007a64e5 in do_handle_one_connection (thd_arg=0x2ce65b0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_connect.cc:1532
#11 0x00000000007a5fed in handle_one_connection (arg=0x2ce65b0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_connect.cc:1443
#12 0x0000000000dc5bac in pfs_spawn_thread (arg=0x3456d40) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/storage/perfschema/pfs.cc:1860
#13 0x00007f1e0bc3edf3 in start_thread () from /lib64/libpthread.so.0
#14 0x00007f1e0a90801d in clone () from /lib64/libc.so.6

*** Crashing query

DELETE FROM t2 WHERE c1 IN(-2,0) ORDER BY c1 DESC

tags: added: qa
Ramesh Sivaraman (rameshvs02) wrote :

Core, GDB, error log etc

There was no master (single threaded, single mysqld run)

Ramesh Sivaraman (rameshvs02) wrote :

s/There was no master (single threaded, single mysqld run)/Single threaded run, single mysqld involved/

description: updated
Ramesh Sivaraman (rameshvs02) wrote :

This is an upstream bug : http://bugs.mysql.com/bug.php?id=74579

tags: added: upstream
Ramesh Sivaraman (rameshvs02) wrote :

****** Testcase

create table t1(pk1 int key,b bit,key(b)) ENGINE=INNODB;
CREATE TABLE t2(a int,b2 char,FULLTEXT KEY b2 (b2));
EXPLAIN EXTENDED SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY(SELECT a FROM t2 WHERE b=12);
UPDATE t2 SET a=1 ORDER BY a;

Download full text (5.1 KiB)

I do not see a crash on 5.1.73 or 5.5 (no fulltext keys there for InnoDB, so no wonder...), but on 5.6 it's easy to reproduce:

[openxs@chief p5.6]$ bin/mysql --no-defaults -uroot test
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.21-69.0 MySQL Community Server (GPL)

Copyright (c) 2009-2014 Percona LLC and/or its affiliates
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create table t1(pk1 int key,b bit,key(b)) ENGINE=INNODB;
Query OK, 0 rows affected (0.30 sec)

mysql> CREATE TABLE t2(a int,b2 char,FULLTEXT KEY b2 (b2));
Query OK, 0 rows affected (1.55 sec)

mysql> EXPLAIN EXTENDED SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY(SELECT a FROM t2 WHERE b=12);
+----+--------------------+------------+-------+---------------+------+---------+------+------+----------+---------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+--------------------+------------+-------+---------------+------+---------+------+------+----------+---------------------------------+
| 1 | PRIMARY | t1 | index | NULL | b | 2 | NULL | 1 | 100.00 | Using index |
| 2 | UNION | t1 | index | NULL | b | 2 | NULL | 1 | 100.00 | Using index |
| 3 | DEPENDENT SUBQUERY | t2 | ALL | NULL | NULL | NULL | NULL | 1 | 100.00 | Using where |
| NULL | UNION RESULT | <union1,2> | ALL | NULL | NULL | NULL | NULL | NULL | NULL | Using temporary; Using filesort |
+----+--------------------+------------+-------+---------------+------+---------+------+------+----------+---------------------------------+
4 rows in set, 2 warnings (0.00 sec)

mysql> UPDATE t2 SET a=1 ORDER BY a;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> 141027 11:16:39 mysqld_safe Number of processes running now: 0
141027 11:16:39 mysqld_safe mysqld restarted

mysql> exit
Bye
[openxs@chief p5.6]$ tail -120 data/chief.err
...

2014-10-27 11:16:22 3023 [Note] /home/openxs/dbs/p5.6/bin/mysqld: ready for connections.
Version: '5.6.21-69.0' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL)
pure virtual method called
terminate called without an active exception
09:16:38 UTC - mysqld got signal 6 ;
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.
Please help us make Percona Server better by reporting any
bugs at ht...

Read more...

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-833

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.