Sorry, but my message got sent before I actually finished it.
I'll try again:


>  Hi All,
>
> I'm using linux (kernel 2.6.18) and have net-snmp 5.4.2.1 installed.
> I've configured link up link down trap with adding the following lines to
> snmpd.conf:
>
> notificationEvent  linkUpTrap    linkUp   ifIndex ifAdminStatus
> ifOperStatus
> notificationEvent  linkDownTrap  linkDown ifIndex ifAdminStatus
> ifOperStatus
> monitor  -S -r 1 -e linkUpTrap   "Generate linkUp" ifOperStatus != 2
> monitor  -S -r 1 -e linkDownTrap "Generate linkDown" ifOperStatus == 2
>
> (agentSecName was defined too).
>
> I noticed that when I'm "playing" with the interfaces, the snmpd is
> crashing, generating a huge core.
> I've mainley noticed that it happens when adding / editing / removing
> vlans.
> The cores are all started with linkup linkdown trap, ended in different
> ways - only the top 3 frames are included:
>
> 1. #0  0x00efa1eb in strncmp () from /lib/libc.so.6
>     #1  0x0048c402 in _arch_interface_flags_v6_get (
>     container=<value optimized out>, load_flags=<value optimized out>)
>     at if-mib/data_access/interface_linux.c:280
>     #2  netsnmp_arch_interface_container_load (container=<value optimized
> out>,
>     load_flags=<value optimized out>)
>     at if-mib/data_access/interface_linux.c:693
>
>
   2.#0  0xf79821eb in strncmp () from /lib/libc.so.6
#1  0xf7e45b12 in netsnmp_access_interface_ioctl_has_ipv4 (sd=15,
if_name=0xffeb55c6 "Lan8", if_index=0, flags=0xffeb54c0)
    at if-mib/data_access/interface_ioctl.c:461
#2  0xf7e442a5 in netsnmp_arch_interface_container_load (container=<value
optimized out>, load_flags=0)
    at if-mib/data_access/interface_linux.c:557

   3. #0  0x00db6afa in netsnmp_binary_array_clear (container=0x95f6ae0,
f=0x165320 <udpEndpointTable_indexes_set+96>, context=0x0)
    at container_binary_array.c:327
#1  _ba_clear (container=0x95f6ae0, f=0x165320
<udpEndpointTable_indexes_set+96>, context=0x0)
    at container_binary_array.c:518
#2  0x001653ce in udpEndpointTable_indexes_set (rowreq_ctx=0x95f6ae0,
udpEndpointLocalAddressType_val=0,
    udpEndpointLocalAddress_val_ptr=0x4 <Address 0x4 out of bounds>,
udpEndpointLocalAddress_val_ptr_len=25,
    udpEndpointLocalPort_val=0, udpEndpointRemoteAddressType_val=24,
udpEndpointRemoteAddress_val_ptr=0x0,
    udpEndpointRemoteAddress_val_ptr_len=13706328,
udpEndpointRemotePort_val=13807604, udpEndpointInstance_val=13812000)
    at udp-mib/udpEndpointTable/udpEndpointTable.c:325

>
> --------------------------
>


>  Note that it is not happenning all the time - it is hard to reproduce
> but still, its crashing the deamon.
> I'm guessing that maybe it's a race condition between the interfaces
> modification and the traversal of the interfaces table prior the sending of
> the trap.
>
> Does anyone encountered this issue?
>

Thanks a lot for the help,
Zohar.




On Wed, May 9, 2012 at 12:41 PM, Zohar M <[email protected]> wrote:

>  Hi All,
>
> I'm using linux (kernel 2.6.18) and have net-snmp 5.4.2.1 installed.
> I've configured link up link down trap with adding the following lines to
> snmpd.conf:
>
> notificationEvent  linkUpTrap    linkUp   ifIndex ifAdminStatus
> ifOperStatus
> notificationEvent  linkDownTrap  linkDown ifIndex ifAdminStatus
> ifOperStatus
> monitor  -S -r 1 -e linkUpTrap   "Generate linkUp" ifOperStatus != 2
> monitor  -S -r 1 -e linkDownTrap "Generate linkDown" ifOperStatus == 2
>
> (agentSecName was defined too).
>
> I noticed that when I'm "playing" with the interfaces, the snmpd is
> crashing, generating a huge core.
> I've mainley noticed that it happens when adding / editing / removing
> vlans.
> The cores are all started with linkup linkdown trap, ended in different
> ways:
>
> 1. #0  0x00efa1eb in strncmp () from /lib/libc.so.6
> #1  0x0048c402 in _arch_interface_flags_v6_get (
>     container=<value optimized out>, load_flags=<value optimized out>)
>     at if-mib/data_access/interface_linux.c:280
> #2  netsnmp_arch_interface_container_load (container=<value optimized out>,
>     load_flags=<value optimized out>)
>     at if-mib/data_access/interface_linux.c:693
>
>
>
> Note that it is not happenning all the time - it is hard to reproduce but
> still its crashing the deamon.
> I'm guessing that maybe it's a race condition between the interfaces
> modification and the traversal of the interfaces table prior the sending of
> the trap.
>
> Does anyone encountered this issue?
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to