Bug #106721 Hash join test failure on x86
Submitted: 13 Mar 2022 15:49 Modified: 28 Apr 2022 16:44
Reporter: Georgi Sotirov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:8.0.28 OS:Linux (Slackware 15.0)
Assigned to: CPU Architecture:x86

[13 Mar 2022 15:49] Georgi Sotirov
Description:
Trying to build MySQL 8.0.28 server on a Slackware 15.0 (x86) build machine with GCC 11.2.0 I get failure on one of the tests:

15/83 Test #15: merge_large_tests ..................................***Failed   52.50 sec

In build/Testing/Temporary/LastTest.log log I found the following:

[ RUN      ] HashJoinTest.HashJoinChunkFiles
/usr/src/tmp/mysql-8.0.28/unittest/gunit/hash_join-t.cc:872: Failure
Expected equality of these values:
  2
  hash_join_iterator.ChunkCount()
    Which is: 1
[  FAILED  ] HashJoinTest.HashJoinChunkFiles (0 ms)
[----------] 10 tests from HashJoinTest (1 ms total)

The test in question was added for MySQL 8.0.28 fairly recently (see commit https://github.com/mysql/mysql-server/commit/1daee9f from 2021-09-21). As far as I understand it is a test of the hash join iterator for creating a specific number of file chunks for a crafted scenario hashing 1000 rows. It is to note that I do not have such failure on a x86_64 build machine with the same configuration.

What could be the reason for this test to fail?

Please, let me know what other information is necessary, so we could solve this.

How to repeat:
Try to build the server on Slackware 15.0 (x86) with GCC 11.2.0 and the following configuration:

cmake -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_CXX_COMPILER=g++ \
      -DCMAKE_CXX_FLAGS="-O3" \
      -DCMAKE_C_COMPILER=gcc \
      -DCMAKE_C_FLAGS="-O3" \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_MAKE_PROGRAM=gmake \
      -DDOWNLOAD_BOOST=ON \
      -DENABLED_PROFILING=ON \
      -DFEATURE_SET="community" \
      -DINNODB_COMPILER_HINTS=ON \
      -DINSTALL_BINDIR=bin \
      -DINSTALL_DOCDIR=doc/mysql-8.0.26 \
      -DINSTALL_DOCREADMEDIR=doc/mysql-8.0.26 \
      -DINSTALL_INCLUDEDIR=include/mysql \
      -DINSTALL_LAYOUT=STANDALONE \
      -DINSTALL_LIBDIR=lib \
      -DINSTALL_MANDIR=man \
      -DINSTALL_MYSQLDATADIR=lib/mysql \
      -DINSTALL_MYSQLSHAREDIR=share/mysql \
      -DINSTALL_PLUGINDIR=lib/mysql/plugin \
      -DINSTALL_SBINDIR=sbin \
      -DINSTALL_SHAREDIR=share/mysql \
      -DINSTALL_SUPPORTFILESDIR=/etc/mysql \
      -DMYSQL_DATADIR=/var/lib/mysql \
      -DSYSCONFDIR=/etc/mysql \
      -DWITH_ARCHIVE_STORAGE_ENGINE=ON \
      -DWITH_AUTHENTICATION_LDAP=ON \
      -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
      -DWITH_BOOST=/tmp \
      -DWITH_CURL=system \
      -DWITH_EDITLINE=system \
      -DWITH_EXAMPLE_STORAGE_ENGINE=ON \
      -DWITH_EXTRA_CHARSETS=all \
      -DWITH_FEDERATED_STORAGE_ENGINE=ON \
      -DWITH_ICU=system \
      -DWITH_INNODB_MEMCACHED=ON \
      -DWITH_LIBEVENT=system \
      -DWITH_LZ4=system \
      -DWITH_NUMA=ON \
      -DWITH_PROTOBUF=system \
      -DWITH_RAPIDJSON=bundled \
      -DWITH_ROUTER=OFF \
      -DWITH_SSL=system \
      -DWITH_UNIT_TESTS=ON \
      -DWITH_ZLIB=system \
      -DWITH_ZSTD=system
[14 Mar 2022 14:34] MySQL Verification Team
Hi Mr. Sotirov,

Thank you for your bug report.

We must inform you that Slackware is not one of our supported platforms. 

Have you tried to use our generic Linux binary tarball instead of building it yourself ???

If you have attempted that and failed, we need more information from you. We need all the info on the libraries installed, version of Boost, linker version and so on and so forth.

We can not conclude anything based on what you have provided it. But, first try using our binary tarball.

We are waiting on your feedback.
[14 Mar 2022 15:16] MySQL Verification Team
Hi Mr. Sotirov,

Turns out that this is a known bug.

It is already fixed in 8.0.29.

It is yet unknown when will 8.0.29 be released, but it should occur in the first half of this year.

Closed.
[27 Apr 2022 17:00] Georgi Sotirov
I was just able to successfully build (including tests) MySQL 8.0.29 on x86, so thank you for the fix whatever it was.

Let me answer your initial questions:

I'm _purposefully_ building MySQL for Slackware from source, because I'd like to use available system libraries and configure server as I need. I always use "the minimum supported version of the Boost library for MySQL builds" as specified in the Release notes for each MySQL version. So for 8.0.28 it was Boost 1.73.0 and for 8.0.29 it was 1.77.0, which is downloaded as I configure with -DDOWNLOAD_BOOST=ON and -DWITH_BOOST=/tmp CMake options. I'm not sure for what other libraries you need version information, but if necessary I'll provide it upon request as always.

Apparently, the problem was with building from source (even on unsupported by you OS), so the suggestion to use binary tarball was irrelevant.

BTW I do not find this bug number mentioned in MySQL 8.0.29 Release notes (see https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-29.html) and reading them I found no mention of tests failure. Do you care providing your internal bug number (if any) just for reference?
[28 Apr 2022 13:18] MySQL Verification Team
Hi Mr. Sotirov,

You can not find this bug in the Release Notes, simply because it was a duplicate of an internal bug, to whom public does not have access to.
[28 Apr 2022 16:44] Georgi Sotirov
Yeah, I'm aware of the fact that internal bugs are hidden to public, but still there are such bug references in the release notes, right? And where applicable these are accompanied by external bug references (as a link between them). This is important for cross referencing between releases and bug fixes.

Anyway, just saying... when I have a promise for a bug to be fixed in the next release the first thing I do is check bug's number in the release notes...