hi dave,

> The most useful thing would be a stack trace of exactly where it has got 
> to.
> Try 'bt'
> 
> I'm not 100% convinced by that source listing.

ok, here's output from both 'list' and 'bt':

[...]
Loaded symbols for /lib64/libnss_files.so.2
0x00002b9ec1fbe6a5 in strlen () from /lib64/libc.so.6
(gdb) bt
#0  0x00002b9ec1fbe6a5 in strlen () from /lib64/libc.so.6
#1  0x00002b9ec19fed9d in snmp_strcat (buf=0x7fffe92142d0,
     buf_len=0x7fffe92142c8, out_len=0x7fffe92142c0, allow_realloc=1,
     s=0x7fffe9214200 "0") at tools.c:175
#2  0x00002b9ec19cdec6 in sprint_realloc_octet_string (buf=0x7fffe92142d0,
     buf_len=0x7fffe92142c8, out_len=0x7fffe92142c0, allow_realloc=1,
     var=0x2161cb0, enums=0x0, hint=0x1d4e521 "", units=0x0) at mib.c:525
#3  0x00002b9ec19d03dd in sprint_realloc_variable (buf=0x7fffe92142d0,
     buf_len=0x7fffe92142c8, out_len=0x7fffe92142c0, allow_realloc=1,
     objid=<value optimized out>, objidlen=<value optimized out>,
     variable=0x2161cb0) at mib.c:3270
#4  0x00002b9ec19d052f in fprint_variable (f=0x2b9ec2176780, 
objid=0x2161ce0,
     objidlen=19, variable=0x2161cb0) at mib.c:3340
#5  0x0000000000401457 in main (argc=<value optimized out>,
     argv=<value optimized out>) at snmpbulkwalk.c:301
(gdb) list
174                     exit(1);
175                 }
176             }
177             break;
178         }
179     }
180
181     int
182     main(int argc, char *argv[])
183     {
(gdb)


> Have a look at the output when the walk hangs.
> You said that it's not exactly the same place each time.
> Does it tend to be in roughly the same area?  The same MIB file, perhaps?
> 
> Dave

ahh, yes, of course

ok, after some poking ... yes, the walk hangs in different places ... 
but always within the same MIB.  remove that MIB file ... and presto! 
the walk completes just fine.  that's with all ~1300 other MIB files loaded

[BTW:  am i doing something unusual by having this number of MIB files? 
  this feels normal to me ... i have gear from lots of manufacturers ... 
so of course i have lots of MIB files.  or do most folks just enable a 
subset of MIB files at a time, depending on what device they are 
querying?  if i'm pushing net-snmp's MIB compiler past its design 
limits, i'd like to know that ... not sure that i'd change my behavior 
... :) ... but i'd at least like to know that i'm flying higher than the 
designers intended the plane to fly]

i grabbed the latest copy of this MIB file from the manufacturer 
(CISCO-FLASH-MIB) ... same problem

ok, so there's something gross inside this MIB file

i ran "snmptranslate -D ALL" and then searched the output ... here are 
some snippets:

[...]
read_config:initmib: using mibdirs: 
+/opt/vdops/share/snmp/mibs:/opt/vdops/share
/snmp/mibs/Apple:/opt/vdops/share/snmp/mibs/ADIC:/opt/vdops/share/snmp/mibs/APC:
/opt/vdops/share/snmp/mibs/Axis:/opt/vdops/share/snmp/mibs/BlackBerry:/opt/vdops
/share/snmp/mibs/BlueArc:/opt/vdops/share/snmp/mibs/Brocade:/opt/vdops/share/snm
p/mibs/Broadcom:/opt/vdops/share/snmp/mibs/CheckPoint
trace: read_config(): read_config.c, 780:
read_config: /opt/vdops/etc/snmp/snmp.conf:14 examining: mibdirs 
+/opt/vdops/share/snmp/mibs/Cisco
trace: run_config_handler(): read_config.c, 482:
read_config: Found a parser.  Calling it: mibdirs / 
+/opt/vdops/share/snmp/mibs/Cisco
trace: handle_mibdirs_conf(): mib.c, 2092:
read_config:initmib: using mibdirs: 
+/opt/vdops/share/snmp/mibs:/opt/vdops/share
/snmp/mibs/Apple:/opt/vdops/share/snmp/mibs/ADIC:/opt/vdops/share/snmp/mibs/APC:
/opt/vdops/share/snmp/mibs/Axis:/opt/vdops/share/snmp/mibs/BlackBerry:/opt/vdops
/share/snmp/mibs/BlueArc:/opt/vdops/share/snmp/mibs/Brocade:/opt/vdops/share/snm
p/mibs/Broadcom:/opt/vdops/share/snmp/mibs/CheckPoint:/opt/vdops/share/snmp/mibs
/Cisco
trace: read_config(): read_config.c, 780:
read_config: /opt/vdops/etc/snmp/snmp.conf:15 examining: mibdirs 
+/opt/vdops/share/snmp/mibs/Compaq
[...]

