Bug #107483 Test innodb_gis.rtree_split_geographic fails
Submitted: 3 Jun 2022 10:16 Modified: 3 Jun 2022 11:32
Reporter: Luis Donoso Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:8.0.29 OS:Any
Assigned to: CPU Architecture:Any
Tags: gis

[3 Jun 2022 10:16] Luis Donoso
Description:
The test `innodb_gis.rtree_split_geographic` has started failing in version 8.0.29:

```
mysqld: /home/ldonoso/src/download_dir/boost_1_77_0/boost/geometry/util/normalize_spheroidal_coordinates.hpp:311: static void boost::geometry::math::detail::normalize_spheroidal_coordinates<boost::geometry::radian, double, true>::apply(CoordinateType &, CoordinateType &, bool) [Units = boost::geometry::radian, CoordinateType = double, IsEquatorial = true]: Assertion `math::smaller(constants::min_longitude(), longitude)' failed.
10:06:37 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7f33f1e0b000
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f3410bfc388 thread_stack 0x100000
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x42) [0x6338862]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(print_fatal_signal(int)+0x206) [0x51c49b6]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(handle_fatal_signal+0x73) [0x51c4be3]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420) [0x7f3428b80420]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb) [0x7f342615b00b]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b) [0x7f342613a859]
/lib/x86_64-linux-gnu/libc.so.6(+0x22729) [0x7f342613a729]
/lib/x86_64-linux-gnu/libc.so.6(+0x33fd6) [0x7f342614bfd6]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(boost::geometry::math::detail::normalize_spheroidal_coordinates<boost::geometry::radian, double, true>::apply(double&, double&, bool)+0xc5) [0x521df55]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(boost::geometry::math::detail::normalize_spheroidal_box_coordinates<boost::geometry::radian, double, true>::apply(double&, double&, double&, double&, bool)+0x34) [0x52274d4]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(boost::geometry::math::detail::normalize_spheroidal_box_coordinates<boost::geometry::radian, double, true>::apply(double&, double&, double&, double&)+0x48) [0x5227438]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(void boost::geometry::math::normalize_spheroidal_box_coordinates<boost::geometry::radian, double>(double&, double&, double&, double&)+0x2d) [0x54ac3cd]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(auto boost::geometry::strategy::area::geographic_box<boost::geometry::srs::spheroid<double>, void>::apply<gis::Geographic_box>(gis::Geographic_box const&) const+0x73) [0x54abee3]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(boost::geometry::coordinate_type<gis::Geographic_box>::type boost::geometry::detail::area::box_area::apply<gis::Geographic_box, boost::geometry::strategies::geographic<boost::geometry::strategy::andoyer, boost::geometry::srs::spheroid<double>, void> >(gis::Geographic_box const&, boost::geometry::strategies::geographic<boost::geometry::strategy::andoyer, boost::geometry::srs::spheroid<double>, void> const&)+0x40) [0x54abe10]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(boost::geometry::area_result<gis::Geographic_box, boost::geometry::strategies::geographic<boost::geometry::strategy::andoyer, boost::geometry::srs::spheroid<double>, void> >::type boost::geometry::resolve_strategy::area<boost::geometry::strategies::geographic<boost::geometry::strategy::andoyer, boost::geometry::srs::spheroid<double>, void>, true>::apply<gis::Geographic_box>(gis::Geographic_box const&, boost::geometry::strategies::geographic<bo/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(boost::geometry::area_result<gis::Geographic_box, boost::geometry::strategies::geographic<boost::geometry::strategy::andoyer, boost::geometry::srs::spheroid<double>, void> >::type boost::geometry::resolve_dynamic::area<gis::Geographic_box, boost::geometry::box_tag>::apply<boost::geometry::strategies::geographic<boost::geometry::strategy::andoyer, boost::geometry::srs::spheroid<double>, void> >(gis::Geographic_box const&, boost::geometry::strat/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(boost::geometry::area_result<gis::Geographic_box, boost::geometry::strategies::geographic<boost::geometry::strategy::andoyer, boost::geometry::srs::spheroid<double>, void> >::type boost::geometry::area<gis::Geographic_box, boost::geometry::strategies::geographic<boost::geometry::strategy::andoyer, boost::geometry::srs::spheroid<double>, void> >(gis::Geographic_box const&, boost::geometry::strategies::geographic<boost::geometry::strategy::andoy/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(rtree_area_overlapping(dd::Spatial_reference_system const*, unsigned char const*, unsigned char const*, int)+0x767) [0x54ab2c7]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(rtr_estimate_n_rows_in_range(dict_index_t*, dtuple_t const*, page_cur_mode_t)+0x690) [0x65d3400]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(ha_innobase::records_in_range(unsigned int, key_range*, key_range*)+0x6f4) [0x63b58d4]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(handler::multi_range_read_info_const(unsigned int, RANGE_SEQ_IF*, void*, unsigned int, unsigned int*, unsigned int*, Cost_estimate*)+0x517) [0x48ca6a7]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(DsMrr_impl::dsmrr_info_const(unsigned int, RANGE_SEQ_IF*, void*, unsigned int, unsigned int*, unsigned int*, Cost_estimate*)+0x79) [0x48ccfb9]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(ha_innobase::multi_range_read_info_const(unsigned int, RANGE_SEQ_IF*, void*, unsigned int, unsigned int*, unsigned int*, Cost_estimate*)+0x8b) [0x63bd65b]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(check_quick_select(THD*, RANGE_OPT_PARAM*, unsigned int, bool, SEL_ROOT*, bool, enum_order, bool, unsigned int*, unsigned int*, Cost_estimate*, bool*, bool*)+0x44e) [0x4c202de]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(get_key_scans_params(THD*, RANGE_OPT_PARAM*, SEL_TREE*, bool, bool, enum_order, bool, double, Bitmap<64u>*)+0x3b5) [0x4c223e5]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(test_quick_select(THD*, MEM_ROOT*, MEM_ROOT*, Bitmap<64u>, unsigned long, unsigned long, unsigned long long, bool, enum_order, TABLE*, bool, Item*, Bitmap<64u>*, bool, Query_block*, AccessPath**)+0x1316) [0x4c11bf6]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld() [0x4ea8415]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(JOIN::estimate_rowcount()+0x527) [0x4ea5dc7]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(JOIN::make_join_plan()+0x48d) [0x4e9277d]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(JOIN::optimize(bool)+0x1d37) [0x4e8e377]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(Query_block::optimize(THD*, bool)+0x1ab) [0x4fdbf5b]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(Query_expression::optimize(THD*, TABLE*, bool, bool)+0x260) [0x50a8c60]
/home/ldonoso/src/mysql-8.0-bld/runtime_output_directory/mysqld(Sql_cmd_dml::execute_inner(THD*)+0x3f) [0x4fd951f]
...
```

How to repeat:
./mtr --force --parallel=8 --repeat=1 --max-test-fail=1 --retry-failure=1 innodb_gis.rtree_split_geographic 

Suggested fix:
The problem might be due to the new Boost version used in 8.0.29.
[3 Jun 2022 11:13] MySQL Verification Team
Hello Luis,

Thank you for the report and feedback.
Verified as described.

regards,
Umesh
[3 Jun 2022 11:14] MySQL Verification Team
8.0.29 mtr test results

Attachment: 107483.results (application/octet-stream, text), 104.65 KiB.

[3 Jun 2022 11:32] Luis Donoso
Thank you for looking into this. It seems the issue has been fixed in boost 1.79.0:

https://github.com/boostorg/geometry/commit/36a4275d39edd0c17d509ae8d036fc5c86804be4
[3 Jun 2022 12:30] Luis Donoso
Patch the boost library to use the header of Boost 1.79.0.

Attachment: fix.diff (text/x-patch), 14.94 KiB.