[Xorp-hackers] XORP crash

Igor Maravić igorm at etf.rs
Thu Jun 14 06:56:40 PDT 2012


Works for me! :)
But i just got one comment -
resize() and reserve() do allocate memory for vector, but when memory
is allocated with reserve, vector is still empty. If you call size()
on it, it will return 0. Function reserve() should be used when You
intend to use push_back(), to avoid reallocation of vector memory.
Otherwise you should use resize().
Because vector was "empty", when the resize() was called at the end of
the function, all vector memory was set to some default values.
That's why I think You should remove the TODO comment.
BR
Igor

2012/6/14 Ben Greear <greearb at candelatech.com>:
> On 06/13/2012 12:36 AM, Igor Maravić wrote:
>>
>> Yes, crash was introduced with one of your recent commits.
>> BR
>> Igor
>
>
> I just pushed a fix for this (on my machine).  Please let me know
> if top-of-tree works for you now.  I wanted to get this fixed before
> applying your patches...
>
> Thanks,
> Ben
>
>
>>
>> 2012/6/12 Ben Greear<greearb at candelatech.com>:
>>>
>>> On 06/12/2012 02:04 AM, Igor Maravić wrote:
>>>>
>>>>
>>>> Ben,
>>>> this is the log that I get without your patches:
>>>
>>>
>>>
>>> So this crash was introduced recently when I mucked with
>>> the fea netlink code?
>>>
>>> Thanks,
>>> Ben
>>>
>>>
>>>>
>>>> ---
>>>> XORP 1.8.6-WIP BuildInfo:
>>>> git version: c01d327 built: Tue Jun 12 10:31:33 CEST 2012
>>>> By: igor on machine: Linux igor 3.2.0-mpls-no-dbg+ x86_64 x86_64
>>>> Recent git changes:
>>>> c01d3271 UNDER CONSTRUCTION
>>>> c603fc64 xorp: policy: Fix usage of network{4,6}-lists
>>>> 97d46f39 xorp: rib: Fixed register test
>>>>
>>>> [ 2012/06/12 11:01:22.464462  INFO xorp_rtrmgr:13663 RTRMGR
>>>> rtrmgr/main_rtrmgr.cc:754 main ]
>>>> Host Information:
>>>> Linux igor 3.2.0-mpls-no-dbg+ #18 SMP Mon Jun 4 17:10:57 CEST 2012
>>>> x86_64 x86_64 x86_64 GNU/LinuxUbuntu 11.10 \n \l
>>>>
>>>> [ 2012/06/12 11:01:22.539270  WARNING xorp_rtrmgr:13663 RTRMGR
>>>> rtrmgr/xrldb.cc:204 XRLdb ] XRLdb validation is enabled.
>>>> [ 2012/06/12 11:01:22.851778  INFO xorp_rtrmgr:13663 RTRMGR
>>>> rtrmgr/master_conf_tree.cc:257 execute ] Changed modules: interfaces,
>>>> firewall, fea
>>>> [ 2012/06/12 11:01:22.852664  INFO xorp_rtrmgr:13663 RTRMGR
>>>> rtrmgr/module_manager.cc:101 execute ] Executing module: interfaces
>>>> (xorp_fea)
>>>> [ 2012/06/12 11:01:22.854012  WARNING xorp_rtrmgr:13663
>>>> XrlFinderTarget
>>>> obj/x86_64-unknown-linux-gnu/xrl/targets/finder_base.cc:1066
>>>> callback_finder_0_2_resolve_xrl ] Handling method for
>>>> finder/0.2/resolve_xrl failed: XrlCmdError 102 Command failed Target
>>>> "fea" does not exist or is not enabled.
>>>> [ 2012/06/12 11:01:22.854253  WARNING xorp_rtrmgr:13663 RTRMGR
>>>> rtrmgr/task.cc:215 xrl_done ] Failed to receive reply, code: 201
>>>> Resolve failed  retries: 0  max_retries: 30
>>>> [ 2012/06/12 11:01:23.858789  INFO xorp_fea:13668 MFEA
>>>> fea/mfea_node.cc:295 enable ] MFEA enabled
>>>> [ 2012/06/12 11:01:23.858921  INFO xorp_fea:13668 MFEA
>>>> fea/mfea_node_cli.cc:126 enable ] CLI enabled
>>>> [ 2012/06/12 11:01:23.859318  INFO xorp_fea:13668 MFEA
>>>> fea/mfea_node_cli.cc:92 start ] CLI started
>>>> [ 2012/06/12 11:01:23.859333  INFO xorp_fea:13668 MFEA
>>>> fea/mfea_node.cc:295 enable ] MFEA enabled
>>>> [ 2012/06/12 11:01:23.859345  INFO xorp_fea:13668 MFEA
>>>> fea/mfea_node_cli.cc:126 enable ] CLI enabled
>>>> [ 2012/06/12 11:01:23.859441  INFO xorp_fea:13668 MFEA
>>>> fea/mfea_node_cli.cc:92 start ] CLI started
>>>> [ 2012/06/12 11:01:23.874869  WARNING xorp_fea:13668 FEA
>>>> fea/data_plane/ifconfig/ifconfig_get_netlink_socket.cc:149
>>>> try_read_config_one ] NOTE:  Netlink get single network device works
>>>> on this system.
>>>> [ 2012/06/12 11:01:23.880360  WARNING xorp_fea:13668 FEA
>>>> fea/ifconfig.cc:818 pull_config ] ERROR:  pull_config_one for
>>>> interface: vmnet1 failed: -1
>>>> [ 2012/06/12 11:01:23.880411  WARNING xorp_fea:13668 FEA
>>>> fea/ifconfig.cc:821 pull_config ] ERROR:  Could not find interface:
>>>> vmnet1 after pull_config_one.
>>>> [ 2012/06/12 11:01:23.968857  INFO xorp_rtrmgr:13663 RTRMGR
>>>> rtrmgr/module_manager.cc:101 execute ] Executing module: firewall
>>>> (xorp_fea)
>>>> [ 2012/06/12 11:01:23.970999  INFO xorp_rtrmgr:13663 RTRMGR
>>>> rtrmgr/module_manager.cc:101 execute ] Executing module: fea
>>>> (xorp_fea)
>>>> [ 2012/06/12 11:01:23.973557  INFO xorp_rtrmgr:13663 RTRMGR
>>>> rtrmgr/task.cc:2242 run_task ] No more tasks to run
>>>>
>>>> ---
>>>>
>>>> vmnet1 isn't present, and because of that it couldn't be found on
>>>> system.
>>>>
>>>> This is my config:
>>>> ---
>>>> interfaces {
>>>>         interface "eth2" {
>>>>                 disable: false
>>>>                 default-system-config
>>>>         }
>>>>         interface "vmnet1" {
>>>>                 disable: false
>>>>                 default-system-config
>>>>         }
>>>> }
>>>> fea {
>>>>         unicast-forwarding4 {
>>>>                 disable: false
>>>>         }
>>>> }
>>>> ---
>>>> BR
>>>> Igor
>>>
>>>
>>>
>>>
>>> --
>>> Ben Greear<greearb at candelatech.com>
>>> Candela Technologies Inc  http://www.candelatech.com
>>>
>
>
> --
> Ben Greear <greearb at candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
>



More information about the Xorp-hackers mailing list