Bug #39471 ndb_mgmd segfaults if configured with wrong IP address
Submitted: 16 Sep 2008 7:51 Modified: 26 Mar 2009 8:54
Reporter: Ole-hjalmar Kristensen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.2, mysql-5.1-telco-6.4 bzr OS:Linux
Assigned to: jack andrews CPU Architecture:Any
Tags: segfault

[16 Sep 2008 7:51] Ole-hjalmar Kristensen
Description:
ndb_mgmd segfaults if the IP address specified in the config.ini file does not match the address of the machine it is run on. The segfault occurs when ndb_mgmd tries to report the misconfiguration, and appears to be caused by a null pointer 

#0  MgmtSrvr::alloc_node_id (this=0x9777960, nodeId=0xbfab2efe, 
    type=NDB_MGM_NODE_TYPE_MGM, client_addr=0x0, client_addr_len=0x0, 
    error_code=@0xbfab2f1c, error_string=@0xbfab2f00, log_event=1)
    at MgmtSrvr.cpp:2245
#1  0x080a5013 in MgmtSrvr (this=0x9777960, socket_server=0x9777478, 
    config_filename=0xbfab3906 "/home/ok145024/mysql-5.1-telco-6.2/install/linux/etc/config.ini", 
    connect_string=0x832bc80 "nodeid=1,urd01.norway.sun.com:31416")
    at MgmtSrvr.cpp:498
#2  0x080afb92 in main (argc=0, argv=0x97773c4) at main.cpp:233

How to repeat:
start ndb_mgmd on another machine than that which is specified in config.ini

Suggested fix:
Test for null pointer before reporting error
[16 Sep 2008 8:51] Sveta Smirnova
Thank  you for the report.

Verified as described.

Configuration file in case contained " hostname=192.168.0.3" while actual hostname is 192.168.0.4
[26 Mar 2009 8:54] jack andrews
bug is fixed in 7.0

output is now:

2009-03-26 19:51:47 [MgmSrvr] ERROR    -- The hostname this node should have according to the configuration does not match a local interface. Attempt to bind '192.168.1.95' failed with error: 99 'Cannot assign requested address'