Bug #80818 default log-tc-size too small on POWER - 3 * ( 64K page size) minimium needed
Submitted: 22 Mar 2016 6:55 Modified: 6 Jul 2016 18:01
Reporter: Daniel Black Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: XA transactions Severity:S2 (Serious)
Version:5.7.11 OS:Linux (Power8 ppc64le)
Assigned to: CPU Architecture:ARM
Tags: power

[22 Mar 2016 6:55] Daniel Black
MariaDB duplicate that indicates that 3*PAGESIZE is sufficient however Power page size is 64K. 24K doesn't mean the 3*PAGESIZE specification.


during mtr:

unit_tests                               w0 [ fail ]
  The following tests FAILED:
         24 - merge_large_tests (Failed)
Report from unit tests in /home/danielgb/build_mysql-5.7/mysql-test/var/ctest.log

from ctest.log
# Run 231 TCLogMMapTest.TClogCommit
06:22:45 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 59996 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x1003f5b2de0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 3ffffd7a4e00 thread_stack 0x40000

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): Connection ID (thread ID): 4

with following patch the crash does not occur:

diff --git a/sql/sql_class.h b/sql/sql_class.h
index bc46199..34bcb83 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -212,7 +212,7 @@ public:

-#define TC_LOG_PAGE_SIZE   8192
+#define TC_LOG_PAGE_SIZE   64*1024

(Obviously not intended to be the final patch.)

unit_tests                               w0 [ pass ]

Unit tests: 100% tests passed, 0 tests failed out of 27
Report from unit tests in /home/danielgb/build_mysql-5.7/mysql-test/var/ctest.log

How to repeat:
compile on Power hardware.

run ./mysql-test-run

Suggested fix:
TC_LOG_PAGE_SIZE to be the same as the OS page size.
[22 Mar 2016 6:59] Daniel Black
correct typo in Synopsis
[22 Mar 2016 23:49] Daniel Black

Attachment: power-log-tc-size.patch (text/x-patch), 1.09 KiB.

[29 Mar 2016 7:06] MySQL Verification Team
Hello Daniel,

Thank you for the report and contribution.

[8 Jun 2016 14:54] OCA Admin
Contribution submitted via Github - Bug #80818: default log-tc-size too small on POWER - 3 * ( 64K page size) minimi 
(*) Contribution by Alexey Kopytov (Github akopytov, mysql-server/pull/80#issuecomment-224567038): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: git_patch_72994826.txt (text/plain), 1.49 KiB.

[6 Jul 2016 18:01] Paul Dubois
Posted by developer:
Noted in 8.0.0 changelog.

The hardcoded memory page size of 8KB for the memory-mapped
transaction coordinator was too small for platforms such as ARM64 and
PowerPC where the page size is much larger. The server now invokes a
system call to get the page size of the current platform rather than
using a hardcoded value. A consequence for the --log-tc-size option
is that the minimum and default values are now 6 times the page size.
Also, the value must be a multiple of the page size. Thanks to Alexey
Kopytov for the patch.
[6 Oct 2017 7:46] MySQL Verification Team
Related - Bug #87995