[MDEV-25252] main.type_float fails in new buildbot Created: 2021-03-25  Updated: 2023-09-19

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 10.2

Type: Bug Priority: Major
Reporter: Michael Widenius Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Failure on: amd64-ubuntu-2004-icc. Could this be an Intel compiler issue?

main.type_float                          w12 [ fail ]
        Test ended at 2021-03-24 20:09:05
CURRENT_TEST: main.type_float
--- /buildbot/amd64-ubuntu-2004-icc/build/mysql-test/main/type_float.result	2021-03-24 16:56:51.000000000 +0000
+++ /buildbot/amd64-ubuntu-2004-icc/build/mysql-test/main/type_float.reject	2021-03-24 20:09:05.787315142 +0000
@@ -264,7 +264,7 @@
 drop table t1,t2,t3;
 select 1e-308, 1.00000001e-300, 100000000e-300;
 1e-308	1.00000001e-300	100000000e-300
-1e-308	1.00000001e-300	1e-292
+0	1.00000001e-300	1e-292
 select 10e307;
 10e307

Should be fixed ASAP as this causes a problem for protected branches

TODO: Compile MariaDB with ICC compiler and single step trough the reading and printing of
select 1e-308; to find out what is wrong. Could be a compiler flag related to double precision.



 Comments   
Comment by Daniel Black [ 2021-03-27 ]

Failed to reproduce on intel clang compiler:

2021.1.2 clang compiler

$ mysql-test/mtr  --mem main.type_float
Logging: /home/dan/repos/mariadb-server-10.2/mysql-test/mysql-test-run.pl  --mem main.type_float
vardir: /home/dan/repos/build-mariadb-server-10.2-intelonapi/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/home/dan/repos/build-mariadb-server-10.2-intelonapi/mysql-test/var'...
 - symlinking 'var' to '/dev/shm/var_auto_nYO4'
Checking supported features...
MariaDB Version 10.2.38-MariaDB
 - SSL connections supported
 - binaries built with wsrep patch
Collecting tests...
Installing system database...
 
==============================================================================
 
TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------
 
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
main.type_float                          [ pass ]    104
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 0.104 of 5 seconds executing testcases
 
Completed: All 1 tests were successful.
 
 
~/repos/build-mariadb-server-10.2-intelonapi 
$ grep CMAKE_C CMakeCache.txt 
//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel
CMAKE_CXX_COMPILER:STRING=/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang++
CMAKE_CXX_COMPILER_AR:FILEPATH=/opt/intel/oneapi/compiler/2021.1.2/linux/bin/llvm-ar
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/opt/intel/oneapi/compiler/2021.1.2/linux/bin/llvm-ranlib
CMAKE_CXX_FLAGS:STRING=
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=-O2 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_C_COMPILER:STRING=/opt/intel/oneapi/compiler/2021.1.2/linux/bin/clang
CMAKE_C_COMPILER_AR:FILEPATH=/opt/intel/oneapi/compiler/2021.1.2/linux/bin/llvm-ar
CMAKE_C_COMPILER_RANLIB:FILEPATH=/opt/intel/oneapi/compiler/2021.1.2/linux/bin/llvm-ranlib

Still on with classic:

~/repos/build-mariadb-server-10.2-intelonapi-classic 
$ cmake -DPLUGIN_{MROONGA,TOKUDB,OQGRAPH,ROCKSDB}=NO -DCMAKE_LINKER=/opt/intel/oneapi/compiler/2021.1.1/linux/bin/intel64/xild  -DCMAKE_C_COMPILER=/opt/intel/oneapi/compiler/2021.1.1/linux/bin/intel64/icc  -DCMAKE_CXX_COMPILER=/opt/intel/oneapi/compiler/2021.1.1/linux/bin/intel64/icpc ../mariadb-server-10.2
 
