Bug #79392 handle_fatal_signal (sig=11) in ha_myisammrg::detach_children

Submitted: 24 Nov 2015 6:16 Modified: 13 Oct 2025 15:11
Reporter: Roel Van de Paar Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:5.7.9 GA OS:Any
Assigned to: CPU Architecture:Any

[24 Nov 2015 6:16] Roel Van de Paar
Description:
2015-11-24T05:54:43.616549Z 0 [Note] /sda/MS-mysql-5.7.9-linux-x86_64-debug/bin/mysqld: ready for connections.
Version: '5.7.9-debug'  socket: '/sda/MS-mysql-5.7.9-linux-x86_64-debug/socket.sock'  port: 15079  MySQL Community Server (GPL)
05:54:59 UTC - mysqld got signal 11 ;

+bt
#0  0x00007f43585e9771 in __pthread_kill (threadid=<optimized out>, signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x0000000001796a78 in my_write_core (sig=11) at /git/mysql-server_dbg/mysys/stacktrace.c:247
#2  0x0000000000e1dc70 in handle_fatal_signal (sig=11) at /git/mysql-server_dbg/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x0000000001c697bf in ha_myisammrg::detach_children (this=0x7f428d8a9430) at /git/mysql-server_dbg/storage/myisammrg/ha_myisammrg.cc:996
#5  0x0000000001c6a8ef in ha_myisammrg::extra (this=0x7f428d8a9430, operation=HA_EXTRA_DETACH_CHILDREN) at /git/mysql-server_dbg/storage/myisammrg/ha_myisammrg.cc:1370
#6  0x0000000001406266 in mark_tmp_table_for_reuse (table=0x7f428d93dc20) at /git/mysql-server_dbg/sql/sql_base.cc:1363
#7  0x0000000001406198 in mark_temp_tables_as_free_for_reuse (thd=0x7f428d819000) at /git/mysql-server_dbg/sql/sql_base.cc:1339
#8  0x0000000001406812 in close_thread_tables (thd=0x7f428d819000) at /git/mysql-server_dbg/sql/sql_base.cc:1608
#9  0x0000000001492d63 in mysql_execute_command (thd=0x7f428d819000, first_level=true) at /git/mysql-server_dbg/sql/sql_parse.cc:4809
#10 0x0000000001494305 in mysql_parse (thd=0x7f428d819000, parser_state=0x7f4358be2670) at /git/mysql-server_dbg/sql/sql_parse.cc:5357
#11 0x0000000001489caa in dispatch_command (thd=0x7f428d819000, com_data=0x7f4358be2dc0, command=COM_QUERY) at /git/mysql-server_dbg/sql/sql_parse.cc:1284
#12 0x0000000001488b76 in do_command (thd=0x7f428d819000) at /git/mysql-server_dbg/sql/sql_parse.cc:852
#13 0x00000000015b2cdb in handle_connection (arg=0x7f4295bff240) at /git/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:295
#14 0x00000000017c3aa0 in pfs_spawn_thread (arg=0x7f42a6be7820) at /git/mysql-server_dbg/storage/perfschema/pfs.cc:2192
#15 0x00007f43585e4df5 in start_thread (arg=0x7f4358be3700) at pthread_create.c:308
#16 0x00007f43572ae1ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

How to repeat:
DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TEMPORARY TABLE t1(a INT)ENGINE=MyISAM;
CREATE TEMPORARY TABLE t2(i INT)ENGINE=MERGE UNION=(t1) INSERT_METHOD=LAST;
DESCRIBE t2;
[24 Nov 2015 8:29] MySQL Verification Team
Hello Roel,

Thank you for the report and test case.
Observed that 5.7.9 debug build is affected.

Thanks,
Umesh
[24 Nov 2015 8:30] MySQL Verification Team
// 5.7.9
rm -rf 79392
bin/mysql_install_db --insecure --basedir=/export/umesh/server/binaries/mysql-5.7.9 --datadir=/export/umesh/server/binaries/mysql-5.7.9/79392 -v
bin/mysqld-debug --no-defaults --basedir=/export/umesh/server/binaries/mysql-5.7.9 --datadir=/export/umesh/server/binaries/mysql-5.7.9/79392 --core-file --socket=/tmp/mysql_ushastry.sock  --port=15000 --log-error=/export/umesh/server/binaries/mysql-5.7.9/79392/log.err 2>&1 &

[umshastr@hod03]/export/umesh/server/binaries/mysql-5.7.9: bin/mysqld-debug --no-defaults --basedir=/export/umesh/server/binaries/mysql-5.7.9 --datadir=/export/umesh/server/binaries/mysql-5.7.9/79392 --core-file --socket=/tmp/mysql_ushastry.sock  --port=15000 --log-error=/export/umesh/server/binaries/mysql-5.7.9/79392/log.err 2>&1 &
[1] 21246
[umshastr@hod03]/export/umesh/server/binaries/mysql-5.7.9: bin/mysql  -uroot -S /tmp/mysql_ushastry.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.9-debug MySQL Community Server - Debug (GPL)

