Discussion:
make test - snmpwalk failure on hpux 11.31 ia64
Cath Fawcet
2008-05-06 00:04:42 UTC
Permalink
Hi
When installing net-snmp on an hpux 11.31, ia64 box, snmpwalk fails when
I run make test. The following is the process I've followed to get
there, and what I've tried to fix it.

net-snmp 5.4.1, non-modified; gcc 4.2.3:
Get the following errors on installing net-snmp with make (gmake gives
same errors):

-Dhpux11=hpux11 -c host/hr_swrun.c -DPIC -o host/.libs/hr_swrun.o
host/hr_swrun.c: In function 'var_hrswrun':
host/hr_swrun.c:1137: error: 'PGSHIFT' undeclared (first use in this
function)
host/hr_swrun.c:1137: error: (Each undeclared identifier is reported
only once
host/hr_swrun.c:1137: error: for each function it appears in.)
*** Error exit code 1

Stop.

Make the following modifications to hr_swrun.c at line 147:
#define PGSHIFT 12


make (/gmake) again:
-I/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE -g -O2
-Uhpux11 -Dhpux11=hpux11 -c
mibII/route_write.c -DPIC -o mibII/.libs/route_write.o
mibII/route_write.c: In function 'addRoute':
mibII/route_write.c:122: error: 'struct radix_node' has no member named
'rn_key'
mibII/route_write.c: In function 'delRoute':
mibII/route_write.c:169: error: 'struct radix_node' has no member named
'rn_key'
*** Error exit code 1

Stop.

Make the following modifications route_write.c at line 79
#define rn_key rn_u.rn_leaf.rn_Key

make (/gmake) successful.

Run make test, all tests ok except:
59: testing full snmpwalk (SNMPv2c) against agent (may take time)... .FAIL
Summary: 58 / 59 succeeded.
*** Error exit code 1

Stop.

Tried installing it anyway (just to see how bad things are) and on
running snmpwalk, snmpd dies.


