Bug #10803 Test 'func_compress' demands too much memory
Submitted: 23 May 2005 15:20 Modified: 9 Nov 2005 11:07
Reporter: Joerg Bruehe Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.6 OS:FreeBSD (FreeBSD)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[23 May 2005 15:20] Joerg Bruehe
Description:
Build of 5.0.6, based on ChangeSet
  1.1889 05/05/21 23:23:39 kent@mysql.com +5 -0
  default_modify.c:
    Use MY_STAT to declare argument to my_fstat()
  des_key_file.cc:
    Use local seach path for "mysql_priv.h"
  mysys.dsp, libmysqld.dsp, libmysql.dsp:
    New file needed, "../mysys/default_modify.c"

Test "func_compress" encounters a server crash in "cluster" (both with and without Linuxthreads, but different in "default" and "--ps-protocol" test), maybe due to memory limit?

=== no Linuxthreads, default test: ===

func_compress                  [ fail ]

Errors are (from /usr/home/mysqldev/cane/test/mysql-cluster-5.0.6-beta-freebsd4.7-i386/mysql-test/var/log/mysqltest-time) :
/usr/home/mysqldev/cane/test/mysql-cluster-5.0.6-beta-freebsd4.7-i386/bin/mysqltest: At line 48: query 'select compress(repeat('aaaaaaaaaa', IF('', 10, 10000000))) is null' failed: 2013: Lost connection to MySQL server during query
(the last lines may be the most important ones)

Ending Tests
Shutting-down MySQL daemon

master not cooperating with mysqladmin, will try manual kill
kill: 30539: No such process
master refused to die. Sending SIGKILL
kill: 30539: No such process

=== with Linuxthreads, "--ps-protocol" test: ===

func_compress                  [ fail ]

Errors are (from /usr/home/mysqldev/cane-linuxthreads/test/mysql-cluster-5.0.6-beta-freebsd4.7-i386-linuxthreads/mysql-test/var/log/mysqltest-time) :
/usr/home/mysqldev/cane-linuxthreads/test/mysql-cluster-5.0.6-beta-freebsd4.7-i386-linuxthreads/bin/mysqltest: At line 48: unable to prepare statement 'select compress(repeat('aaaaaaaaaa', IF('', 10, 10000000))) is null': Lost connection to MySQL server during query (mysql_stmt_errno=2013 returned=1)
(the last lines may be the most important ones)

Ending Tests
Shutting-down MySQL daemon

master not cooperating with mysqladmin, will try manual kill
kill: 52799: No such process
master refused to die. Sending SIGKILL
kill: 52799: No such process

=== end of quote ===

The error message is different, but might this be the same issue as #6021 in 4.1?
We seem to have machines that cannot provide the address space required for some tests, depending on the parallel activities (only few tests fail).

How to repeat:
Run the test suite.
[30 May 2005 11:00] Joerg Bruehe
Very sorry for the bad news: It re-occurred on that box in the "cluster" build + test based on a newerChangeSet
  1.1901 05/05/26 15:21:01 joerg@mysql.com +1 -0
  Added a missing "make clean" to the RPM "spec" file which had caused the original 4.1.12 RPMs to be broken.
  (bug#10674, bug#10681)

It still has the same pattern: 
With the default threads, it occurs in the "default" test run;
with linuxthreads, it occurs in the "--ps-protocol" test run.
I have no explanation that "cluster" fails while "max" passes.

It might be that we have somehow to increase address space there.
Reducing priority, as it really seems to be an environment / load / ... issue.
[23 Nov 2005 20:08] [ name withheld ]
I ran into this problem on AIX 5.2 with 64 bit kernel, JFS2 filesystem, 1 GB RAM and 35 GB Hard Disk.

See bug #6021 about this problem too.

It doesn't look like there is problem with memory or managing the system resources of that sort.  It look a lot like a bad algorithm itself with the source code for the func_compress feature.