Bug #81411 | Assertion `n_linear_rings > 0' failed. in Gis_polygon::centroid_xy | ||
---|---|---|---|
Submitted: | 13 May 2016 4:18 | Modified: | 16 Nov 2017 7:46 |
Reporter: | Roel Van de Paar | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: GIS | Severity: | S6 (Debug Builds) |
Version: | 5.5.49 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[13 May 2016 4:18]
Roel Van de Paar
[13 May 2016 6:59]
MySQL Verification Team
Hello Roel, Thank you for the report and test case. Observed that 5.5.49(also, 5.5.51 daily build) debug build is affected. Thanks, Umesh
[13 May 2016 6:59]
MySQL Verification Team
-- 5.5.49 - rm -rf 81407 scripts/mysql_install_db --basedir=/export/umesh/server/binaries/mysql-advanced-5.5.49 --datadir=/export/umesh/server/binaries/mysql-advanced-5.5.49/81407 bin/mysqld-debug --basedir=/export/umesh/server/binaries/mysql-advanced-5.5.49 --datadir=/export/umesh/server/binaries/mysql-advanced-5.5.49/81407 --core-file --socket=/tmp/mysql_ushastry.sock --port=15000 --log-error=/export/umesh/server/binaries/mysql-advanced-5.5.49/81407/log.err 2>&1 & -- only debug build affected (gdb) bt #0 0x00007f3b599c2771 in pthread_kill () from /lib64/libpthread.so.0 #1 0x00000000007ee286 in my_write_core (sig=6) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/mysys/stacktrace.c:433 #2 0x00000000006a61fc in handle_fatal_signal (sig=6) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/signal_handler.cc:247 #3 <signal handler called> #4 0x00007f3b58ae55d7 in raise () from /lib64/libc.so.6 #5 0x00007f3b58ae6cc8 in abort () from /lib64/libc.so.6 #6 0x00007f3b58ade546 in __assert_fail_base () from /lib64/libc.so.6 #7 0x00007f3b58ade5f2 in __assert_fail () from /lib64/libc.so.6 #8 0x000000000079a0ee in Gis_polygon::centroid_xy (this=0x7f3b54086c20, x=0x7f3b54086bd8, y=0x7f3b54086bd0) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/spatial.cc:959 #9 0x000000000079c68d in Gis_polygon::centroid (this=0x1ce6, result=0x7f3b54086ff0) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/spatial.cc:1017 #10 0x0000000000706353 in Item_func_centroid::val_str (this=0x7f3b3c0054d0, str=0x7f3b54086ff0) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/item_geofunc.cc:243 #11 0x00000000006b349c in Item::send (this=0x7f3b3c0054d0, protocol=0x3630f98, buffer=0x7f3b54086ff0) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/item.cc:5997 #12 0x0000000000515102 in Protocol::send_result_set_row (this=0x3630f98, row_items=<optimized out>) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/protocol.cc:847 #13 0x000000000055eecb in select_send::send_data (this=0x7f3b3c005658, items=...) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/sql_class.cc:2240 #14 0x00000000005d113f in JOIN::exec (this=0x7f3b3c007c10) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/sql_select.cc:1892 #15 0x00000000005d37dd in mysql_select (thd=0x3630af0, rref_pointer_array=0x3632d50, tables=0x0, wild_num=0, fields=..., conds=<optimized out>, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f3b3c005658, unit=0x3632548, select_lex=0x3632b68) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/sql_select.cc:2619 #16 0x00000000005d3d17 in handle_select (thd=0x3630af0, lex=0x3632498, result=0x7f3b3c005658, setup_tables_done_option=0) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/sql_select.cc:297 #17 0x000000000058ae74 in execute_sqlcom_select (thd=0x3630af0, all_tables=0x0) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/sql_parse.cc:4625 #18 0x000000000058ea84 in mysql_execute_command (thd=0x3630af0) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/sql_parse.cc:2176 #19 0x0000000000593d2d in mysql_parse (thd=0x3630af0, rawbuf=0x7f3b3c004bd0 "SELECT Centroid(AsBinary(LineString(Point(0,0),Point(0,0),Point(0,0))))", length=<optimized out>, parser_state=0x7f3b54088c20) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/sql_parse.cc:5780 #20 0x000000000059532e in dispatch_command (command=COM_QUERY, thd=0x3630af0, packet=0x36b5f21 "", packet_length=71) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/sql_parse.cc:1038 #21 0x0000000000596a64 in do_command (thd=0x3630af0) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/sql_parse.cc:773 #22 0x000000000063d4a6 in do_handle_one_connection (thd_arg=<optimized out>) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/sql_connect.cc:862 #23 0x000000000063d56f in handle_one_connection (arg=<optimized out>) at /pb2/build/sb_0-18115917-1456812692.68/mysqlcom-pro-5.5.49/sql/sql_connect.cc:781 #24 0x00007f3b599bddf5 in start_thread () from /lib64/libpthread.so.0 #25 0x00007f3b58ba660d in clone () from /lib64/libc.so.6 (gdb)
[13 May 2016 6:59]
MySQL Verification Team
// 5.5.51 rm -rf 81407 scripts/mysql_install_db --basedir=/export/umesh/server/binaries/mysql-5.5.51 --datadir=/export/umesh/server/binaries/mysql-5.5.51/81407 bin/mysqld-debug --basedir=/export/umesh/server/binaries/mysql-5.5.51 --datadir=/export/umesh/server/binaries/mysql-5.5.51/81407 --core-file --socket=/tmp/mysql_ushastry.sock --port=15000 --log-error=/export/umesh/server/binaries/mysql-5.5.51/81407/log.err 2>&1 & [umshastr@hod03]/export/umesh/server/binaries/mysql-5.5.51: cat docs/INFO_SRC commit: d91f1d4e32777af0da498818c8098d45c6f64bac date: 2016-05-04 14:06:45 +0530 build-date: 2016-05-04 23:46:27 +0200 short: d91f1d4 branch: mysql-5.5 MySQL source 5.5.51 -- only debug build affected Missing separate debuginfos, use: debuginfo-install glibc-2.17-78.0.1.el7.x86_64 libaio-0.3.109-12.el7.x86_64 libgcc-4.8.3-9.el7.x86_64 nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64 (gdb) bt #0 0x00007f9368f92771 in pthread_kill () from /lib64/libpthread.so.0 #1 0x00000000007ee726 in my_write_core (sig=6) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/mysys/stacktrace.c:433 #2 0x00000000006a62dc in handle_fatal_signal (sig=6) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/signal_handler.cc:247 #3 <signal handler called> #4 0x00007f93680b55d7 in raise () from /lib64/libc.so.6 #5 0x00007f93680b6cc8 in abort () from /lib64/libc.so.6 #6 0x00007f93680ae546 in __assert_fail_base () from /lib64/libc.so.6 #7 0x00007f93680ae5f2 in __assert_fail () from /lib64/libc.so.6 #8 0x000000000079a51e in Gis_polygon::centroid_xy (this=0x7f9364057c20, x=0x7f9364057bd8, y=0x7f9364057bd0) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/spatial.cc:959 #9 0x000000000079cabd in Gis_polygon::centroid (this=0x1d4b, result=0x7f9364057ff0) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/spatial.cc:1017 #10 0x0000000000706425 in Item_func_centroid::val_str (this=0x7f934c0054d0, str=0x7f9364057ff0) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/item_geofunc.cc:243 #11 0x00000000006b358c in Item::send (this=0x7f934c0054d0, protocol=0x23cbf68, buffer=0x7f9364057ff0) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/item.cc:5998 #12 0x0000000000515122 in Protocol::send_result_set_row (this=0x23cbf68, row_items=<optimized out>) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/protocol.cc:847 #13 0x000000000055ef4b in select_send::send_data (this=0x7f934c005658, items=...) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/sql_class.cc:2240 #14 0x00000000005d11ef in JOIN::exec (this=0x7f934c007c10) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/sql_select.cc:1892 #15 0x00000000005d388d in mysql_select (thd=0x23cbac0, rref_pointer_array=0x23cdd20, tables=0x0, wild_num=0, fields=..., conds=<optimized out>, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f934c005658, unit=0x23cd518, select_lex=0x23cdb38) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/sql_select.cc:2619 #16 0x00000000005d3dc7 in handle_select (thd=0x23cbac0, lex=0x23cd468, result=0x7f934c005658, setup_tables_done_option=0) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/sql_select.cc:297 #17 0x000000000058af24 in execute_sqlcom_select (thd=0x23cbac0, all_tables=0x0) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/sql_parse.cc:4625 #18 0x000000000058eb34 in mysql_execute_command (thd=0x23cbac0) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/sql_parse.cc:2176 #19 0x0000000000593ddd in mysql_parse (thd=0x23cbac0, rawbuf=0x7f934c004bd0 "SELECT Centroid(AsBinary(LineString(Point(0,0),Point(0,0),Point(0,0))))", length=<optimized out>, parser_state=0x7f9364059c20) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/sql_parse.cc:5780 #20 0x00000000005953de in dispatch_command (command=COM_QUERY, thd=0x23cbac0, packet=0x2450e31 "", packet_length=71) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/sql_parse.cc:1038 #21 0x0000000000596b14 in do_command (thd=0x23cbac0) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/sql_parse.cc:773 #22 0x000000000063d556 in do_handle_one_connection (thd_arg=<optimized out>) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/sql_connect.cc:862 #23 0x000000000063d61f in handle_one_connection (arg=<optimized out>) at /pb2/build/sb_0-18781984-1462399238.49/mysql-5.5.51/sql/sql_connect.cc:781 #24 0x00007f9368f8ddf5 in start_thread () from /lib64/libpthread.so.0 #25 0x00007f936817660d in clone () from /lib64/libc.so.6 (gdb)
[13 May 2016 6:59]
MySQL Verification Team
// 5.6.30/5.7.12 - release/debug not affected
[15 Nov 2017 17:59]
Erlend Dahl
Not reproducible on recent 5.7/8.0.
[15 Nov 2017 18:00]
Erlend Dahl
There are no plans to backport the fix - the GIS code has been completely rewritten in 5.7/8.0.
[16 Nov 2017 7:45]
Roel Van de Paar
If an issue can be repeated on an older release but not a newer one, it would be great if we can avoid the status "can't repeat". Ideally; 1) A developer would check whether the bug is actually fixed rather then using a test case verification only 2) Testcase of closed bugs are added to MTR to ensure that future regressions are seen more easily Even if the ideal of #1 cannot be done, #2 could still be implemented.
[16 Nov 2017 7:46]
Roel Van de Paar
Please ignore the last comment, not applicable for this bug.