[MCOL-4084] Integrated release builds cause random results for some queries Created: 2020-06-18 Updated: 2023-10-25 Resolved: 2023-10-25 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | Storage Manager |
| Affects Version/s: | 1.5.2 |
| Fix Version/s: | Icebox |
| Type: | Bug | Priority: | Major |
| Reporter: | Patrick LeBlanc (Inactive) | Assignee: | Leonid Fedorov |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Sub-Tasks: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
We're not sure why yet, but doing an integrated build (CS is built as part of the server build) with CMAKE_BUILD_TYPE=Release, causes some queries with joins and aggregations to return random wrong results. Easiest reproduction is SELECT COUNT The correct result is the number of rows in LINEITEM table. When reproducing you will see much smaller number. Switching the build type to RelWithDebInfo makes it work, and doing a non-integrated build (CS repo is built separately from the server) makes it work. For now I've set our ci/cd system to do RelWithDebInfo builds so we don't create broken pkgs. The goal of this top-level ticket is to find and fix the cause of the problem with integrated release builds. Existing tickets fixed by this build type change can be made subtasks of this ticket. I would suggest if the build type fixes it, then those existing tickets can also be marked fixed. They'd be considered symptoms of this ticket, not a separate problem. |
| Comments |
| Comment by Gregory Dorman (Inactive) [ 2020-06-19 ] |
|
Isn't this supposed to be "closed"? |
| Comment by Sergei Golubchik [ 2020-06-19 ] |
|
As far as I understand this ticket is about fixing the actual problem with Release builds. Not about avoding it by using RelWithDebInfo. If some gcc optimization causes this bug to appear and the workaround is to reduce the optimization level, then it's almost certain you'll see this bug again on a newer gcc version or on a different compiler. |
| Comment by Daniel Lee (Inactive) [ 2020-06-19 ] |
|
This issue caused DBT3 queries to return incorrect results (see "causes" in "issue links" above). I have closed the tickets for the DBT3 queries. Once this issue is fixed, I have a MTR test case to validate it. |
| Comment by Ben Thompson (Inactive) [ 2020-08-10 ] |
|
The differences in build flags appears to be tied to "Release" build type not implementing the -fno-strict-aliasing option. This throws numerous warnings if enabled. within columnstore and a few other places in integrated builds. Should we consider building Release build type with the -fno-strict-aliasing option as well? Attaching every warning for strict aliasing in my local build: |