Bug #22552 5.1.12-beta build on Solaris 10 - client_xml test fail with core dump
Submitted: 21 Sep 2006 16:14 Modified: 1 Oct 2012 0:05
Reporter: Mauro Mozzarelli Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Tests Severity:S1 (Critical)
Version:5.1.14, 5.1.65 OS:Any (Sun Solaris 10 Sparc)
Assigned to: CPU Architecture:Any
Tags: cc gcc solaris10 solaris 10 sparc test fail

[21 Sep 2006 16:14] Mauro Mozzarelli
Description:
Environment:

Solaris 10 on UltraSparc III with SUNWspro, built using gcc distributed with Solaris 10. Configuration as follows:

./configure             --prefix=/opt/mysql \
                        --exec-prefix=/opt/mysql \
                        --with-zlib-dir=bundled \
                        --with-plugins=partition,ndbcluster \
                        --with-ndbcluster \
                        --with-ssl=/usr/sfw/lib \
                        --without-debug \
                        --without-ndb-debug \
                        --enable-shared \
                        --localstatedir=/var/lib/mysql \
                        --with-unix-socket-path=/var/lib/mysql/mysql.sock \
                        --with-mysqld-user="mysql" \
                        --with-extra-charsets=all \
                        --with-innodb \
                        --with-berkeley-db \
                        --enable-local-infile \
                        --enable-largefile \
                        --enable-thread-safe-client \
                        --disable-dependency-tracking \
                        --with-named-thread-libs="-lpthread"

Build using "gmake -j 4" completes

When I run: "gmake test" the test fails with:

[...]
cache_innodb                   [ pass ]            422
case                           [ pass ]            138
cast                           [ pass ]            135
check                          [ pass ]           7375
client_xml                     [ fail ]

Errors are (from /export/home/dude/build/mysql/mysql-5.1.12-beta/mysql-test/var/log/mysqltest-time) :
Bus Error - core dumped
mysqltest: At line 13: command "$MYSQL_DUMP --xml --skip-create test" failed
(the last lines may be the most important ones)
Result from queries before failure can be found in r/client_xml.log

CLIENT_XML.LOG contains:

create table t1 (
`a&b` int,
`a<b` int,
`a>b` text
);
insert into t1 values (1, 2, 'a&b a<b a>b');
<?xml version="1.0"?>

<resultset statement="select * from t1
">
  <row>
        <field name="a&amp;b">1</field>
        <field name="a&lt;b">2</field>
        <field name="a&gt;b">a&amp;b a&lt;b a&gt;b</field>
  </row>
</resultset>

How to repeat:
Compile and test as described above.
[21 Sep 2006 16:20] Mauro Mozzarelli
Going further with "gmake test-force" the test fails again at:

ndb_config2                    [ pass ]            462
ndb_database                   [ pass ]           4179
ndb_dd_advance                 [ fail ]

Errors are (from /export/home/dude/build/mysql/mysql-5.1.12-beta/mysql-test/var/log/mysqltest-time) :
Bus Error - core dumped
mysqltest: At line 313: command "$MYSQL_DUMP --skip-comments --databases test > $MYSQLTEST_VARDIR/tmp/t_dump.sql" failed
(the last lines may be the most important ones)
Result from queries before failure can be found in r/ndb_dd_advance.log

Content of NDB_DD_ADVANCE.LOG is attached (too long to report here).
[21 Sep 2006 16:22] Mauro Mozzarelli
ndb_dd_advance.log

Attachment: ndb_dd_advance.log (text/x-log), 12.26 KiB.

[23 Oct 2006 9:55] Valeriy Kravchuk
Thank you for a problem report. Can you, please, try to build with Sun's C compiler (not gcc) and run tests again? We do not use gcc for building on SUN SPARC and do not have clean enough gcc environment there to check your bug report.

Side note: client_xml test runs OK with latest 5.1-BK built with gcc on Linux:

openxs@suse:~/dbs/5.1/mysql-test> ./mysql-test-run.pl --force case cast check client_xml
Logging: ./mysql-test-run.pl --force case cast check client_xml
Using binlog format 'stmt'
Using ndbcluster when necessary, mysqld supports it
Skipping SSL, mysqld not compiled with SSL
Binaries are debug compiled
Using MTR_BUILD_THREAD      = 0
Using MASTER_MYPORT         = 9306
Using MASTER_MYPORT1        = 9307
Using SLAVE_MYPORT          = 9308
Using SLAVE_MYPORT1         = 9309
Using SLAVE_MYPORT2         = 9310
Using NDBCLUSTER_PORT       = 9310
Using NDBCLUSTER_PORT_SLAVE = 9311
Using IM_PORT               = 9312
Using IM_MYSQLD1_PORT       = 9313
Using IM_MYSQLD2_PORT       = 9314
Killing Possible Leftover Processes
Removing Stale Files
Installing Master Database
Installing Master Database
Stopping All Servers
Shutting-down Instance Manager
Saving snapshot of installed databases
=======================================================
Starting Tests in the 'main' suite

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

case                           [ pass ]            218
cast                           [ pass ]            314
check                          [ pass ]           8463
client_xml                     [ pass ]            393
-------------------------------------------------------
Stopping All Servers
Shutting-down Instance Manager
All 4 tests were successful.
The servers were restarted 0 times
Spent 9.388 seconds actually executing testcases
[23 Oct 2006 11:45] Mauro Mozzarelli
I am working now on the latest trunk SVN, top lines of BK/Changelog are:
----
ChangeSet
  2006/10/20 11:15:54+02:00 gkodinov@dl145s.mysql.com
  Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
  into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt
----
This latest version fails to compile. Since the change to 5.1.13 it always failed to compile with both gcc and cc. It used to compile with both up to around the end of September (5.1.12)

I am using /opt/SUNWspro/bin/cc ; CSWautomake ; CSWautoconf

run BUILD/autorun.sh ; then configure as follows:

./configure     --prefix=/opt/mysql \
                --exec-prefix=/opt/mysql \
                --libexec=/opt/mysql/sbin \
                --with-zlib-dir=bundled \
                --with-plugins=heap,partition,innobase,ndbcluster,myisam,myisammrg,blackhole,csv,federated \
                --with-ndbcluster \
                --with-ssl=/usr/sfw \
                --without-debug \
                --without-ndb-debug \
                --enable-shared \
                --with-mysqld-user="mysql" \
                --with-extra-charsets=all \
                --with-innodb \
                --with-berkeley-db \
                --enable-local-infile \
                --enable-largefile \
                --enable-thread-safe-client \
                --disable-dependency-tracking

This fails with:
[...]
checking max indexes per table... 64
checking for row-based replication... -- including row-based replication
checking for SSL... configure: error: Could not link with SSL libs at /usr/sfw

so I change -with-ssl=/usr/sfw to -with-ssl=bundled

because just feeding ' export LDFLAGS "-L/usr/sfw/lib" ' does not work

finally I run "make" and the build fails with (hence I am stuck):

