Bug #15087 multiple failures in testsuite
Submitted: 20 Nov 2005 23:31 Modified: 14 Mar 2006 8:19
Reporter: Gottfried Haider Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.15 OS:Linux (GNU/Linux)
Assigned to: CPU Architecture:Any

[20 Nov 2005 23:31] Gottfried Haider
Description:
I tried installing mysql-4.1.15 from sources on my new-built Linux From Scratch distribution.
The following tests fail during first run: mysql_client_test, ps. And these ones during second one: join, ps_2myisam, ps_3innodb, ps_4heap, ps_5merge, type_float, type_ranges.

Using the patch from http://lists.mysql.com/internals/31491 does not cure the mysql_client_test, and I also get this with latest 5.0-snapshot.

-- Summary of the failing tests, full output (including rejects) is attached. --
failing tests default run:
[mysql_client_test] mysql_client_test.c:3571: check failed: '(int) i8_data == rc'
[ps] mysqltest: At line 670: query 'create table t1 (utext varchar(20) character set ucs2)' failed: 1115: Unknown character set: 'ucs2'

failing tests second run:
[join] mysqltest: Result length mismatch
[mysql_client_test] mysql_client_test.c:3571: check failed: '(int) i8_data == rc'
[ps] mysqltest: At line 670: query 'create table t1 (utext varchar(20) character set ucs2)' failed: 1115: Unknown character set: 'ucs2'
[ps_2myisam] mysqltest: Result length mismatch
[ps_3innodb] mysqltest: Result length mismatch
[ps_4heap] mysqltest: Result length mismatch
[ps_5merge] mysqltest: Result length mismatch
[type_float] mysqltest: Result length mismatch
[type_ranges] mysqltest: Result length mismatch
-- Summary of the failing tests, full output (including rejects) is attached. --

-- system info --
C compiler:    gcc (GCC) 4.0.2
C++ compiler:  g++ (GCC) 4.0.2
Environment:
System: Linux fibonacci 2.6.15-rc2 #1 SMP PREEMPT Sun Nov 20 12:31:55 CET 2005 i586 i586 i386 GNU/Linux
Architecture: i586

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Using built-in specs.
Target: i586-pc-linux-gnu
Configured with: ../gcc-4.0.2/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++
Thread model: posix
gcc version 4.0.2
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''  ASFLAGS=''
LIBC: 
lrwxrwxrwx 1 root root 13 Nov 14 19:41 /lib/libc.so.6 -> libc-2.3.6.so
-rwxr-xr-x 1 root root 1343002 Nov 15 00:44 /lib/libc-2.3.6.so
-rw-r--r-- 1 root root 2553428 Nov 15 00:44 /usr/lib/libc.a
-rw-r--r-- 1 root root 204 Nov 14 19:40 /usr/lib/libc.so
Configure command: ./configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/sbin' '--localstatedir=/srv/mysql' '--with-unix-socket-path=/var/run/mysql/mysql.sock' '--enable-thread-safe-client' '--without-debug' '--without-bench' '--without-readline'
-- system info --

How to repeat:
1. install mysql-4.1.15 from sources
2. ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/sbin --localstatedir=/srv/mysql --with-unix-socket-path=/var/run/mysql/mysql.sock --enable-thread-safe-client --without-debug --without-bench --without-readline
3. make
4. make test
[20 Nov 2005 23:33] Gottfried Haider
full output of failing tests (including rejects)

Attachment: 4.1.15-failingtests.txt (text/plain), 30.10 KiB.

[21 Nov 2005 18:20] Valeriy Kravchuk
Thank you for a problem report. I can try to rebuild 4.1.15 on a system more similar to yours, but on 4.1.16-BK on my old Fedora Core 1 the test works OK:

[openxs@Fedora mysql-test]$ ./mysql-test-run --force mysql_client_test
Installing Test Databases
Removing Stale Files
Installing Master Databases
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=.. --datadir=mysql-test/var/master-data --skip-innodb --skip-ndbcluster --skip-bdb
Installing Slave Databases
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=.. --datadir=mysql-test/var/slave-data --skip-innodb --skip-ndbcluster --skip-bdb
Manager disabled, skipping manager start.
Loading Standard Test Databases
Starting Tests

TEST                            RESULT
-------------------------------------------------------
mysql_client_test              [ pass ]
-------------------------------------------------------

Ending Tests
Shutting-down MySQL daemon

Master shutdown finished
Slave shutdown finished
All 1 tests were successful.

I have buiuld it from sources (ChangeSet@1.2466, 2005-11-19 12:58:22+01:00, ...) with:

[openxs@Fedora mysql-test]$ gcc --version
gcc (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[openxs@Fedora mysql-test]$ uname -a
Linux Fedora 2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST 2003 i686 i686 i386 GNU/Linux

My glibc is 2.3.2. Please, try to perform:

make install

then cd to the mysql-test subdirectory of the basedir and try to run this test alone, as I did. Please, inform about the results.
[21 Nov 2005 22:39] Gottfried Haider
Thanks for your quick response!

I installed gcc-3.3.6 in a separate directory and compiled mysql-4.1.15 with this compiler. The only error I got during the first part of the testsuite (cancelled afterwards) was the Unknown character set: 'ucs2'-one.

I first thought that this might be because of me using CXX=gcc this time, but a new build with gcc-4.0.2 verified that this didn't matter.

So I am pretty confident that the errors (except the ucs2-one) that I am seeing are either valid bugs in mysql which are triggered by the new compiler or wrong code generated by gcc-4.0.2. But something to look into imho, as gcc-4.0.2 is the lastest stable version of the compiler ;)

