On 04/22/2010 09:02 AM, Atanu Ghosh wrote:
> Hi,
>
> The test for the nexthop being zero is in
> FastPathAttributeList<A>::load_raw_data:
>
> // if there's an NLRI, there must be a non-zero nexthop
> if (do_checks&& mp4_reach_att->nexthop() == IPv4::ZERO()) {
> uint8_t data = NEXT_HOP;
> xorp_throw(CorruptMessage,"Illegal nexthop",
> UPDATEMSGERR,
> MISSWATTR,&data, 1);
> }
>
> I don't know why it isn't being caught here.
Here is a stack trace of an assert when next-hop was 0.0.0.0.
(I added the assert instead of throwing an exception for debugging
purposes).
It's hard to tell exactly, but I think this is the case that
triggers the un-caught exception as well. Any ideas on where
the exception should be caught?
#0 0x0000003b07c332f5 in *__GI_raise (sig=<value optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
warning: (Internal error: pc 0x7f2b72192dec in read in psymtab, but not in
symtab.)
warning: (Internal error: pc 0x7f2b72192620 in read in psymtab, but not in
symtab.)
#0 0x0000003b07c332f5 in *__GI_raise (sig=<value optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x0000003b07c34b20 in *__GI_abort () at abort.c:88
#2 0x00007f2b707e16bd in xlog_fatal (module_name=0x7f2b721b3ef5 "BGP",
line=<value optimized out>, file=<value optimized out>,
function=<value optimized out>, fmt=0x7f2b70802f2c "Assertion (%s)
failed") at libxorp/xlog.c:467
#3 0x00007f2b707e175d in xlog_assert (module_name=0x1902 <Address 0x1902 out
of bounds>, line=6402, file=0x6 <Address 0x6 out of bounds>,
function=0xffffffffffffffff <Address 0xffffffffffffffff out of bounds>,
failedexpr=<value optimized out>) at libxorp/xlog.c:480
#4 0x00007f2b7210eda6 in NextHopAttribute<IPv4>::NextHopAttribute
(this=0x2229360, d=0x22288c0 "@\3\4") at bgp/path_attribute.cc:321
#5 0x00007f2b7210666a in PathAttribute::create (d=0x22288c0 "@\3\4",
max_len=<value optimized out>, l...@0x7fffc5af5fb8,
peerdata=<value optimized out>, ip_version=<value optimized out>) at
bgp/path_attribute.cc:1733
#6 0x00007f2b7211157e in FastPathAttributeList<IPv4>::find_attribute_by_type
(this=0x223ad40, type=<value optimized out>)
at bgp/path_attribute.cc:3116
#7 0x00007f2b72111692 in FastPathAttributeList<IPv4>::nexthop_att
(this=0x1902) at bgp/path_attribute.cc:2693
#8 0x00007f2b721116a1 in FastPathAttributeList<IPv4>::nexthop (this=0x1902) at
bgp/path_attribute.cc:2699
#9 0x00007f2b72179e34 in NexthopRewriteFilter<IPv4>::filter (this=0x22291e0,
rtm...@0x7fffc5af6360) at bgp/route_table_filter.cc:200
#10 0x00007f2b72176ffe in FilterVersion<IPv4>::apply_filters (this=0x21da6d0,
rtm...@0x7fffc5af6360, ref_change=1)
at bgp/route_table_filter.cc:747
#11 0x00007f2b721796d0 in FilterTable<IPv4>::apply_filters (this=0x2228cd0,
rtm...@0x7fffc5af6360, ref_change=1)
at bgp/route_table_filter.cc:1159
#12 0x00007f2b72179a15 in FilterTable<IPv4>::add_route (this=0x2228cd0,
rtm...@0x7fffc5af6360, caller=<value optimized out>)
at bgp/route_table_filter.cc:820
#13 0x00007f2b7216c2c1 in DumpTable<IPv4>::route_dump (this=0x222b400,
rtm...@0x7fffc5af6360, caller=<value optimized out>,
dump_peer=<value optimized out>) at bgp/route_table_dump.cc:193
#14 0x00007f2b7217213c in FanoutTable<IPv4>::route_dump (this=0x21f9f30,
rtm...@0x7fffc5af6360, caller=<value optimized out>, dump_peer=
0x21d8830) at bgp/route_table_fanout.cc:409
#15 0x00007f2b7213d2fc in AggregationTable<IPv4>::route_dump (this=0x21f9ea0,
rtm...@0x7fffc5af6360, caller=<value optimized out>,
dump_peer=<value optimized out>) at bgp/route_table_aggregation.cc:660
#16 0x00007f2b7218381e in PolicyTable<IPv4>::route_dump (this=0x21f89b0,
rtm...@0x7fffc5af6360, caller=<value optimized out>,
dump_peer=0x21d8830) at bgp/route_table_policy.cc:300
#17 0x00007f2b7215d6a0 in DecisionTable<IPv4>::route_dump (this=0x21f7f30,
rtm...@0x7fffc5af6360, peer=0x21d8830)
at bgp/route_table_decision.cc:866
#18 0x00007f2b72148650 in BGPRouteTable<IPv4>::route_dump (this=0x21f6db0,
rtm...@0x7fffc5af6360, peer=0x21d8830)
at bgp/route_table_base.cc:59
#19 0x00007f2b72155255 in CacheTable<IPv4>::route_dump (this=0x21fa7a0,
rtmsg=<value optimized out>, caller=<value optimized out>,
dump_peer=0x21d8830) at bgp/route_table_cache.cc:402
---Type <return> to continue, or q <return> to quit---
#20 0x00007f2b7218381e in PolicyTable<IPv4>::route_dump (this=0x21fa090,
rtm...@0x7fffc5af65a0, caller=<value optimized out>,
dump_peer=0x21d8830) at bgp/route_table_policy.cc:300
#21 0x00007f2b7218506e in PolicyTableImport<IPv4>::route_dump (this=0x21fa090,
rtm...@0x7fffc5af65a0, caller=0x6,
dump_peer=0xffffffffffffffff) at bgp/route_table_policy_im.cc:56
#22 0x00007f2b721797c1 in FilterTable<IPv4>::route_dump (this=0x21fa260,
rtm...@0x7fffc5af65a0, caller=<value optimized out>,
dump_peer=0x21d8830) at bgp/route_table_filter.cc:895
#23 0x00007f2b72192ded in RibInTable<IPv4>::dump_next_route (this=<value
optimized out>, dump_iter=<value optimized out>)
at bgp/route_table_ribin.cc:374
#24 0x00007f2b721485a6 in BGPRouteTable<IPv4>::dump_next_route (this=0x21fa260,
dump_it...@0x222b430) at bgp/route_table_base.cc:49
#25 0x00007f2b721485a6 in BGPRouteTable<IPv4>::dump_next_route (this=0x21fa090,
dump_it...@0x222b430) at bgp/route_table_base.cc:49
#26 0x00007f2b721485a6 in BGPRouteTable<IPv4>::dump_next_route (this=0x21fa7a0,
dump_it...@0x222b430) at bgp/route_table_base.cc:49
#27 0x00007f2b721485a6 in BGPRouteTable<IPv4>::dump_next_route (this=0x21f6db0,
dump_it...@0x222b430) at bgp/route_table_base.cc:49
#28 0x00007f2b7215d630 in DecisionTable<IPv4>::dump_next_route (this=<value
optimized out>, dump_it...@0x222b430)
at bgp/route_table_decision.cc:857
#29 0x00007f2b721485a6 in BGPRouteTable<IPv4>::dump_next_route (this=0x21f89b0,
dump_it...@0x222b430) at bgp/route_table_base.cc:49
#30 0x00007f2b72147699 in AggregationTable<IPv4>::dump_next_route (this=<value
optimized out>, dump_it...@0x222b430)
at bgp/route_table_aggregation.cc:568
#31 0x00007f2b721485a6 in BGPRouteTable<IPv4>::dump_next_route (this=0x21f9f30,
dump_it...@0x222b430) at bgp/route_table_base.cc:49
#32 0x00007f2b7216ad3f in DumpTable<IPv4>::do_next_route_dump (this=0x222b400)
at bgp/route_table_dump.cc:358
#33 0x00007f2b7216aef7 in DumpTable<IPv4>::get_next_message (this=0x222b400,
next_table=<value optimized out>)
at bgp/route_table_dump.cc:413
#34 0x00007f2b72177ab5 in FilterTable<IPv4>::get_next_message (this=0x2228cd0,
next_table=0x2226a70) at bgp/route_table_filter.cc:1196
#35 0x00007f2b72182e55 in PolicyTable<IPv4>::get_next_message (this=0x2226a70,
next_table=0x21da840) at bgp/route_table_policy.cc:395
#36 0x00007f2b72193f8f in RibOutTable<IPv4>::pull_next_route (this=0x21da840)
at bgp/route_table_ribout.cc:422
#37 0x00007f2b721940c3 in XorpMemberCallback0B0<bool, RibOutTable<IPv4>
>::dispatch (this=<value optimized out>)
at ./libxorp/callback_nodebug.hh:286
#38 0x00007f2b707f955e in RepeatedTaskNode2::run (this=<value optimized out>,
xorp_ta...@0x1902) at libxorp/task.cc:122
#39 0x00007f2b707f8937 in TaskList::run (this=<value optimized out>) at
libxorp/task.cc:231
#40 0x00007f2b707e54dc in EventLoop::do_work (this=0x7fffc5af6b70,
can_block=<value optimized out>) at libxorp/eventloop.cc:133
#41 0x00007f2b707e55c8 in EventLoop::run (this=0x7fffc5af6b70) at
libxorp/eventloop.cc:96
#42 0x00007f2b720bbb15 in BGPMain::main_loop (this=0x7fffc5af7060) at
bgp/bgp.cc:758
#43 0x00000000004015f8 in main (argv=0x7fffc5af73d8) at bgp/main.cc:93
Current language: auto; currently minimal
Thanks,
Ben
--
Ben Greear <[email protected]>
Candela Technologies Inc http://www.candelatech.com
_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers