Bug #105521 Crash in touch_mem on ARM running MTR tests on MySQL Cluster 8.0.27
Submitted: 10 Nov 2021 18:55 Modified: 24 Jan 2022 22:14
Reporter: Mikael Ronström Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:8.0.27 OS:Oracle Linux (Cloud Developer version)
Assigned to: CPU Architecture:ARM

[10 Nov 2021 18:55] Mikael Ronström
Description:
Crash with SIGSEGV running a simple MTR test case.

How to repeat:
I build a version of MySQL Cluster 8.0.27 on ARM using the debug.
The Cmake command is:
cmake -DWITH_DEBUG=1 -DWITH_SSL=system -DWITH_NDBCLUSTER=1 -DWITH_NDB_TEST=1 -DWITH_NDBAPI_EXAMPLES=1 -DWITH_ROUTER=0 -DWITH_UNIT_TESTS=1 -DWITH_ERROR_INSERT=1 _DWITH_BOOST=$BOOST_ROOT -DWITH_NDB_JAVA=1 -DWITH_LIBEVENT=bundled ../
make -j16
The compilation works fine.
After this I run ./mtr --suite=ndb --parallel=6 --force
All test cases fails with SIGSEGV in line 131 on touch_mem function when it touches the memory.
However looking at the core dump in gdb shows no sign of illegal memory address.

Suggested fix:
Not known
[11 Nov 2021 7:04] MySQL Verification Team
Hello Mikael,

Thank you for the report and feedback.
Verified described.

Sincerely,
Umesh
[11 Nov 2021 7:16] MySQL Verification Team
MySQL Cluste 8.0.27 test results

Attachment: 105521.results (application/octet-stream, text), 1.28 MiB.

[15 Dec 2021 13:44] Mauritz Sundell
Posted by developer:
 
sysconf(_SC_PAGESIZE) reports 64KB page size on linux/arm machines in lab.
That is at least one part of the problem, logic in touch mem was written to handle 4K or 8K pages and could probably handle page sizes up to 32KB.
[15 Dec 2021 13:50] Mauritz Sundell
Posted by developer:
 
From logs one see that one almost succeeded to reserve 128TB of address space ranging from 0x7fffa4000000 to 0xfffda3ffffff.

    do_virtual_alloc: Reserved address space for 16383 8GiB regions at 0x7fffa4000000.
[24 Jan 2022 22:14] Jon Stephens
Fixed in NDB 8.0.29.

Debug/ARM only (unsupported).

Closed.