I am compiling a the latest gcc-4.0 snapshot right now (20051117) to see if this was fixed following the release of gcc-4.0.2..
[21 Nov 2005 23:50] Gottfried Haider
happens also with gcc-4.0.3-20051117
[22 Nov 2005 9:02] Gottfried Haider
Ok, I nailed this down.. Using gcc-3.3.6 instead of gcc-4.0.2 (or latest 4.0-snapshot) does fix the following failures in the testsuite

(standard run)
[mysql_client_test] mysql_client_test.c:3571: check failed: '(int) i8_data ==
rc'
(second run)
[join] mysqltest: Result length mismatch
[mysql_client_test] mysql_client_test.c:3571: check failed: '(int) i8_data ==
rc'
[ps_2myisam] mysqltest: Result length mismatch
[ps_3innodb] mysqltest: Result length mismatch
[ps_4heap] mysqltest: Result length mismatch
[ps_5merge] mysqltest: Result length mismatch
[type_float] mysqltest: Result length mismatch
[type_ranges] mysqltest: Result length mismatch

this is of course on the same host, same glibc et al, same configure statement.

I now installed the version compiled with gcc-3.6.6 but I am willing to try a patch ;)
[23 Nov 2005 18:35] Valeriy Kravchuk
What hardware do you use, by the way? Is it 64bit?

GCC 4.x.x is not recommended for compiling MySQL now, especially on 64bit platfroms... A lot of weird results got.
[23 Nov 2005 18:38] Valeriy Kravchuk
Oh, sorry, missed that lines in your initial post:

System: Linux fibonacci 2.6.15-rc2 #1 SMP PREEMPT Sun Nov 20 12:31:55 CET 2005 i586 i586 i386 GNU/Linux
Architecture: i586
...

Have you tried to run that specific test alone, not as a part of the "make test", as I did? Is it still failing in this case?
[23 Nov 2005 19:27] Gottfried Haider
I did run mysql_client_test alone and it failed all the time using gcc-4.0.2 or a recent gcc-4.0-snapshot.
[24 Nov 2005 11:42] Hartmut Holzgraefe
I just did a complete build and test run with gcc 4.0.2 and latest 5.0bk source
without problems, will try 4.1.15 source now.

System is running SuSE 9.3, uname -a says:

Linux linux 2.6.11.4-21.7-default #1 Thu Jun 2 14:23:14 UTC 2005 i686 i686 i386 GNU/Linux
[24 Nov 2005 20:27] Hartmut Holzgraefe
Can't reproduce with 4.1.15 on SuSE either
[25 Nov 2005 7:35] Valeriy Kravchuk
So, Hartmut was unable to repeat the problem you described with GCC 4.0.2, neither with 4.1.15, nor with 5.0-BK sources... 

Do you have any ideas on what are the possible differences among your self-built LFS and his SuSE? 2.6.15 kernel? 586 vs. 686?

Can you, please, configure again, forward the configure output to the file, gzip it and post here using File tab.

Can you try to install MySQL compiled 4.1.15 binaries on your system and try to perform the same test?
[5 Dec 2005 16:50] Tim Bishop
I'm seeing the same problem with 4.1.15 on Solaris with gcc 3.3.6:

ps                             [ fail ]

Errors are (from /u1/src/garstow/db/mysql/work/mysql-4.1.15/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 670: query 'create table t1 (utext varchar(20) character set ucs2)' failed: 1115: Unknown character set: 'ucs2'
(the last lines may be the most important ones)

Aborting: ps failed in default mode. To continue, re-run with '--force'.

Ending Tests
Shutting-down MySQL daemon

Master shutdown finished
[26 Dec 2005 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[14 Feb 2006 3:49] Thanh Nguyen
I use MySQL-Pro-Server 4.1.16 but when I run create.test script, I receive an error 'mysqltest: Result length mismatch...'. Please answer me asap. 
Thanks for your help.
[14 Feb 2006 8:19] Valeriy Kravchuk
Thanh,

I hope, you mean mysql_client_test that fails? Otherwise your problem is not related to this bug report and you should open a new one.

Try to run this test only, with --force option, and send the result. Please, use also newer version of MySQL server, 4.1.18.
[16 Feb 2006 16:36] Heiko Teichmann
I'm facing the same problem with 4.1.15 and 4.1.18 on my suse10 system (Linux 2.6.13-15-smp #1 SMP Tue Sep 13 14:56:15 UTC 2005 i686 i686 i386 GNU/Linux)

Running the test suite i got allways this error for 4.1.18:

./mysql-test-run --force mysql_client_test

TEST                            RESULT
-------------------------------------------------------
mysql_client_test              [ fail ]

Errors are (from /usr/src/mysql-4.1.18/mysql-test/var/log/mysqltest-time) :
mysql_client_test.c:3573: check failed: '(int) i8_data == rc'
mysqltest: At line 10: command "$MYSQL_CLIENT_TEST --getopt-ll-test=25600M" failed
(the last lines may be the most important ones)
[17 Feb 2006 12:30] Heiko Teichmann
I got a solution for my case (see comment before).

I had to compile the source with special gcc options, see below:

CFLAGS="-O3 -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing" \
CXXFLAGS="-O3 -fno-strict-aliasing -felide-constructors -fno-exceptions -fno-rtti -fPIC -DPIC -DUNDEF_HAVE_INITGROUPS" \

After i added that the test suite run complete through all test w/o any error.
[15 Mar 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".