[MDEV-25095] innodb_gis test failure: Result length mismatch Created: 2021-03-09  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: GIS, Tests
Affects Version/s: 10.3.28, 10.4.18, 10.5.9
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Minor
Reporter: Thomas Deutschmann Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Portage 3.0.13 (python 3.8.7-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.31-r7, 5.11.0-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.11.0-gentoo-x86_64-x86_64-AMD_Ryzen_Threadripper_3970X_32-Core_Processor-with-glibc2.2.5
KiB Mem: 8139664 total, 5398792 free
KiB Swap: 8388604 total, 7719120 free
Timestamp of repository gentoo: Tue, 09 Mar 2021 12:45:01 +0000
Head commit of repository gentoo: a914eee87a6ee7261e8dea16131f9c9cb324a808
sh bash 5.0_p18
ld GNU ld (Gentoo 2.35.1 p2) 2.35.1
ccache version 4.1 [enabled]
app-shells/bash: 5.0_p18::gentoo
dev-lang/perl: 5.30.3::gentoo
dev-lang/python: 3.8.7-r1::gentoo, 3.9.1-r1::gentoo
dev-util/ccache: 4.1::gentoo
dev-util/cmake: 3.18.5::gentoo
sys-apps/baselayout: 2.7::gentoo
sys-apps/openrc: 0.42.1-r1::gentoo
sys-apps/sandbox: 2.20::gentoo
sys-devel/autoconf: 2.69-r5::gentoo
sys-devel/automake: 1.16.2-r1::gentoo
sys-devel/binutils: 2.35.1-r1::gentoo
sys-devel/gcc: 9.3.0-r2::gentoo, 10.2.0-r5::gentoo
sys-devel/gcc-config: 2.3.3::gentoo
sys-devel/libtool: 2.4.6-r6::gentoo
sys-devel/make: 4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc: 2.31-r7::gentoo



 Description   

innodb_gis.gis 'innodb'                  w15 [ fail ]
        Test ended at 2021-03-09 15:07:11
 
CURRENT_TEST: innodb_gis.gis
--- /var/tmp/portage/dev-db/mariadb-10.5.9-r1/work/mysql/mysql-test/suite/innodb_gis/r/gis.result       2021-02-19 09:41:02.000000000 -0000
+++ /var/tmp/portage/dev-db/mariadb-10.5.9-r1/work/mysql/mysql-test/suite/innodb_gis/r/gis.reject       2021-03-09 15:07:10.991808819 -0000
@@ -652,7 +652,7 @@
 select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from
 t1 where object_id=85998;
 object_id      ST_geometrytype(geo)    ST_ISSIMPLE(GEO)        ST_ASTEXT(ST_centroid(geo))
-85998  MULTIPOLYGON    1       POINT(115.2970604672862 -36.23335610879993)
+85998  MULTIPOLYGON    1       POINT(115.29706047613605 -36.23335610879993)
 select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from
 t1 where object_id=85984;
 object_id      ST_geometrytype(geo)    ST_ISSIMPLE(GEO)        ST_ASTEXT(ST_centroid(geo))
 
mysqltest: Result length mismatch
 
innodb_gis.1 'innodb'                    w18 [ fail ]
        Test ended at 2021-03-09 15:25:59
 
CURRENT_TEST: innodb_gis.1
--- /var/tmp/portage/dev-db/mariadb-10.5.9-r1/work/mysql/mysql-test/suite/innodb_gis/r/1.result 2021-02-19 09:41:02.000000000 -0000
+++ /var/tmp/portage/dev-db/mariadb-10.5.9-r1/work/mysql/mysql-test/suite/innodb_gis/r/1.reject 2021-03-09 15:25:58.927007139 -0000
@@ -652,7 +652,7 @@
 select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from
 t1 where object_id=85998;
 object_id      ST_geometrytype(geo)    ST_ISSIMPLE(GEO)        ST_ASTEXT(ST_centroid(geo))
-85998  MULTIPOLYGON    1       POINT(115.2970604672862 -36.23335610879993)
+85998  MULTIPOLYGON    1       POINT(115.29706047613605 -36.23335610879993)
 select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from
 t1 where object_id=85984;
 object_id      ST_geometrytype(geo)    ST_ISSIMPLE(GEO)        ST_ASTEXT(ST_centroid(geo))
 
mysqltest: Result length mismatch

I am very sure that these tests passed last week when I pushed updated mariadb ebuilds for Gentoo.



 Comments   
Comment by Marko Mäkelä [ 2021-03-09 ]

Floating point differences can be somewhat of a mystery. Did something change in the compiler or in the compilation options?

I suppose that in this case we could try to apply some rounding in the query or tweak the test case in some other way (see MDEV-20531). Because you have access to the environment where this can be reproduced, it would be easier if you could also submit a patch for the test case.

Comment by Thomas Deutschmann [ 2021-03-10 ]

No, nothing suspicious in toolchain changed.

I was able to restore state from 2021-02-23 when I added the new versions to Gentoo and where tests passed:
They are passed. Then I went back to today's state and they are now also passing...

So I would appreciate if we could make these tests more stable by adding rounding if possible.

Comment by Sergei Golubchik [ 2021-04-14 ]

I'd expect results to be stable. string↔double conversion is stable. math depends on the toolchain, compiler version, set of optimizations enabled. If none of that has changed, results should really be stable.

Comment by Thomas Deutschmann [ 2021-11-14 ]

With mariadb-10.6.5, main.gis test is failing on AMD processors, too:

$ ./mtr main.gis
Logging: /var/tmp/portage/dev-db/mariadb-10.6.5/work/mysql/mysql-test/mariadb-test-run.pl  main.gis
VS config:
vardir: /var/tmp/portage/dev-db/mariadb-10.6.5/work/mariadb-10.6.5_build/mysql-test/var
Removing old var directory...
Creating var directory '/var/tmp/portage/dev-db/mariadb-10.6.5/work/mariadb-10.6.5_build/mysql-test/var'...
Checking supported features...
MariaDB Version 10.6.5-MariaDB
 - SSL connections supported
Collecting tests...
Installing system database...
 
==============================================================================
 
TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------
 
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
main.gis                                 [ fail ]
        Test ended at 2021-11-14 19:57:50
 
CURRENT_TEST: main.gis
--- /var/tmp/portage/dev-db/mariadb-10.6.5/work/mysql/mysql-test/main/gis.result        2021-11-05 21:03:29.000000000 +0100
+++ /var/tmp/portage/dev-db/mariadb-10.6.5/work/mysql/mysql-test/main/gis.reject        2021-11-14 19:57:50.083430318 +0100
@@ -680,7 +680,7 @@
 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
 t1 where object_id=85998;
 object_id      geometrytype(geo)       ISSIMPLE(GEO)   ASTEXT(centroid(geo))
-85998  MULTIPOLYGON    1       POINT(115.2970604672862 -36.23335610879993)
+85998  MULTIPOLYGON    1       POINT(115.29706047613605 -36.23335610879993)
 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
 t1 where object_id=85984;
 object_id      geometrytype(geo)       ISSIMPLE(GEO)   ASTEXT(centroid(geo))
 
mysqltest: Result length mismatch

Generated at Thu Feb 08 09:35:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.