Bug #111091 The main.regular_expressions_utf-8 fails on ppc64el
Submitted: 19 May 2023 16:43 Modified: 22 May 2023 22:44
Reporter: Lena Voytek Email Updates:
Status: Unsupported Impact on me:
None 
Category:Tests: Server Severity:S7 (Test Cases)
Version:8.0.33 OS:Ubuntu (Tested on Ubuntu 23.04)
Assigned to: CPU Architecture:POWER (ppc64el)

[19 May 2023 16:43] Lena Voytek
Description:
When running the full upstream test suite, as of MySQL 8.0.31 and onward, main.regular_expressions_utf-8 fails on ppc64el. This has been solved temporarily in Ubuntu by ignoring the test in the DEP-8 tests in version 8.0.31-0ubuntu3 - https://launchpad.net/ubuntu/+source/mysql-8.0/8.0.31-0ubuntu3

The logs for this will show something like:

CURRENT_TEST: main.regular_expressions_utf-8
mysqltest: At line 616: Query 'DO '1' regexp repeat('$', 50000000)' failed with wrong error 2013: 'Lost connection to MySQL server during query', should have failed with error '3700'.

The result from queries just before the failure was:
# Test that the replacement buffer can grow beyond the maximum VARCHAR
# column length.
#
CREATE TABLE t1 ( a TEXT );
INSERT INTO t1 VALUES ( repeat( 'a', 16384 ) );
SELECT char_length ( regexp_replace( a, 'a', 'b' ) ) FROM t1;
char_length ( regexp_replace( a, 'a', 'b' ) )
16384
SET GLOBAL  regexp_time_limit = 10000;
SELECT regexp_like ( regexp_replace( a, 'a', 'b' ), 'b{16384}' ) FROM t1;
regexp_like ( regexp_replace( a, 'a', 'b' ), 'b{16384}' )
1
SET GLOBAL  regexp_time_limit = DEFAULT;
DROP TABLE t1;
#
# Bug#27134570: DOS: REGEXP TAKES EXPONENTIALLY LONGER, CAN'T BE KILLED,
# HOGS CPU
#
DO '1' regexp repeat('$', 50000000);
ERROR HY000: Lost connection to MySQL server during query
safe_process[47680]: Child process: 47681, exit: 1

Server [mysqld.1 - pid: 47613, winpid: 47613, exit: 256] failed during test run
Server log from this test:
----------SERVER LOG START-----------
safe_process[47613]: Child process: 47614, killed by signal: 9
----------SERVER LOG END-------------

How to repeat:
This can be repeated by running the testsuite on Linux, such as through autopkgtest on Ubuntu and Debian's upstream test file.
[22 May 2023 7:42] Daniel Fischer
The mysqld is killed by signal 9 (SIGKILL), is it being killed from outside? It's right at a spot where CPU and memory usage spike, too. But for me this is not enough to get it killed on an emulated ppc64 system.
[22 May 2023 13:01] MySQL Verification Team
Hi Mr. Voytek,

Thank you for your bug report.

However, we do not support any of the  POWERPC architectures on any Operating Systems.

So, it seems that you are on your own with respect to this problem.

Also, for your information, signal 9 means that it was killed by OS, in this case, Linux. You have to investigate why was it killed. 

Most probable culprit is the compiler and the next second one is the memory that is used.

Unsupported.
[22 May 2023 13:05] MySQL Verification Team
Hi,

What you could do is trying more stable version of the compiler and / or using less optimisations. This is because compilers for the rare CPU's are not as well tested as on common ones, like Intel or ARM.
[22 May 2023 22:44] Lena Voytek
Thank you for the additional information. The test ended up succeeding when providing additional memory
[23 May 2023 12:23] MySQL Verification Team
Hi,

You are truly welcome and we wish you success in bringing MySQL to PowerPC.