Bug #51067 mysqld segv on ndbinfo access if no ndb_mgmd available
Submitted: 10 Feb 2010 18:21 Modified: 29 Mar 2010 7:03
Reporter: Matthew Montgomery Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:mysql-5.1-telco-7.1 OS:Linux
Assigned to: Jonas Oreland CPU Architecture:Any
Tags: 7.1.2-beta

[10 Feb 2010 18:21] Matthew Montgomery
Description:
Version: '5.1.41-ndb-7.1.2-beta'  socket: '/tmp/mysql71.sock'  port: 3371  Source distribution
100210 11:45:09 - mysqld got signal 11 ;
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=8384512
read_buffer_size=131072
max_used_connections=1
max_threads=151
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338307 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x1a07860
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 = 0x7f1e6f6b80e0 thread_stack 0x40000
/data/mysql/sandbox/7.1.1/libexec/mysqld(my_print_stacktrace+0x39)[0x9d8699]
/data/mysql/sandbox/7.1.1/libexec/mysqld(handle_segfault+0x355)[0x664145]
/lib/libpthread.so.0[0x7f1e75d69080]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_ZN12SignalSender9find_nodeI17FindConfirmedNodeEEtRK7BitmaskILj8EERT_+0x35)[0x9a7b85]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_ZN12SignalSender19find_confirmed_nodeERK7BitmaskILj8EE+0x11)[0x9a6bc1]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_ZN20NdbInfoScanOperation14find_next_nodeEv+0x18)[0x976ef8]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_ZN20NdbInfoScanOperation7executeEv+0x48)[0x9771a8]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_ZN7NdbInfo19load_ndbinfo_tablesEv+0xc2)[0x9a4a92]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_ZN7NdbInfo11load_tablesEv+0x11)[0x9a4e31]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_ZN7NdbInfo12check_tablesEv+0x40)[0x9a4eb0]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_ZN7NdbInfo9openTableEPKcPPKNS_5TableE+0x39)[0x9a4ff9]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_ZN10ha_ndbinfo4openEPKcij+0x69)[0x823009]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_ZN7handler7ha_openEP8st_tablePKcii+0x9d)[0x75979d]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_Z21open_table_from_shareP3THDP14st_table_sharePKcjjjP8st_table15open_table_mode+0x5b4)[0x6b6d54]
/data/mysql/sandbox/7.1.1/libexec/mysqld[0x6b057b]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_Z10open_tableP3THDP10TABLE_LISTP11st_mem_rootPbj+0x5bc)[0x6b1e0c]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_Z11open_tablesP3THDPP10TABLE_LISTPjj+0x6a4)[0x6b2cb4]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_Z30open_normal_and_derived_tablesP3THDP10TABLE_LISTj+0x1f)[0x6b2e7f]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_Z18mysqld_list_fieldsP3THDP10TABLE_LISTPKc+0x24)[0x78d2d4]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xf81)[0x67bcf1]
/data/mysql/sandbox/7.1.1/libexec/mysqld(_Z10do_commandP3THD+0xee)[0x67c5de]
/data/mysql/sandbox/7.1.1/libexec/mysqld(handle_one_connection+0x23d)[0x66e8bd]
/lib/libpthread.so.0[0x7f1e75d613ba]
/lib/libc.so.6(clone+0x6d)[0x7f1e74dd2fcd]
Trying Some pointers may be invalid and cause the dump to abort...
thd->query at 0x1a60dd8 =
thd->thread_id=3
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
100210 11:45:09 mysqld_safe Number of processes running now: 0
to get some variables.

How to repeat:
Start mysqld with --ndbcluster but do provide a valid --ndb-connectstring or have a running ndb_mgmd available

$ mysql ndbinfo

Suggested fix:
Gracefully handle having no ndb_mgmd connection.
[10 Feb 2010 18:24] MySQL Verification Team
Sorry, "How to repeat" should read : do *NOT* provide a valid --ndb-connectstring or have a
running ndb_mgmd available
[23 Mar 2010 11:51] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/104077

3472 Jonas Oreland	2010-03-23
      ndb - bug#51067 - fix ndbinfo wo/ connection to ndb_mgmd, create ClusterMgr as part of creating TransporterFacede
[23 Mar 2010 11:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/104078

3473 Jonas Oreland	2010-03-23
      ndb - bug#51067 - fix ndbinfo wo/ connection to ndb_mgmd, create ClusterMgr as part of creating TransporterFacede
[23 Mar 2010 11:59] Jonas Oreland
pushed to 7.1.3
[29 Mar 2010 7:03] Jon Stephens
Documented in the NDB-7.1.3 changelog as follows:

      A mysqld, when attempting to access the ndbinfo database, crashed if 
      could not contact the management server.

Closed.