Subject: bug#35521: Mariadb test suite failures on x86_64-linux

From: Marius Bakke <[email-masked]>
Date: Sun, 14 Jul 2019 00:42:37 +0200

Mark H Weaver <[email-masked]> writes:

> Hi Marius,
>
>> Update: Berlin built mariadb twice on core-updates with this patch:
>>
>> --8<---------------cut here---------------start------------->8---
>> diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
>> index 6bfeaad9a2..64bc0938b6 100644
>> --- a/gnu/packages/databases.scm
>> +++ b/gnu/packages/databases.scm
>> @@ -753,7 +753,7 @@ Language.")
>>                   (with-directory-excursion "mysql-test"
>>                     (invoke "./mtr" "--verbose"
>>                             "--retry=3"
>> -                           "--testcase-timeout=40"
>> +                           "--testcase-timeout=80"
>>                             "--suite-timeout=600"
>>                             "--parallel" (number->string (parallel-job-count))
>>                             "--skip-test-list=unstable-tests"))
>> --8<---------------cut here---------------end--------------->8---
>>
>> Mark, Chris: Can you try this change with MariaDB 10.1.40 and see if it
>> works for you?
>
> I tried it, but it made no difference on my Thinkpad X200, which still
> fails the same way as before with 10.1.38:
>
>   Failing test(s): tokudb_bugs.mdev4533

I was about to push this patch to core-updates:

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 6bfeaad9a2..5d256b1af2 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -706,9 +706,6 @@ Language.")
                       ;; 2030-12-31.  See <https://bugs.gnu.org/34351> for details.
                       "main.mysqldump"
 
-                      ;; XXX: Fails sporadically.
-                      "innodb_fts.crash_recovery"
-
                       ;; FIXME: This test fails on i686:
                       ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
                       ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
@@ -753,7 +750,10 @@ Language.")
                  (with-directory-excursion "mysql-test"
                    (invoke "./mtr" "--verbose"
                            "--retry=3"
-                           "--testcase-timeout=40"
+                           ;; On x86_64 we need a long timeout because of the
+                           ;; TokuDB engine, whose individual test cases often
+                           ;; require more than 1 hour to complete on busy hosts.
+                           "--testcase-timeout=90"
                            "--suite-timeout=600"
                            "--parallel" (number->string (parallel-job-count))
                            "--skip-test-list=unstable-tests"))

Lo and behold, tokudb_bugs.mdev4533 failed when I tried it on Berlin.

A couple of lines above "Failing test(s):" is the test output:

--8<---------------cut here---------------start------------->8---
CURRENT_TEST: tokudb_bugs.mdev4533                                                                 
safe_process[29262]: parent_pid: 23338                                                             
safe_process[29262]: Started child 29263, terminated: 0                                            
mysqltest: At line 6: query 'CREATE TABLE t1 (a INT(11), b CHAR(8)) ENGINE=TokuDB' failed: 1005: Ca
n't create table `test`.`t1` (errno: 28 "No space left on device")

The result from queries just before the failure was:
DROP TABLE IF EXISTS t1; 
CREATE TABLE t1 (a INT(11), b CHAR(8)) ENGINE=TokuDB;
safe_process[29262]: Got signal 17, child_pid: 29263
safe_process[29262]: Killing child: 29263
safe_process[29262]: Child exit: 1
--8<---------------cut here---------------end--------------->8---

Could it be that you don't have enough disk space for this test?  Do you
have the log file available still?

Here is the test in question:
https://github.com/MariaDB/server/blob/10.1/storage/tokudb/mysql-test/tokudb_bugs/t/mdev4533.test

As a side note, MariaDB is ~30 MiB bigger on x86_64 because of TokuDB.
It would be great to move it to a separate output.