Bug #4136 AIX 5.2 make test hands after drop test
Submitted: 15 Jun 2004 0:27 Modified: 14 Oct 2004 23:55
Reporter: Evan Rempel Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:4.0.20 OS:IBM AIX (AIX 5.2)
Assigned to: Matthew Lord CPU Architecture:Any

[15 Jun 2004 0:27] Evan Rempel
Description:
With configure of

./configure \
--prefix=/usr/local/mysql-4.0.20 \
--localstatedir=/home1l/mysql/data \
--with-mysqld-user=mysql \
--without-debug \
--with-openssl=/usr/local/ssl \
--with-extra-charsets=complex \
--enable-thread-safe-client \
--enable-local-infile \
--with-named-z-libs=no \
--disable-shared \
--with-embedded-server \
--with-innodb

the product compiles using xlc_r and xlC_r but the make test hangs after the drop test.

> make test
        cd mysql-test ; ./mysql-test-run
Installing Test Databases
Removing Stale Files
Installing Master Databases
running  ../sql/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=. --datadir=./
var/master-data --skip-innodb --skip-bdb --skip-warnings --language=../sql/share/english/
040615  0:42:47  ../sql/mysqld: Shutdown Complete

Installing Slave Databases
running  ../sql/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=. --datadir=./
var/slave-data --skip-innodb --skip-bdb --skip-warnings --language=../sql/share/english/
040615  0:42:47  ../sql/mysqld: Shutdown Complete

Manager disabled, skipping manager start.
Loading Standard Test Databases
Starting Tests

 TEST                           RESULT
------------------------------------------
alias                          [ pass ]
alter_table                    [ pass ]
analyse                        [ pass ]
ansi                           [ pass ]
auto_increment                 [ pass ]
backup                         [ pass ]
bdb-alter-table-1              [ skipped ]
bdb-alter-table-2              [ skipped ]
bdb-crash                      [ skipped ]
bdb-deadlock                   [ skipped ]
bdb                            [ skipped ]
bdb_cache                      [ skipped ]
bench_count_distinct           [ pass ]
bigint                         [ pass ]
binary                         [ pass ]
bool                           [ pass ]
bulk_replace                   [ pass ]
case                           [ pass ]
cast                           [ pass ]
check                          [ pass ]
comments                       [ pass ]
compare                        [ pass ]
constraints                    [ pass ]
convert                        [ pass ]
count_distinct                 [ pass ]
count_distinct2                [ pass ]
create                         [ pass ]
ctype_cp1251                   [ pass ]
ctype_latin1_de                [ pass ]
ctype_tis620                   [ pass ]
ctype_ujis                     [ pass ]
delayed                        [ pass ]
delete                         [ pass ]
dirty_close                    [ pass ]
distinct                       [ pass ]
drop                           [ pass ]

It does not appear to be an in infinite loop as the CPU metric for the processes do not increase, and the topas display shows 99% idle.

The only thing of note might be that /home1l/mysql/data directory has not yet been created, but it shouldn't be used during the "make test"

How to repeat:
Make with the above options on an AIX 5.2 machine using IBM Visual C++ environment.

Then "make test".

Suggested fix:
none
[16 Jun 2004 21:50] Evan Rempel
Compiling with

AUTHSTATE=compat \
ODMDIR=/etc/objrepos \
LOCPATH=/usr/lib/nls/loc \
LC__FASTMSG=true \
SHELL=/usr/bin/bash \
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat \
CC=xlc_r \
CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" \
CXX=xlC_r \
CXXFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" \
./configure \
--prefix=/usr/local/mysql-4.0.20 \
--localstatedir=/home1l/mysql/data \
--with-mysqld-user=mysql \
--without-debug \
--with-openssl=/usr/local/ssl \
--with-extra-charsets=complex \
--enable-thread-safe-client \
--enable-local-infile \
--with-named-z-libs=no \
--disable-shared \
--with-embedded-server \
--with-innodb

allows the "make test" to get past the drop test.
I am curious as to why the previous compile options cause the drop test to hang.
[25 Jun 2004 2:27] Matthew Lord
Hi Evan,

I was unable to reproduce,  could you try using our build method for AIX 5.2?

CC=xlc_r CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" CXX=xlC_r CXXFLAGS="-ma 
-O2 -qstrict -qoptimize=2 -qmaxmem=8192" ./configure --prefix=/usr/local/mysql --
localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-
charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --
disable-shared --with-embedded-server --with-innodb

Best Regards
[29 Jun 2004 17:36] Evan Rempel
As my previous note indicated, compiling with the options that are listed in the "Our binary distributions are compiled with..." wich is the same as the ones you list, results in a successful make and make test.

I am concerned as to why the compiler options casue such a different behavior because these options are not really supposed to change the functionality of the application, but change the performance. None of the options shown should affect any symantics of the code.

Can you please elaborate as to why the listed options should have such a dramatic effect?
[29 Jun 2004 20:38] Matthew Lord
Hi Evan,

Of course none of the compiler flags and configure options change the source code but they all 
effect the bytcode generated.  The compiler used, the flags specified all can have a great impact on the 
binary you end up with.  I think what is the most likely culprit are the configure options rather than the
compiler flags.  If you want to try building without the compiler flags I would be interested in the 
outcome.

When I have time I will try to narrow it down a specific thing or group of them which causes the 
problem on AIX 5.2 but this is always a possibility on any OS.

Best Regards
[14 Oct 2004 15:34] Evan Rempel
If you look closely at the two builds that I provided, you will see that the only difference between one that works and one that does not work are the complier flags, not the configure flags. To me this implies that the complier flags are critical, however, as I said previously, none of those complier flags should affect functionality. As you stated, they do affect the bytecode produces, but I am concerned if the resulting binary is dependent on some bytecode ordering or subcomponent. I think that this points to an out of bounds array or runaway pointer or some other position dependent code, which from my perspective is a bug.
[14 Oct 2004 23:55] Matthew Lord
I built 4.0.21 on AIX 5.2 the way that you had specified and all tests finished successfully.  This 
looks to be resolved.