Bug #86471 Assertion `! no_data(nbytes)' failed in void Geometry::wkb_parser::skip_unsafe
Submitted: 26 May 2017 9:27 Modified: 26 May 2017 12:31
Reporter: Ramesh Sivaraman Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.7.18 OS:Ubuntu (Xenial)
Assigned to: CPU Architecture:Any
Tags: debug

[26 May 2017 9:27] Ramesh Sivaraman
Description:
GDB info
{code}
#0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
#1  0x000000000195d505 in my_write_core (sig=6) at /ssd/ramesh/workdir/mysql-server_dbg/mysys/stacktrace.c:249
#2  0x0000000000efeb01 in handle_fatal_signal (sig=6) at /ssd/ramesh/workdir/mysql-server_dbg/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x00007f06c11d8428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#5  0x00007f06c11da02a in __GI_abort () at abort.c:89
#6  0x00007f06c11d0bd7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x2041273 "!no_data(nbytes)", file=file@entry=0x2041240 "/ssd/ramesh/workdir/mysql-server_dbg/sql/spatial.h", line=line@entry=490, function=function@entry=0x20437c0 <Geometry::wkb_parser::skip_unsafe(unsigned long)::__PRETTY_FUNCTION__> "void Geometry::wkb_parser::skip_unsafe(size_t)") at assert.c:92
#7  0x00007f06c11d0c82 in __GI___assert_fail (assertion=0x2041273 "!no_data(nbytes)", file=0x2041240 "/ssd/ramesh/workdir/mysql-server_dbg/sql/spatial.h", line=490, function=0x20437c0 <Geometry::wkb_parser::skip_unsafe(unsigned long)::__PRETTY_FUNCTION__> "void Geometry::wkb_parser::skip_unsafe(size_t)") at assert.c:101
#8  0x00000000015535a2 in Geometry::wkb_parser::skip_unsafe (this=0x7f06c371eb40, nbytes=16) at /ssd/ramesh/workdir/mysql-server_dbg/sql/spatial.h:490
#9  0x0000000001551204 in Gis_geometry_collection::get_data_size (this=0x7f06c371ecd0) at /ssd/ramesh/workdir/mysql-server_dbg/sql/spatial.cc:3401
#10 0x0000000001548cc6 in Geometry::construct (buffer=0x7f06c371ecd0, data=0x7f0684db2ad0 "", data_len=24, has_srid=true) at /ssd/ramesh/workdir/mysql-server_dbg/sql/spatial.cc:412
#11 0x0000000001048203 in Geometry::construct (buffer=0x7f06c371ecd0, str=0x7f0684db2a40, has_srid=true) at /ssd/ramesh/workdir/mysql-server_dbg/sql/spatial.h:654
#12 0x0000000001040f43 in Item_func_spatial_decomp::val_str (this=0x7f0684db2e78, str=0x7f06c371ee40) at /ssd/ramesh/workdir/mysql-server_dbg/sql/item_geofunc.cc:3194
#13 0x0000000000fb0dfd in Item::evaluate (this=0x7f0684db2e78, thd=0x7f0684c12000, buffer=0x7f06c371ee40) at /ssd/ramesh/workdir/mysql-server_dbg/sql/item.cc:7624
#14 0x00000000018311b4 in Query_result_do::send_data (this=0x7f0684db2fd0, items=...) at /ssd/ramesh/workdir/mysql-server_dbg/sql/sql_do.cc:61
#15 0x00000000015aa2fc in JOIN::exec (this=0x7f0684db30e0) at /ssd/ramesh/workdir/mysql-server_dbg/sql/sql_executor.cc:158
#16 0x000000000164ccec in handle_query (thd=0x7f0684c12000, lex=0x7f0684c142f8, result=0x7f0684db2fd0, added_options=0, removed_options=0) at /ssd/ramesh/workdir/mysql-server_dbg/sql/sql_select.cc:184
#17 0x0000000001831094 in mysql_do (thd=0x7f0684c12000, lex=0x7f0684c142f8) at /ssd/ramesh/workdir/mysql-server_dbg/sql/sql_do.cc:44
#18 0x00000000015f610b in mysql_execute_command (thd=0x7f0684c12000, first_level=true) at /ssd/ramesh/workdir/mysql-server_dbg/sql/sql_parse.cc:2820
#19 0x00000000015fe0a5 in mysql_parse (thd=0x7f0684c12000, parser_state=0x7f06c3720510) at /ssd/ramesh/workdir/mysql-server_dbg/sql/sql_parse.cc:5612
#20 0x00000000015f2cf1 in dispatch_command (thd=0x7f0684c12000, com_data=0x7f06c3720dc0, command=COM_QUERY) at /ssd/ramesh/workdir/mysql-server_dbg/sql/sql_parse.cc:1461
#21 0x00000000015f1b3e in do_command (thd=0x7f0684c12000) at /ssd/ramesh/workdir/mysql-server_dbg/sql/sql_parse.cc:999
#22 0x0000000001734543 in handle_connection (arg=0x7f06987fb560) at /ssd/ramesh/workdir/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:300
#23 0x0000000001db496b in pfs_spawn_thread (arg=0x7f06a9bdbf20) at /ssd/ramesh/workdir/mysql-server_dbg/storage/perfschema/pfs.cc:2188
#24 0x00007f06c1e1b6ba in start_thread (arg=0x7f06c3721700) at pthread_create.c:333
#25 0x00007f06c12a982d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

{code}

How to repeat:
Testcase

DROP DATABASE test;
DO ST_EXTERIORRING(x'000000000107000000010000000101000000000000000000');
[26 May 2017 9:30] Ramesh Sivaraman
Adding OS version
[26 May 2017 12:31] MySQL Verification Team
Thank you for the bug report, verified as described. Server version 8.0 not affected for this bug.