$ mysql-test/mtr  --mem main.type_float
Logging: /home/dan/repos/mariadb-server-10.2/mysql-test/mysql-test-run.pl  --mem main.type_float
vardir: /home/dan/repos/build-mariadb-server-10.2-intelonapi-classic/mysql-test/var
Removing old var directory...
Creating var directory '/home/dan/repos/build-mariadb-server-10.2-intelonapi-classic/mysql-test/var'...
 - symlinking 'var' to '/dev/shm/var_auto_pLfS'
Checking supported features...
MariaDB Version 10.2.38-MariaDB
 - SSL connections supported
 - binaries built with wsrep patch
Collecting tests...
Installing system database...
 
==============================================================================
 
TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------
 
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
main.type_float                          [ fail ]
        Test ended at 2021-03-27 13:43:08
 
CURRENT_TEST: main.type_float
--- /home/dan/repos/mariadb-server-10.2/mysql-test/r/type_float.result	2020-11-13 12:52:33.461439087 +1100
+++ /home/dan/repos/mariadb-server-10.2/mysql-test/r/type_float.reject	2021-03-27 13:43:07.922142008 +1100
@@ -264,7 +264,7 @@
 drop table t1,t2,t3;
 select 1e-308, 1.00000001e-300, 100000000e-300;
 1e-308	1.00000001e-300	100000000e-300
-1e-308	1.00000001e-300	1e-292
+0	1.00000001e-300	1e-292
 select 10e307;
 10e307
 1e308
 
mysqltest: Result length mismatch
 
 - saving '/home/dan/repos/build-mariadb-server-10.2-intelonapi-classic/mysql-test/var/log/main.type_float/' to '/home/dan/repos/build-mariadb-server-10.2-intelonapi-classic/mysql-test/var/log/main.type_float/'
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 0.000 of 5 seconds executing testcases
 
Failure: Failed 1/1 tests, 0.00% were successful.
 
Failing test(s): main.type_float
 
The log files in var/log may give you some hint of what went wrong.
 
If you want to report this error, please read first the documentation
at http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html
 
mysql-test-run: *** ERROR: there were failing test cases

Comment by Daniel Black [ 2021-03-31 ]

icpc (ICC) 2021.1 Beta 20201112

2047        word1(&rv0)= 0;
(gdb) n
2048        dval(&rv)*= dval(&rv0);
(gdb) p rv0
$1 = {d = 1.2325951644078309e-32, L = {0, 961544192}}
(gdb) p rv
$2 = {d = 8.1129638414606674e-277, L = {3764888392, 110936921}}
(gdb) n
 
Thread 6 "mysqld" hit Hardware watchpoint 2: rv
 
Old value = {d = 8.1129638414606674e-277, L = {3764888392, 110936921}}
New value = {d = 0, L = {0, 0}}
my_strtod_int (s00=0x7fffe000f561 "e-308", se=0x7ffff14606f8, error=0x7ffff1460700, buf=0x7ffff145f878 "\220\370E\361\377\177", buf_size=3680) at /home/dan/repos/mariadb-server-10.2/strings/dtoa.c:2059

compiler clang++-11.0

(gdb) n
2048        dval(&rv)*= dval(&rv0);
(gdb) p rv0
$9 = {d = 1.2325951644078309e-32, L = {0, 961544192}}
(gdb) p rv
$10 = {d = 8.1129638414606674e-277, L = {3764888392, 110936921}}
(gdb) n
 
Thread 6 "mysqld" hit Hardware watchpoint 2: rv
 
Old value = {d = 8.1129638414606674e-277, L = {3764888392, 110936921}}
New value = {d = 9.9999999999999991e-309, L = {2014963922, 471254}}
my_strtod_int (s00=0x7fffe0012909 "e-308", se=0x7ffff145b408, error=0x7ffff145b410, buf=0x7ffff145a500 "\030\245E\361\377\177", buf_size=3680) at /home/dan/repos/mariadb-server-10.2/strings/dtoa.c:2044

dval is a macro accessing the d member so the multiplication of these two doubles is different resulting in the test failure. Both of these where with -O0.

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