[Xorp-hackers] xorp_fea crashes when interface is removed from OS at in-opportune time.

Ben Greear greearb at candelatech.com
Fri Oct 19 20:06:51 PDT 2007


Ben Greear wrote:
> Seems xorp is very fragile when it comes to adding/deleting
> interfaces.  I think a lot of these errors should just be warnings,
> not asserts.

Here's another one:

===================================================================
RCS file: /cvs/xorp/fea/data_plane/control_socket/netlink_socket_utilities.cc,v
retrieving revision 1.7
diff -u -r1.7 netlink_socket_utilities.cc
--- netlink_socket_utilities.cc 27 Sep 2007 00:33:35 -0000      1.7
+++ netlink_socket_utilities.cc 20 Oct 2007 03:05:31 -0000
@@ -333,8 +333,9 @@
         name = if_indextoname(if_index, name_buf);
  #endif
         if (name == NULL) {
-           XLOG_FATAL("Could not find interface corresponding to index %d",
+           XLOG_ERROR("Could not find interface corresponding to index %d, maybe it was just deleted?",
                        if_index);
+           return XORP_ERROR;
         }
         if_name = string(name);
      }


(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x49d42ee9 in raise () from /lib/libc.so.6
#2  0x49d444f1 in abort () from /lib/libc.so.6
#3  0x08287669 in xlog_fatal (module_name=Could not find the frame base for "xlog_fatal".
) at xlog.c:435
#4  0x08148863 in NlmUtils::nlm_get_to_fte_cfg (iftree=@0x77c06ef4, fte=@0x77bfcba8, nlh=0x8472500, rtmsg=0x8472510,
     rta_len=40) at netlink_socket_utilities.cc:336
#5  0x0810d421 in FibConfigTableGetNetlinkSocket::parse_buffer_netlink_socket (family=2, iftree=@0x77c06ef4,
     fte_list=@0x77bfeb48, buffer=@0x77c00b64, is_nlm_get_only=false) at fibconfig_table_parse_netlink_socket.cc:122
#6  0x0810c6cb in FibConfigTableObserverNetlinkSocket::receive_data (this=0x842eab8, buffer=@0x77c00b64)
     at fibconfig_table_observer_netlink_socket.cc:131
#7  0x0810c5a7 in FibConfigTableObserverNetlinkSocket::netlink_socket_data (this=0x842eab8, buffer=@0x77c00b64)
     at fibconfig_table_observer_netlink_socket.cc:160
#8  0x08145926 in NetlinkSocket::force_recvmsg (this=0x842eac8, flags=0, only_kernel_messages=true,
     error_msg=@0x77c02b20) at netlink_socket.cc:534
#9  0x08145b87 in NetlinkSocket::io_event (this=0x842eac8, fd={_filedesc = 43}, type=IOT_READ) at netlink_socket.cc:547
#10 0x08147808 in XorpMemberCallback2B0<void, NetlinkSocket, XorpFd, IoEventType>::dispatch (this=0x843b8a8, a1=
       {_filedesc = 43}, a2=IOT_READ) at ../../../libxorp/callback_nodebug.hh:4635
#11 0x082a8766 in SelectorList::Node::run_hooks (this=0x8474dac, m=SEL_RD, fd={_filedesc = 43}) at selector.cc:149
#12 0x082a73d1 in SelectorList::wait_and_dispatch (this=0x77c07b34, timeout=@0x77c06c20) at selector.cc:435
#13 0x0828e570 in EventLoop::run (this=0x77c07af8) at eventloop.cc:123
#14 0x0804d192 in fea_main (finder_hostname=@0x77c07d10, finder_port=19999) at xorp_fea.cc:101
#15 0x0804d478 in main (argc=0, argv=0x77c07dd8) at xorp_fea.cc:175
(gdb) frame 4
#4  0x08148863 in NlmUtils::nlm_get_to_fte_cfg (iftree=@0x77c06ef4, fte=@0x77bfcba8, nlh=0x8472500, rtmsg=0x8472510,
     rta_len=40) at netlink_socket_utilities.cc:336
336     netlink_socket_utilities.cc: No such file or directory.
         in netlink_socket_utilities.cc
(gdb) print if_index
$1 = 955
(gdb)


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list