Have also tried gcc 4.1.6 with gmake (make gives same error) - both with
the code I've modified and the original net-snmp code:
gcc -I../include -I. -I../snmplib -D_POSIX_C_SOURCE=199506L
-D_REENTRANT -D_HPUX_SOURCE
-fPIC -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-fno-strict-aliasing -pipe
-I/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE -g -O2
-Uhpux11 -Dhpux11=hpux11 -c parse.c -DPIC -o .libs/parse.o
In file included from parse.c:97:
/usr/include/regex.h:118: error: static or type qualifiers in abstract
declarator
parse.c: In function 'add_mibdir':
parse.c:4720: error: storage size of 'dir_stat' isn't known
parse.c:4720: error: storage size of 'idx_stat' isn't known
gmake[1]: *** [parse.lo] Error 1
gmake[1]: Leaving directory `/var/tmp/net-snmp-5.4.1/snmplib'
gmake: *** [subdirs] Error 1

Did not try modifying anything to fix this as I thought it likely I'd be
spending time barking up the wrong tree.

Have also tried cc and can't get the whole way through configure.

Next the plan was to try gcc 3.x as it is less strict than gcc 4.x,
potentially solving compilation issues and hopefully fixing snmpwalk.
However, with make and gmake gcc 3.4.6 and 3.4.5 don't build (source
taken from gnu website rather than hpux depot as later gcc versions were).

Any suggestions for further things I could try would be appreciated. If
a previous version of gcc is likely to be the answer I could do more to
try and get that working.

Note: I've got the same version of snmp working on hpux 11.23 ia64 with
gcc 4.2.3 and make.

Thanks

-------------------------------
This email message and any attachment(s) is intended only for the
person(s) or entity(entities) to whom it is addressed. The
information it contains may be classified as IN CONFIDENCE and may be
legally privileged. If you are not the intended recipient any use,
disclosure or copying of the message or attachment(s) is strictly
prohibited. If you have received this message in error please
notify us immediately and destroy it and any attachment(s).
Thank you. The Ministry of Social Development accepts no
responsibility for changes made to this message or to any
attachment(s) after transmission from the Ministry.
-------------------------------
Thomas Anders
2008-05-06 20:45:09 UTC
Permalink
Post by Cath Fawcet
Tried installing it anyway (just to see how bad things are) and on
running snmpwalk, snmpd dies.
Could you get us a backtrace, please? See
http://www.net-snmp.org/wiki/index.php/Debugger for details.


+Thomas
Cath Fawcet
2008-05-14 02:51:02 UTC
Permalink
Maybe I'm not doing this right, but with the hp-ux version of gdb I did
the following:

.bash-3.2# /usr/local/sbin/snmpd -c /usr/local/bin/snmpd.conf
.bash-3.2# ps -ef | grep snmp
root 14397 1 0 16:58:14 ? 0:01 /usr/local/sbin/snmpd -c
/usr/local/bin/snmpd.conf
.bash-3.2# /opt/langtools/bin/gdb /usr/local/sbin/snmpd 14397
HP gdb 5.8 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.8 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for
warranty/support.
..
Attaching to program: /usr/local/sbin/snmpd, process 14397

warning: No unwind information found.
Skipping this library /usr/lib/hpux32/libcl.so.1.

0x60000000c03f4410:0 in _select_sys+0x30 () from /usr/lib/hpux32/libc.so.1
(gdb) bt
#0 0x60000000c03f4410:0 in _select_sys+0x30 () from
/usr/lib/hpux32/libc.so.1
#1 0x60000000c040a660:0 in select+0xe0 () from /usr/lib/hpux32/libc.so.1
#2 0x4004f00:0 in main (argc=<not available>, argv=<not available>)
at snmpd.c:1147
(gdb) run /usr/local/bin/snmpwalk -v 1 -c public localhost
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /usr/local/sbin/snmpd /usr/local/bin/snmpwalk -v 1 -c
public localhost
[New process 14424]
warning: reading register 584: No such process
Detaching after fork from process 14424

Program exited normally.
(gdb) bt
No stack.

Apparently the process being killed by snmpwalk is 'exiting normally'.


However, snmpwalk works successfully for any other server, only fails
for localhost (incl. using servername of localhost), unless it is run
through gdb in which case it kills the snmpd process just the same as
above. This makes me wonder (a) if I'm using gdb right and (b) if this
is OS related - the other servers tested have the following: HP-UX 11.11
pa risc, 11.23 itanium, and Solaris 8 sparc.

Running it outside gdb, this is the output:
.bash-3.2# snmpwalk -v 1 -c public localhost
SNMPv2-MIB::sysDescr.0 = STRING: HP-UX <servername> B.11.31 U ia64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.14
...
<snip>
...
IP-MIB::ipAdEntBcastAddr.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntReasmMaxSize.10.162.128.81 = INTEGER: 65535
IP-MIB::ipAdEntReasmMaxSize.127.0.0.1 = INTEGER: 65535
Timeout: No Response from localhost



Hope this isn't info overkill!
Thanks,
Cath
Post by Thomas Anders
Post by Cath Fawcet
Tried installing it anyway (just to see how bad things are) and on
running snmpwalk, snmpd dies.
Could you get us a backtrace, please? See
http://www.net-snmp.org/wiki/index.php/Debugger for details.
+Thomas
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Net-snmp-users mailing list
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
-------------------------------
This email message and any attachment(s) is intended only for the
person(s) or entity(entities) to whom it is addressed. The
information it contains may be classified as IN CONFIDENCE and may be
legally privileged. If you are not the intended recipient any use,
disclosure or copying of the message or attachment(s) is strictly
prohibited. If you have received this message in error please
notify us immediately and destroy it and any attachment(s).
Thank you. The Ministry of Social Development accepts no
responsibility for changes made to this message or to any
attachment(s) after transmission from the Ministry.
-------------------------------
Cath Fawcet
2008-05-21 04:31:59 UTC
Permalink
Hi again

Just following up on this.. does anyone know of a successful
implementation on hpux 11.31?
If so, that rules out my theory that this is totally OS related.

Thanks
Post by Cath Fawcet
Maybe I'm not doing this right, but with the hp-ux version of gdb I
.bash-3.2# /usr/local/sbin/snmpd -c /usr/local/bin/snmpd.conf
.bash-3.2# ps -ef | grep snmp
root 14397 1 0 16:58:14 ? 0:01 /usr/local/sbin/snmpd
-c /usr/local/bin/snmpd.conf
.bash-3.2# /opt/langtools/bin/gdb /usr/local/sbin/snmpd 14397
HP gdb 5.8 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.8 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for
warranty/support.
..
Attaching to program: /usr/local/sbin/snmpd, process 14397
warning: No unwind information found.
Skipping this library /usr/lib/hpux32/libcl.so.1.
0x60000000c03f4410:0 in _select_sys+0x30 () from
/usr/lib/hpux32/libc.so.1
(gdb) bt
#0 0x60000000c03f4410:0 in _select_sys+0x30 () from
/usr/lib/hpux32/libc.so.1
#1 0x60000000c040a660:0 in select+0xe0 () from /usr/lib/hpux32/libc.so.1
#2 0x4004f00:0 in main (argc=<not available>, argv=<not available>)
at snmpd.c:1147
(gdb) run /usr/local/bin/snmpwalk -v 1 -c public localhost
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/sbin/snmpd /usr/local/bin/snmpwalk -v 1
-c public localhost
[New process 14424]
warning: reading register 584: No such process
Detaching after fork from process 14424
Program exited normally.
(gdb) bt
No stack.
Apparently the process being killed by snmpwalk is 'exiting normally'.
However, snmpwalk works successfully for any other server, only fails
for localhost (incl. using servername of localhost), unless it is run
through gdb in which case it kills the snmpd process just the same as
above. This makes me wonder (a) if I'm using gdb right and (b) if this
is OS related - the other servers tested have the following: HP-UX
11.11 pa risc, 11.23 itanium, and Solaris 8 sparc.
.bash-3.2# snmpwalk -v 1 -c public localhost
SNMPv2-MIB::sysDescr.0 = STRING: HP-UX <servername> B.11.31 U ia64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.14
...
<snip>
...
IP-MIB::ipAdEntBcastAddr.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntReasmMaxSize.10.162.128.81 = INTEGER: 65535
IP-MIB::ipAdEntReasmMaxSize.127.0.0.1 = INTEGER: 65535
Timeout: No Response from localhost
Hope this isn't info overkill!
Thanks,
Cath
Post by Thomas Anders
Post by Cath Fawcet
Tried installing it anyway (just to see how bad things are) and on
running snmpwalk, snmpd dies.
Could you get us a backtrace, please? See
http://www.net-snmp.org/wiki/index.php/Debugger for details.
+Thomas
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save
$100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Net-snmp-users mailing list
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
-------------------------------
This email message and any attachment(s) is intended only for the
person(s) or entity(entities) to whom it is addressed. The
information it contains may be classified as IN CONFIDENCE and may be
legally privileged. If you are not the intended recipient any use,
disclosure or copying of the message or attachment(s) is strictly
prohibited. If you have received this message in error please
notify us immediately and destroy it and any attachment(s).
Thank you. The Ministry of Social Development accepts no
responsibility for changes made to this message or to any
attachment(s) after transmission from the Ministry.
-------------------------------
Thomas Anders
2008-06-04 20:34:55 UTC
Permalink
Post by Cath Fawcet
(gdb) run /usr/local/bin/snmpwalk -v 1 -c public localhost
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/sbin/snmpd /usr/local/bin/snmpwalk -v 1 -c
public localhost
No, that's not the right way to do it. You should run snmpwalk from a
different shell, not from within gdb. According to your original
posting, snmpd (running under gdb) will die and you're expected to type
"bt" in gdb and send the output.

Even better: file it as a bug on http://www.net-snmp.org/bugs so it
won't get lost.


+Thomas

Loading...