Copyright (c) 2000, 2015, 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> DROP DATABASE test;CREATE DATABASE test;USE test;
ERROR 1008 (HY000): Can't drop database 'test'; database doesn't exist
Query OK, 1 row affected (0.00 sec)

Database changed
mysql> CREATE TEMPORARY TABLE t1(a INT)ENGINE=MyISAM;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TEMPORARY TABLE t2(i INT)ENGINE=MERGE UNION=(t1) INSERT_METHOD=LAST;
Query OK, 0 rows affected (0.00 sec)

mysql> DESCRIBE t2;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> \q
Bye
[1]+  Segmentation fault      (core dumped) bin/mysqld-debug --no-defaults --basedir=/export/umesh/server/binaries/mysql-5.7.9 --datadir=/export/umesh/server/binaries/mysql-5.7.9/79392 --core-file --socket=/tmp/mysql_ushastry.sock --port=15000 --log-error=/export/umesh/server/binaries/mysql-5.7.9/79392/log.err 2>&1

(gdb) bt
#0  0x00007fd8de550771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000001803885 in my_write_core (sig=11) at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/mysys/stacktrace.c:247
#2  0x0000000000e45850 in handle_fatal_signal (sig=11) at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x0000000001ccf38b in ha_myisammrg::detach_children (this=0x7fd86401b970) at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/storage/myisammrg/ha_myisammrg.cc:996
#5  0x0000000001cd03b5 in ha_myisammrg::extra (this=0x7fd86401b970, operation=HA_EXTRA_DETACH_CHILDREN)
    at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/storage/myisammrg/ha_myisammrg.cc:1370
#6  0x000000000145e38c in mark_tmp_table_for_reuse (table=0x7fd86401a400) at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/sql/sql_base.cc:1363
#7  0x000000000145e2b9 in mark_temp_tables_as_free_for_reuse (thd=0x7fd864000b70) at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/sql/sql_base.cc:1339
#8  0x000000000145e93f in close_thread_tables (thd=0x7fd864000b70) at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/sql/sql_base.cc:1608
#9  0x00000000014ee913 in mysql_execute_command (thd=0x7fd864000b70, first_level=true) at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/sql/sql_parse.cc:4809
#10 0x00000000014efd25 in mysql_parse (thd=0x7fd864000b70, parser_state=0x7fd8b0f446a0) at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/sql/sql_parse.cc:5357
#11 0x00000000014e4930 in dispatch_command (thd=0x7fd864000b70, com_data=0x7fd8b0f44e10, command=COM_QUERY)
    at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/sql/sql_parse.cc:1284
#12 0x00000000014e37ea in do_command (thd=0x7fd864000b70) at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/sql/sql_parse.cc:852
#13 0x0000000001613d77 in handle_connection (arg=0x3485120) at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/sql/conn_handler/connection_handler_per_thread.cc:295
#14 0x000000000188fd80 in pfs_spawn_thread (arg=0x3e97c70) at /export/home/pb2/build/sb_0-16729453-1444633651.02/mysql-5.7.9/storage/perfschema/pfs.cc:2192
#15 0x00007fd8de54bdf5 in start_thread () from /lib64/libpthread.so.0
#16 0x00007fd8dd21760d in clone () from /lib64/libc.so.6
(gdb)
[24 Nov 2015 8:30] MySQL Verification Team
// 5.6.27 debug/release not affected
[13 Oct 2025 15:11] Georgi Kodinov
Posted by developer:
 
5.7 is obsolete. I couldn't reproduce on the latest trunk. Please re-open with concrete steps to reproduce on a supported version:

[gkodinov@compile-el9-02 mysql-test]$ ../runtime_output_directory/mysql -S ../x.sock -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 9.6.0 Source distribution

Copyright (c) 2000, 2025, Oracle and/or its affiliates.

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> select version();
+-----------+
| version() |
+-----------+
| 9.6.0     |
+-----------+
1 row in set (0.000 sec)

mysql> DROP DATABASE test;CREATE DATABASE test;USE test;
ERROR 1008 (HY000): Can't drop database 'test'; database doesn't exist
Query OK, 1 row affected (0.005 sec)

Database changed
mysql> CREATE TEMPORARY TABLE t1(a INT)ENGINE=MyISAM;
Query OK, 0 rows affected (0.000 sec)

mysql> CREATE TEMPORARY TABLE t2(i INT)ENGINE=MERGE UNION=(t1) INSERT_METHOD=LAST;
Query OK, 0 rows affected (0.000 sec)

mysql> DESCRIBE t2;
+-------+------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------+------+-----+---------+-------+
| i     | int  | YES  |     | NULL    | NULL  |
+-------+------+------+-----+---------+-------+
1 row in set (0.001 sec)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.100 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.