[MDEV-26645] test main.func_math fails on MariaDB 10.6+ Created: 2021-09-20 Updated: 2022-03-29 Resolved: 2022-02-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Affects Version/s: | 10.5, 10.6 |
| Fix Version/s: | 10.5.16, 10.6.8, 10.7.4, 10.8.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Otto Kekäläinen | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
|
While working on 10.6 and 10.7 I've noticed that this test is permanently failing:
Example of a full log at https://launchpadlibrarian.net/559043027/buildlog_ubuntu-hirsute-s390x.mariadb-10.7_1%3A10.7.0~ubuntu21.04.1~1631999241.a60c5e60c84+10.7.gitlab.ci.benchmark_BUILDING.txt.gz Applies to platforms: s390x, ppc64 |
| Comments |
| Comment by Alice Sherepa [ 2021-09-20 ] |
|
also on 10.5 https://buildbot.mariadb.org/#/builders/309/builds/937/steps/6/logs/stdio |
| Comment by Sarah Julia Kriesch [ 2021-10-30 ] |
|
It also fails for openSUSE. |
| Comment by Christian Boltz [ 2021-11-01 ] |
|
The patch func_math_tests_ Therefore: please use that patch to get an idea which queries don't fail as expected, but DO NOT apply it (maybe except as a workaround to un-break the build in distribution packages for s390x and ppc64 until this bug is fixed). BTW: This bug also seems to depend on the version of toolchain, libraries etc. - I see it when building for openSUSE Tumbleweed (rolling release), but in openSUSE Leap (stable release, which has older versions of everything) the queries fail as expected (= the tests succeed). |
| Comment by Otto Kekäläinen [ 2021-11-28 ] |
|
This test failure is still in 10.6, and visible on newly uploaded 10.6 in Debian builders on several non-amd64 archs:
Overview on latest build status in Debian at: https://buildd.debian.org/status/package.php?p=mariadb-10.6 |
| Comment by Danilo Spinella [ 2022-01-26 ] |
|
This fails on 10.6.5 on x86_64 too, when compiling MariaDB using GCC-12 on openSUSE Tumbleweed. This is the log from the tests: mariadb-gcc12-x86_64.log |
| Comment by Michael Widenius [ 2022-02-16 ] |
|
I write the code that test for the overflow and it seams to work on most machines. |
| Comment by Marko Mäkelä [ 2022-02-18 ] |
|
This is similar to An integer overflow in an expression like a+b or a-b is undefined behavior. The compiler is allowed to assume that no such overflow is possible, and optimize away some code accordingly. Apparently, such optimizations were implemented in GCC a little earlier for the POWER and s390x back-ends, and with GCC 12 it starts to affect the AMD64 backend as well. The fix is simple: Remove some special handling for WITH_UBSAN. |
| Comment by Otto Kekäläinen [ 2022-03-02 ] |
|
I backported this to 10.6 in Debian and it worked so far on both Launchpad and official Debian builders. Thanks! |