Bug #47111 Source build of cluster mysqld segfaults
Submitted: 3 Sep 2009 18:34 Modified: 22 Mar 2010 19:35
Reporter: Andrew Hutchings Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:mysql-5.1-telco-7.0 OS:Linux (Ubuntu 9.04)
Assigned to: CPU Architecture:Any
Tags: 7.0.6

[3 Sep 2009 18:34] Andrew Hutchings
Description:
When compiling a basic source build with --with-debug and --with-plugins=ndbcluster and trying to run mysqld it will instantly segfault, backtrace is as follows:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fd174669700 (LWP 29085)]
memset (__dest=0xd95171, __ch=48, __len=1) at /usr/include/bits/string3.h:85
85	  return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
(gdb) bt
#0  memset (__dest=0xd95171, __ch=48, __len=1)
    at /usr/include/bits/string3.h:85
#1  0x0000000000882e91 in memset (__dest=0xd95171, __ch=48, __len=1)
    at /usr/include/bits/string3.h:85
#2  0x0000000000882e91 in memset (__dest=0xd95171, __ch=48, __len=1)
    at /usr/include/bits/string3.h:85
#3  0x0000000000882e91 in memset (__dest=0xd95171, __ch=48, __len=1)
    at /usr/include/bits/string3.h:85

And on forever...

Repeated on both 9.04 32bit and 64bit.  Using scripts in BUILD works fine.

How to repeat:
./configure --with-debug --with-plugins=ndbcluster --prefix=(install dir)
make
make install
(install dir)/libexec/mysqld

BANG!
[3 Sep 2009 19:18] Jonas Oreland
what compiler is used on ubuntu 9.0.4
[3 Sep 2009 19:20] Andrew Hutchings
Valgrind reports a stack overflow
[3 Sep 2009 19:20] Andrew Hutchings
Jonas: GCC 4.3.3
[7 Sep 2009 11:30] Hartmut Holzgraefe
The call stack looks as if it has been overwritten (as memset() does not recursively call itself) and the crash seems to happen even before main() is called so it looks as if it is in some object initialization code or something?
[22 Feb 2010 19:35] Jonas Oreland
still active ?
[23 Mar 2010 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".