Hi Dave,
1) cd /usr/local/sbin
You have mail in /usr/spool/mail/root
/usr/local/sbin#gdb snmpd
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-ibm-aix5.1.0.0"...
(gdb) run -f -Le
Starting program: /usr/local/sbin/snmpd -f -Le
NET-SNMP version 5.4.2..1
2) /usr/local/bin#./snmpget -v 1 -c public localhost hrStorageType.45
Timeout: No Response from localhost.
You have mail in /usr/spool/mail/root
/usr/local/bin#ps -ef|grep snmpd
root 1040626 3280938 0 17:39:48 pts/2 0:00 grep snmpd
root 1179872 1089776 0 17:36:38 pts/1 0:00 gdb snmpd
root 3408016 1179872 0 17:36:58 pts/1 0:00 /usr/local/sbin/snmpd -f -Le
3) when run snmpget error show like below
Program received signal SIGSEGV, Segmentation fault.
0x0000d410 in ?? ()
4) (gdb) print HRFS_entry
$1 = 538197124
(gdb) print *HRFS_entry
$2 = 538194444
(gdb) print storage_type_id
$3 = {1, 3, 6, 1, 2, 1, 25, 2, 1, 1}
(gdb) print storage_type_len
$4 = 10
(gdb) print storage_type_id[ storage_type_len-1 ]
$5 = 1
(gdb) print var_len
No symbol "var_len" in current context.
(gdb)
Best Regards,
________________________________
From: Dave Shield <d.t.shi...@liverpool.ac.uk>
To: down Load <engl...@yahoo.com>
Cc: net-snmp-coders@lists.sourceforge.net
Sent: Wednesday, April 8, 2009 5:04:11 PM
Subject: Re: Segmentation fault(coredump)
2009/4/8 down Load <engl...@yahoo.com>:
> 1) /usr/local/sbin/snmpd -f -Le -Dall
> trace: header_hrstoreEntry(): host/hr_storage..c, 476:
> host/hr_storage: var_hrstoreEntry: process
> HOST-RESOURCES-MIB::hrStorageType.45 (ffffffff)
> Segmentation fault(coredump)
Yup - that's what I suspected you'd see.
The next debug line ought to have been
trace: netsnmp_call_handler(): agent_handler.c, 438:
handler:returned: handler old_api returned 0
which is printed immediately after the var_hrstore()
routine returns. So the problem clearly lies somewhere
within this routine. (Which is not too surprising).
I'm afraid you're going to have fire up a debugger to
find out anything further.
Hopefully the following will work, but no promises.
Please try the following:
$ cd /usr/local/sbin
$ gdb snmpd
gdb> run -f -Le
(then invoke the "snmpget" command,
which should crash the agent once more).
What output do you see from the gdb command?
Also, what is the output of the following gdb commands
once the agent has crashed:
gdb> print HRFS_entry
gdb> print *HRFS_entry
gdb> print storage_type_id
gdb> print storage_type_len
gdb> print storage_type_id[ storage_type_len-1 ]
gdb> print var_len
[I'm guessing that the crash does occur within the var_hrstore
routine]
Dave
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders