Bug 26175 - galera broken on armv7hl
Summary: galera broken on armv7hl
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: David GEIGER
QA Contact:
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2020-02-08 12:40 CET by Pascal Terjan
Modified: 2020-05-24 10:58 CEST (History)
0 users

See Also:
Source RPM: galera-26.4.3-2.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Pascal Terjan 2020-02-08 12:40:44 CET
Latest build has been failing in tests but this seems to be a real problem in the code.

Failure is:

galerautils/tests/gu_rset_test.cpp:164:E:RecordSet v1:ver1:0: (after this point) Received signal 7 (Bus error)

The faulty code is here, there is a comment (copied from reference implementation) saying alignment needs to be handled there, and it is not:

static GU_FORCE_INLINE void
_mmh3_128_blocks (const uint64_t* const blocks, size_t const nblocks,
                  uint64_t* h1, uint64_t* h2)
{
    //----------
    // body

    size_t i;
    for(i = 0; i < nblocks; i++)
    {
//-----------------------------------------------------------------------------
// Block read - if your platform needs to do endian-swapping or can only
// handle aligned reads, do the conversion here
        uint64_t k1 = gu_le64(blocks[i]);
        i++;
        uint64_t k2 = gu_le64(blocks[i]);

        _mmh3_128_block (k1, k2, h1, h2);
    }
}

I failed to find a place for upstream bug reports on https://galeracluster.com/ so recording it here.
Comment 1 Pascal Terjan 2020-02-08 12:42:25 CET
Someone wrote a portable library for murmur, I wonder if it could be used instead https://github.com/kloetzl/libmurmurhash

That one does it right https://github.com/kloetzl/libmurmurhash/blob/master/PMurHash.c#L214
Comment 2 Lewis Smith 2020-02-09 10:28:24 CET
Thank you for reporting this; and the detective work to find the cause.

> I failed to find a place for upstream bug reports on
> https://galeracluster.com/ so recording it here.
I also could not see a place on their site for reporting a bug. For starters, please ask info@codership.com (their contact e-mail) about how to do so; then when you have some sort of bug reference, please post that on *this* bug in the URL field in the header.
And notify when you hear it has been fixed.

Assigning to DavidG who has this package; I imagine he will await the resolution upstream.

Keywords: (none) => UPSTREAM
Assignee: bugsquad => geiger.david68210

Comment 3 Pascal Terjan 2020-02-23 22:12:38 CET
That email unfortunately goes to some Sales Manager and after explaining that no I am not working on a solution for a customer I didn't get another reply, so I have no idea if it was passed to technical people.
Comment 4 Pascal Terjan 2020-03-05 18:52:02 CET
Looking around, Debian is still on 25.3.* (they updated to 25.3.29 few weeks ago) so I can't steal a fix from there.

I'll try to work on it at some point but this is lower priority than many things...
Comment 5 David GEIGER 2020-03-09 08:36:06 CET
Maybe we can report the arm build issue here: https://github.com/codership/galera
Comment 6 David GEIGER 2020-03-09 08:44:11 CET
So Debian has a different compile as ours, they use:

# Use bundled asio, since system asio is too new (> 1.10.8)
SCONS_ARGS += system_asio=0

and:

# Bus errors on arm64 kernels prevent running testsuite when building armhf
ifeq (armhf,$(DEB_HOST_ARCH))
	SCONS_ARGS += tests=0 deterministic_tests=0

and:

# Use strict compilation flags (ie -Werror) if requested
ifneq (,$(filter strict_build_flags,$(DEB_BUILD_OPTIONS)))
	SCONS_ARGS += strict_build_flags=1


WDYT?
Comment 7 Pascal Terjan 2020-03-10 15:47:08 CET
Hmm so their solution is to disable the tests on arm to not fail despite the problem being in the code and not the tests :(
Comment 8 Pascal Terjan 2020-03-10 15:52:52 CET
I opened https://github.com/codership/galera/issues/570
Comment 9 David GEIGER 2020-05-24 10:58:26 CEST
latest 26.4.4 release fixes armv7hl build, so closing of this bug!

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.