/opt/SUNWspro/bin/cc -DDEFAULT_BASEDIR=\"/opt/mysql\" -DDATADIR="\"/opt/mysql/var\"" -DDEFAULT_CHARSET_HOME="\"/opt/mysql\"" -DSHAREDIR="\"/opt/mysql/share/mysql\"" -DDEFAULT_HOME_ENV=MYSQL_HOME -DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX -DDEFAULT_SYSCONFDIR="\"/opt/mysql/etc\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../zlib -I../include -I../include -I.    -O    -DHAVE_RWLOCK_T -c safemalloc.c
/opt/SUNWspro/bin/cc -DDEFAULT_BASEDIR=\"/opt/mysql\" -DDATADIR="\"/opt/mysql/var\"" -DDEFAULT_CHARSET_HOME="\"/opt/mysql\"" -DSHAREDIR="\"/opt/mysql/share/mysql\"" -DDEFAULT_HOME_ENV=MYSQL_HOME -DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX -DDEFAULT_SYSCONFDIR="\"/opt/mysql/etc\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../zlib -I../include -I../include -I.    -O    -DHAVE_RWLOCK_T  -c -o my_new.o my_new.cc
cc: No input file specified, no output generated
make[2]: *** [my_new.o] Error 1
make[2]: Leaving directory `/export/home/mauro/build/mysql/mysql-5.1.13-beta/mysys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/home/mauro/build/mysql/mysql-5.1.13-beta'
make: *** [all] Error 2
[26 Nov 2006 14:51] Valeriy Kravchuk
Please, try to repeat with a newer version, 5.1.14-beta, and inform about the results.
[27 Nov 2006 14:34] Mauro Mozzarelli
Build with Sun cc (/opt/SUNWspro/bin/cc) fails.

Here are the first lines of BK/Changelog of the release that I am building:
-----
ChangeSet
  2006/11/23 16:21:53+01:00 mats@romeo.(none)
  BUG#24488 (Valgrind warnings on invalid read in mysql_client_binlog_statement):
  Disabling debug printouts for valgrind builds that print unallocated memory.

sql/sql_binlog.cc
  2006/11/23 16:21:48+01:00 mats@romeo.(none) +12 -0
  Disabling debug printouts for valgrind builds that print unallocated memory
------------------
Here are my environment settings:
-------
CC="/opt/SUNWspro/bin/cc"
CFLAGS=""
LDFLAGS="-L/lib -L/usr/lib -L/usr/sfw/lib -L/usr/ucblib -L/usr/local/lib -L/usr/openwin/lib -R/lib:/usr/lib:/usr/sfw/lib:/usr/ucblib:/usr/local/lib:/usr/openwin/lib"
CXX=$CC
CXXCFLAGS=$CFLAGS
CXXLDFLAGS=$LDFLAGS
export CC CFLAGS LDFLAGS CXX CXXCFLAGS
---------

Here is how I build it:

$ ./BUILD/autorun.sh
$ ./configure     --prefix=/opt/mysql \
                --exec-prefix=/opt/mysql \
                --libexec=/opt/mysql/sbin \
                --includedir=/opt/mysql/include \
                --libdir=/opt/mysql/lib \
                --with-zlib-dir=bundled \
                --with-ssl=bundled \
                --with-plugins=heap,partition,innobase,ndbcluster,myisam,myisammrg,blackhole,csv,federated \
                --without-plugin-example \
                --with-ndbcluster \
                --without-debug \
                --without-ndb-debug \
                --enable-shared \
                --with-mysqld-user="mysql" \
                --with-extra-charsets=all \
                --with-innodb \
                --with-berkeley-db \
                --enable-local-infile \
                --enable-largefile \
                --enable-thread-safe-client \
                --disable-dependency-tracking

$ make
[...]

... and here is where it fails:

[...]

/opt/SUNWspro/bin/cc -DDEFAULT_BASEDIR=\"/opt/mysql\" -DDATADIR="\"/opt/mysql/var\"" -DDEFAULT_CHARSET_HOME="\"/opt/mysql\"" -DSHAREDIR="\"/opt/mysql/share/mysql\"" -DDEFAULT_HOME_ENV=MYSQL_HOME -DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX -DDEFAULT_SYSCONFDIR="\"/opt/mysql/etc\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../zlib -I../include -I../include -I.    -O    -DHAVE_RWLOCK_T -c safemalloc.c
/opt/SUNWspro/bin/cc -DDEFAULT_BASEDIR=\"/opt/mysql\" -DDATADIR="\"/opt/mysql/var\"" -DDEFAULT_CHARSET_HOME="\"/opt/mysql\"" -DSHAREDIR="\"/opt/mysql/share/mysql\"" -DDEFAULT_HOME_ENV=MYSQL_HOME -DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX -DDEFAULT_SYSCONFDIR="\"/opt/mysql/etc\"" -DHAVE_CONFIG_H -I. -I. -I.. -I../zlib -I../include -I../include -I.    -O    -DHAVE_RWLOCK_T  -c -o my_new.o my_new.cc
cc: No input file specified, no output generated
make[2]: *** [my_new.o] Error 1
make[2]: Leaving directory `/export/home/mauro/build/mysql/mysql-5.1.14-beta/mysys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/home/mauro/build/mysql/mysql-5.1.14-beta'
make: *** [all] Error 2

PLEASE NOTE: I have to configure --with-ssl=bundled, because if I use:
--with-ssl==/usr/sfw 

configure fails with:

[...]
checking for big tables support... no
checking max indexes per table... 64
checking for row-based replication... -- including row-based replication
checking for SSL... configure: error: Could not link with SSL libs at /usr/sfw

... but it does not fail if I use "gcc" instead.

In practice, I have to compile with "gcc" because the build succeds with it and it does not with Sun "cc"

I hope this helps.
[28 Nov 2006 21:35] Mauro Mozzarelli
I tried compiling with gcc 5.1.14 beta.
I am using standard Sun gcc (SUNWgcc, which is 3.4.3).
Build succeeds, however "gmake test" now fails almost before starting as follows:

$ gmake test
cd unittest && gmake test
gmake[1]: Entering directory `/export/home/mauro/build/mysql/mysql-5.1.14-beta/unittest'
perl unit.pl run mytap mysys  ../storage/archive ../storage/blackhole ../storage/csv ../storage/federated ../storage/heap ../storage/innobase ../storage/myisam ../storage/myisammrg ../storage/ndb   ../plugin/fulltext
Running tests: mytap mysys ../storage/archive ../storage/blackhole ../storage/csv ../storage/federated ../storage/heap ../storage/innobase ../storage/myisam ../storage/myisammrg ../storage/ndb ../plugin/fulltext
mytap/t/basic-t.....ok
        2/5 skipped: Sensa fragoli
mysys/my_atomic-t...ok
mysys/base64-t......ok
mysys/bitmap-t......ok
All tests successful, 2 subtests skipped.
Files=4, Tests=3032, 27 wallclock secs (21.18 cusr + 11.22 csys = 32.40 CPU)
gmake[1]: Leaving directory `/export/home/mauro/build/mysql/mysql-5.1.14-beta/unittest'
cd mysql-test ; \
./mysql-test-run.pl  --mysqld=--binlog-format=mixed
Logging: ./mysql-test-run.pl --mysqld=--binlog-format=mixed
MySQL Version 5.1.14
Using binlog format 'mixed'
Using ndbcluster when necessary, mysqld supports it
Setting mysqld to support SSL connections
Killing Possible Leftover Processes
Removing Stale Files
Installing Master Database
Installing Master Database
Installing Slave1 Database
Creating IM password file (/export/home/mauro/build/mysql/mysql-5.1.14-beta/mysql-test/var/im.passwd)
Installing Im_mysqld_1 Database
Installing Im_mysqld_2 Database
Installing Master Cluster
mysql-test-run: *** ERROR: Failed to wait for start of ndb_mgmd
gmake: *** [test-ns] Error 1
$
[27 Dec 2006 13:59] Valeriy Kravchuk
Please, try to repeat with 5.1.14-beta's official MySQL binaries for Solaris, and inform about the results.
[28 Jan 2007 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 Aug 2012 13:11] Alex Berdennikov
have the same bug on mysql-5.1.65 when configure with source installed openssl
--with-ssl=/data/software/openssl-1.0.1c
[20 Aug 2012 6:02] Alex Berdennikov
solved 
configure openssl --shared 
and then mysql make ok

but now getting this:

This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.

key_buffer_size=16384
read_buffer_size=262144
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 49906 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x324dac0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7fff6c089448 thread_stack 0x20000
/data/software/mysql-5.1.65/libexec/mysqld(my_print_stacktrace+0x24) [0x93a8c4]
/data/software/mysql-5.1.65/libexec/mysqld(handle_fatal_signal+0x361) [0x6f88a1]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7fb8f860ecb0]
/data/software/mysql-5.1.65/libexec/mysqld(tablename_to_filename(char const*, char*, unsigned int)+0x1b) [0x6fdc0b]
/data/software/mysql-5.1.65/libexec/mysqld(build_table_filename(char*, unsigned long, char const*, char const*, char const*, unsigned int)+0x138) [0x6fde08]
/data/software/mysql-5.1.65/libexec/mysqld(Table_triggers_list::check_n_load(THD*, char const*, char const*, st_table*, bool)+0x70) [0x769040]
/data/software/mysql-5.1.65/libexec/mysqld() [0x649cbe]
/data/software/mysql-5.1.65/libexec/mysqld(open_table(THD*, TABLE_LIST*, st_mem_root*, bool*, unsigned int)+0x8d0) [0x64a820]
/data/software/mysql-5.1.65/libexec/mysqld(open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int)+0x256) [0x64ade6]
/data/software/mysql-5.1.65/libexec/mysqld(open_and_lock_tables_derived(THD*, TABLE_LIST*, bool)+0x2c) [0x64b30c]
/data/software/mysql-5.1.65/libexec/mysqld(acl_reload(THD*)+0x12a) [0x6a9e6a]
/data/software/mysql-5.1.65/libexec/mysqld(acl_init(bool)+0x109) [0x6ab409]
/data/software/mysql-5.1.65/libexec/mysqld(main+0x6a5) [0x53e2b5]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fb8f720876d]
/data/software/mysql-5.1.65/libexec/mysqld() [0x54c4d9]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): is an invalid pointer
Connection ID (thread ID): 0
Status: NOT_KILLED
[1 Sep 2012 0:05] Godofredo Miguel Solorzano
Is this bug repeatable with latest version?. Thanks.
[1 Oct 2012 1: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".