[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-users
Subject:    Re: Segfault on 5.4.2.1 (Redhat) when using DISMAN-SCHEDULE-MIB cron
From:       Max <perldork () webwizarddesign ! com>
Date:       2009-09-30 15:14:45
Message-ID: f7aebadd0909300814y12852827j205b38d79589fcfd () mail ! gmail ! com
[Download RAW message or body]

Hi,

I found and fixed the crash in the DISMAN-SCHEDULE-MIB handler, will
post the bug and the fix i found this week (bug due to a developer
passing an inline conditional to a macro that they probably thought
was a function) in the file

agent/mibgroup/disman/schedule/schedCore.c

So now I am seeing this under debug with my periodic event, which is
registered as a pass_persist handler that again can be set just fine
from the command line:

disman:schedule:callback: assignment
SNMPv2-SMI::enterprises.17270.12.2.1.1.2.1.1.1 = 1
disman:schedule:callback: assignment failed (5)
disman:schedule:time: periodic: (1254323177) Wed Sep 30 15:06:17 2009
disman:schedule:callback: assignment
SNMPv2-SMI::enterprises.17270.12.2.1.1.2.1.1.1 = 1
disman:schedule:callback: assignment failed (5)
disman:schedule:time: periodic: (1254323182) Wed Sep 30 15:06:22 2009
disman:schedule:callback: assignment
SNMPv2-SMI::enterprises.17270.12.2.1.1.2.1.1.1 = 1
disman:schedule:callback: assignment failed (5)
disman:schedule:time: periodic: (1254323187) Wed Sep 30 15:06:27 2009
disman:schedule:callback: assignment
SNMPv2-SMI::enterprises.17270.12.2.1.1.2.1.1.1 = 1
disman:schedule:callback: assignment failed (5)

The error code 5 is:

#define SNMP_ERR_GENERR                 (5)

Which is coming from

ret = netsnmp_query_set( &assign, entry->session );

in

agent/mibgroup/disman/schedule/schedCore.c

My schedule entry and handler:

repeat 5 .1.3.6.1.4.1.17270.12.2.1.1.2.1.1.1 = 1
pass_persist 1.3.6.1.4.1.17270.12.2.1.1
/opt/path/snmp/pass_persist/bin/dispatcher.pl
/opt/path/snmp/pass_persist/etc/dispatcher.conf

If I run from the command line I get the response I expect:

OID=.1.3.6.1.4.1.17270.12.2.1.1.2.1.1.1
snmpset -c local -v 2c -m XXXXX-MIB \
           -t 30 localhost $OID i 1

XXXXX-MIB::h2hctStartRun.0 = INTEGER: 1

And I see the custom code we have in our pass_persist handler running
as expected.

As with the scheduler bug (again, will create a bug report and include
the local patch we have done for that to the bug tracker sytem) I am
happy to try to track this down myself, but if anyone on the list has
an idea off the bat of why this might not be working that would
certainly make it easier for me to find and hopefully fix the root
cause :).

- Max

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic