handle_fatal_signal (sig=11) in MYSQLparse

Bug #1736845 reported by Roel Van de Paar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Triaged
High
Unassigned
5.6
Triaged
Medium
Unassigned
5.7
Triaged
Medium
Unassigned

Bug Description

Core was generated by `/sda/PS091117-percona-server-5.5.58-38.10-linux-x86_64-debug/bin/mysqld --no-de'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f91e6d899b1 in __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
    at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61 val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0 0x00007f91e6d899b1 in __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
    at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x00000000007f9bc8 in my_write_core (sig=11) at /home/roel/PS-5.5.58_dbg/mysys/stacktrace.c:433
#2 0x00000000006b9803 in handle_fatal_signal (sig=11) at /home/roel/PS-5.5.58_dbg/sql/signal_handler.cc:250
#3 <signal handler called>
#4 0x00000000006838a5 in MYSQLparse (YYTHD=0x7f91d7fd6000) at /home/roel/PS-5.5.58_dbg/sql/sql_yacc.yy:8750
#5 0x000000000059e904 in parse_sql (thd=thd@entry=0x7f91d7fd6000, parser_state=parser_state@entry=0x7f91e737d520,
    creation_ctx=creation_ctx@entry=0x0) at /home/roel/PS-5.5.58_dbg/sql/sql_parse.cc:7904
#6 0x000000000059ebcc in mysql_parse (thd=thd@entry=0x7f91d7fd6000, rawbuf=<optimized out>, length=116,
    parser_state=parser_state@entry=0x7f91e737d520) at /home/roel/PS-5.5.58_dbg/sql/sql_parse.cc:6068
#7 0x00000000005a0721 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f91d7fd6000,
    packet=packet@entry=0x7f91d7f8d001 "SELECT AsText(ST_INTERSECTION(LinestringFromText('LINESTRING(1 1, 2 2)'), GeometryFromText('LINESTRING(3 3, 4 4)')))", packet_length=packet_length@entry=116) at /home/roel/PS-5.5.58_dbg/sql/sql_parse.cc:1112
#8 0x00000000005a256f in do_command (thd=0x7f91d7fd6000) at /home/roel/PS-5.5.58_dbg/sql/sql_parse.cc:792
#9 0x0000000000651406 in do_handle_one_connection (thd_arg=thd_arg@entry=0x7f91d7fd6000)
    at /home/roel/PS-5.5.58_dbg/sql/sql_connect.cc:1474
#10 0x00000000006514fc in handle_one_connection (arg=0x7f91d7fd6000) at /home/roel/PS-5.5.58_dbg/sql/sql_connect.cc:1381
#11 0x00007f91e6d84e25 in start_thread (arg=0x7f91e737e700) at pthread_create.c:308
#12 0x00007f91e558234d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Testcase:
SOURCE testcase.sql # attached

Issue does not reproduce on MS 5.5.58

Tags: qa qablock
Revision history for this message
Roel Van de Paar (roel11) wrote :
tags: added: qa
Revision history for this message
Roel Van de Paar (roel11) wrote :

5.6 and 5.7 give different outputs yet again (looks buggy) but do not crash

Revision history for this message
Roel Van de Paar (roel11) wrote :

============ 5.7 output
5.7.20>source /sda/303200/9311/default.node.tld_thread-0.sql_out_out
Query OK, 0 rows affected (0.00 sec)

ERROR 1300 (HY000): Invalid utf8 character string: '\x83\\x83\\x83\'
Query OK, 0 rows affected (0.10 sec)

ERROR 1146 (42S02): Table 'test.t' doesn't exist
Query OK, 1 row affected (0.01 sec)

Query OK, 1 row affected (0.00 sec)
Records: 1 Duplicates: 0 Warnings: 0

+---------------------------------------------------------------------------------------------------------------+
| AsText(ST_INTERSECTION(LinestringFromText('LINESTRING(1 1, 2 2)'), GeometryFromText('LINESTRING(3 3, 4 4)'))) |
+---------------------------------------------------------------------------------------------------------------+
| GEOMETRYCOLLECTION() |
+---------------------------------------------------------------------------------------------------------------+
1 row in set, 3 warnings (0.01 sec)

ERROR:
No query specified

Revision history for this message
Roel Van de Paar (roel11) wrote :

============ 5.6 output
5.6.36>source /sda/303200/9311/default.node.tld_thread-0.sql_out_out
Query OK, 0 rows affected (0.00 sec)

ERROR:
Unknown command '\�'.
ERROR:
Unknown command '\�'.
ERROR:
Unknown command '\`'.
ERROR 1300 (HY000): Invalid utf8 character string: '\x83\\x83\\x83\'
ERROR 1050 (42S01): Table 't1' already exists
ERROR 1146 (42S02): Table 'test.t' doesn't exist
Query OK, 1 row affected (0.01 sec)

ERROR 1050 (42S01): Table 'tmp' already exists
+---------------------------------------------------------------------------------------------------------------+
| AsText(ST_INTERSECTION(LinestringFromText('LINESTRING(1 1, 2 2)'), GeometryFromText('LINESTRING(3 3, 4 4)'))) |
+---------------------------------------------------------------------------------------------------------------+
| NULL |
+---------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

ERROR:
No query specified

Revision history for this message
Roel Van de Paar (roel11) wrote :

Not a real blocker, but adding qablock as this was seen a fair bit in the runs. Likely a new regression.

tags: added: qablock
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

By 5.6 and 5.7 you mean PS or MS?

Does the testcase give any Valgrind/ASan errors on MS/PS 5.5-5.7?

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

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

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

Other bug subscribers

Bug attachments

Remote bug watches

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