[MDEV-15430] type_float.test floating point error clang-4 Created: 2018-02-27 Updated: 2020-10-11 Resolved: 2018-06-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Tests |
| Affects Version/s: | 10.2, 10.3 |
| Fix Version/s: | 10.2.17, 10.2.18 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Vicențiu Ciorbaru | Assignee: | Teodor Mircea Ionita (Inactive) |
| Resolution: | Not a Bug | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
When compiling with clang 4.0.1 in Travis CI, we get the following errors:
These are all related failures in mysys/dtoa.c when converting from a string to a floating point number. For large values there seems to be a loss of precision. The full list of test failures is: |
| Comments |
| Comment by Daniel Black [ 2018-02-28 ] | ||||||||||||||||
|
I have a feeling the case of this was the same as what I was investigating in MDEV-14419 | ||||||||||||||||
| Comment by Teodor Mircea Ionita (Inactive) [ 2018-04-24 ] | ||||||||||||||||
|
I ran the following:
On latest 10.3 Release with -03 with each full run taking around 9 seconds, which amounts to approx 1632 runs. No failures so far. Clang is Apple LLVM version 9.1.0 (clang-902.0.39.1). Maybe try on 10.2? Should I be using some extra flags? Maybe also try with Clang on Linux? | ||||||||||||||||
| Comment by Teodor Mircea Ionita (Inactive) [ 2018-04-24 ] | ||||||||||||||||
|
No-show for branch 10.2 too:
Going to setup a build on Ubuntu 16.04 LTS next with Clang5 (what Travis uses) and test on that in the same manner. Unfortunately the macOS builds on Travis haven't been succeeding for a long while now, maybe it would be worth looking at | ||||||||||||||||
| Comment by Otto Kekäläinen [ 2018-04-24 ] | ||||||||||||||||
|
teodor You could try runnin a Ubuntu 14.04 virtual machine and reproduce it there. It should be very easy to reproduce what Travis-CI does, as the setup and logs are fully public and defines the entire environment. | ||||||||||||||||
| Comment by Teodor Mircea Ionita (Inactive) [ 2018-04-24 ] | ||||||||||||||||
|
otto I was just doing that | ||||||||||||||||
| Comment by Vicențiu Ciorbaru [ 2018-04-24 ] | ||||||||||||||||
|
teodor What cmake configure line are you running? Make sure to mimic the one from Travis. I recall reproducing this required -DCMAKE_BUILD_TYPE=RelWithDebInfo. Also, this is not a race condition, it was always reproducible, so there's no point in repeating a test if it's not reproducible on the first run. | ||||||||||||||||
| Comment by Otto Kekäläinen [ 2018-04-24 ] | ||||||||||||||||
|
See screenshot - this is the build that contains the this permanently failing test. | ||||||||||||||||
| Comment by Otto Kekäläinen [ 2018-04-24 ] | ||||||||||||||||
|
@teodor I have protected branches enabled in my own repository, so you can always compare the code to the 10.3 I have to see what the code looked like before it started to error (assuming the problem is the code, not an underlying dependency that updated and introduced this): https://travis-ci.org/ottok/mariadb/branches (Protected branch: My own 10.3 branch will always be green, as I cannot push on it any commits that did not pass Travis. My work happens in ok-* branches that may fail occasionally, and because of this bug currently always.) | ||||||||||||||||
| Comment by Teodor Mircea Ionita (Inactive) [ 2018-05-22 ] | ||||||||||||||||
|
Dumping the results I have so far with cross-compiler testing:
Working on disabling affected tests for affected clang version in Travis. Another option suggested by otto is to just drop support for this version. | ||||||||||||||||
| Comment by Daniel Black [ 2018-05-22 ] | ||||||||||||||||
|
If you want to try clang for the main branches there's a repo and packages: http://apt.llvm.org/. Is https://github.com/MariaDB/server/pull/505/commits/9fce41be75a1620f11bdcbfd305c4ede1919ae16 the workaround you need? Note "cross-compiler" has a build/target architecture difference which isn't the same as what you are doing. | ||||||||||||||||
| Comment by Teodor Mircea Ionita (Inactive) [ 2018-05-23 ] | ||||||||||||||||
|
That could work, however, here is the alternative otto mentioned: https://travis-ci.org/shinnok/server/builds/382495667 Dropping clang4 makes the config a tad cleaner and VERSION no. can be the same to keep gcc on par with clang (we have the issue recorded in Jira after all). I would even go one step further and do this also: https://github.com/MariaDB/server/commit/8e6f1b9f1e555cec2faaa14c950984de4e1be5bc Just to make the build setup less confusing. See example here: | ||||||||||||||||
| Comment by Vicențiu Ciorbaru [ 2018-06-29 ] | ||||||||||||||||
|
Compiler bug within clang 4 | ||||||||||||||||
| Comment by Otto Kekäläinen [ 2020-10-11 ] | ||||||||||||||||
|
I removed the skiplists for these tests in https://salsa.debian.org/mariadb-team/mariadb-10.5/-/commit/bde2cf481fa48a0dd85b9ad40e27ad5005ad1122 as we nowadays only run the main test suite as part of the builds (see debian/rules). |