ok, i can see read_config.c adding the 'Cisco' directory to the line-up 
of mibsdirs, that seems to complete fine

[...]
read_config: Found a parser.  Calling it: mibdirs / 
+/opt/vdops/share/snmp/mibs/CheckPoint
trace: handle_mibdirs_conf(): mib.c, 2092:
read_config:initmib: using mibdirs: H=sSHÃ(H|Ht$HT$O
trace: read_config(): read_config.c, 780:
read_config: /opt/vdops/etc/snmp/snmp.conf:14 examining: mibdirs 
+/opt/vdops/share/snmp/mibs/Cisco
trace: run_config_handler(): read_config.c, 482:
read_config: Found a parser.  Calling it: mibdirs / 
+/opt/vdops/share/snmp/mibs/Cisco
trace: handle_mibdirs_conf(): mib.c, 2092:
read_config:initmib: using mibdirs: H=sSHÃ(H|Ht$HT$O
trace: read_config(): read_config.c, 780:
read_config: /opt/vdops/etc/snmp/snmp.conf:15 examining: mibdirs 
+/opt/vdops/share/snmp/mibs/Compaq
trace: run_config_handler(): read_config.c, 482:
[...]

ok, so read_config seems to pass thru the Cisco directory successfully

[...]
read_config: /opt/vdops/etc/snmp/snmpapp.local.conf: No such file or 
directory
trace: netsnmp_ds_set_boolean(): default_store.c, 205:
netsnmp_ds_set_boolean: Setting LIB:26 = 1/True
trace: _callback_lock(): callback.c, 118:
9:callback:lock: locked (LIB,POST_PREMIB_READ_CONFIG)
trace: snmp_call_callbacks(): callback.c, 304:
callback: START calling callbacks for maj=0 min=3
trace: snmp_call_callbacks(): callback.c, 318:
callback: calling a callback for maj=0 min=3
trace: snmp_call_callbacks(): callback.c, 318:
callback: calling a callback for maj=0 min=3
trace: sc_random(): scapi.c, 205:
trace: sc_random(): scapi.c, 205:
trace: sc_random(): scapi.c, 205:
trace: snmp_call_callbacks(): callback.c, 330:
callback: END calling callbacks for maj=0 min=3 (2 called)
trace: _callback_unlock(): callback.c, 150:
9:callback:lock: unlocked (LIB,POST_PREMIB_READ_CONFIG)
trace: netsnmp_get_mib_directory(): mib.c, 2470:
trace: netsnmp_get_mib_directory(): mib.c, 2473:
get_mib_directory: no mib directories set
trace: netsnmp_get_mib_directory(): mib.c, 2478:
get_mib_directory: no mib directories set by environment
trace: netsnmp_get_mib_directory(): mib.c, 2485:
get_mib_directory: mib directories set by config (but added)
trace: netsnmp_set_mib_directory(): mib.c, 2416:
trace: netsnmp_ds_set_string(): default_store.c, 283:
netsnmp_ds_set_string: Setting LIB:11 = "/opt/vdops/share/snmp/mibs"
trace: netsnmp_set_mib_directory(): mib.c, 2416:
trace: netsnmp_ds_set_string(): default_store.c, 283:
netsnmp_ds_set_string: Segmentation fault

but then i seg fault.  bummer.  so when i run normally 
("snmptranslate"), i complete just fine ... but when i have debugging 
enabled, i crash.  sounds like my code, except in reverse :(


have any tips on how i might dig deeper?  if cisco is doing something 
inadvisable in this file, then i'd like to find out what that is and 
discuss it with them


--sk

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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

Reply via email to