Bug #38677 ndb_mgm segfaults if ndb_mgmd goes away and a command is sent
Submitted: 8 Aug 2008 19:19 Modified: 24 Nov 2008 3:20
Reporter: Andrew Hutchings Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:6.3.16 OS:Linux (Ubuntu Hardy)
Assigned to: Assigned Account CPU Architecture:Any

[8 Aug 2008 19:19] Andrew Hutchings
Description:
When using ndb_mgm and ndb_mgmd is killed a further command issued in the console for ndb_mgm causes it to segfault.

Backtrace:

#0  0xb7f7c410 in __kernel_vsyscall ()
#1  0xb7f5fe38 in send () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x08080e9b in write_socket ()
#3  0x0808116f in vprintln_socket ()
#4  0x0807e7b6 in SocketOutputStream::println ()
#5  0x08073fcb in ndb_mgm_check_connection ()
#6  0x08070ec2 in CommandInterpreter::execute_impl ()
#7  0x08071441 in CommandInterpreter::execute ()
#8  0x080715ae in Ndb_mgmclient::execute ()
#9  0x0806987d in _start ()

How to repeat:
1. Run ndb_mgm
2. killall ndb_mgmd
3. Enter 'show' on the ndb_mgm console
4. Segfault
[9 Aug 2008 9:52] Hartmut Holzgraefe
Tried on Ubuntu 8.04 (32bit) and RHEL4 (64bit) but can't reproduce
[9 Aug 2008 10:25] Andrew Hutchings
If it is any help, this is my cluster.ini file:

[ndbd default]
NoOfReplicas= 1

[mysqld  default]
[ndb_mgmd default]
[tcp default]

[ndb_mgmd]
HostName= 127.0.0.1

[ndbd]
HostName= 127.0.0.1
DataDir= /var/lib/mysql-cluster

[mysqld]
[mysqld]
[mysqld]

When running through gdb its only re-producible for me about 50% of the time.  I am currently running the Ubuntu Hardy 32bit packages on launchpad.
[11 Aug 2008 12:07] Andrew Hutchings
I missed a step in my initial bug report:

How to repeat:
1. Run ndb_mgm
2. Enter 'show' on the ndb_mgm console
3. killall ndb_mgmd
4. Enter 'show' on the ndb_mgm console
5. Segfault

Without step 2 it isn't actually connected to the management node.
[24 Oct 2008 3:20] Guangbao Ni
Did not manage to verify in latest 6.3 tree, please check
if this is still a problem.
[25 Nov 2008 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".