Comment 1 for bug 1646407

Revision history for this message
Tapan Karwa (tkarwa) wrote :

Very strange core.

Its says
Program terminated with signal SIGSEGV, Segmentation fault.

#1 0x00000000004a2ebf in IFMapServer::ClientRegister (this=0x7ffc81de5ba0, client=
    0x7f9af472afe0) at controller/src/ifmap/ifmap_server.cc:224

The code is:
    cm_ret = client_map_.insert(make_pair(client->identifier(), client));
But, everything in this line of code is fine in the core. So, cant see how it can crash here because of segv.

One wild guess is that this could be related to bug 1643486 which Ananth is fixing since this code hasnt changed for years and there is no reason it will crash at the location shown by the bt.

Here,
(gdb) p *client
$12 = {
  _vptr.IFMapClient = 0x7f9af49945a0,
  static kIndexInvalid = -1,
  index_ = -192835104, <<<< not set yet since we are at line 224
  exporter_ = 0x0,
  msgs_sent_ = 0,
  msgs_blocked_ = 0,
  bytes_sent_ = 0,
  update_nodes_sent_ = 0,
  delete_nodes_sent_ = 0,
  update_links_sent_ = 0,
  delete_links_sent_ = 0,
  send_is_blocked_ = false,
  vm_map_ = std::map with 0 elements,
  name_ = "nodei27:192.168.1.8",
  created_at_ = 1480566217126441
}

(gdb) p client_map_
$13 = std::map with 5 elements = {
  ["default-global-system-config:nodei11"] = 0x7f9afc739f00,
  ["default-global-system-config:nodei37"] = 0x7f9b008cacb0,
  ["default-global-system-config:nodei6"] = 0x7f9ab49cb750,
  ["default-global-system-config:nodei8"] = 0x7f9ac497db80,
  ["default-global-system-config:nodel7"] = 0x7f9b047de870
}

(gdb) p *(IFMapXmppChannel::IFMapSender *) 0x7f9af472afe0
$10 = {
  <IFMapClient> = {
    _vptr.IFMapClient = 0x7f9af49945a0,
    static kIndexInvalid = -1,
    index_ = -192835104,
    exporter_ = 0x0,
    msgs_sent_ = 0,
    msgs_blocked_ = 0,
    bytes_sent_ = 0,
    update_nodes_sent_ = 0,
    delete_nodes_sent_ = 0,
    update_links_sent_ = 0,
    delete_links_sent_ = 0,
    send_is_blocked_ = false,
    vm_map_ = std::map with 0 elements,
    name_ = "nodei27:192.168.1.8",
    created_at_ = 1480566217126441
  },
  members of IFMapXmppChannel::IFMapSender:
  parent_ = 0x7f9af43a6d00,
  hostname_ = "nodei38",
  identifier_ = "default-global-system-config:nodei38"
}