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

List:       net-snmp-bugs
Subject:    [ net-snmp-Bugs-1382864 ] 5.2.2/5.3 snmpd segfaults on Solaris 10
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2006-02-13 23:50:33
Message-ID: E1F8nSj-0006VY-FW () sc8-sf-web6 ! sourceforge ! net
[Download RAW message or body]

Bugs item #1382864, was opened at 2005-12-16 23:52
Message generated for change (Settings changed) made by tanders
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1382864&group_id=12694

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: agent
Group: solaris
Status: Open
Resolution: None
> Priority: 6
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: 5.2.2/5.3 snmpd segfaults on Solaris 10

Initial Comment:

    NetSNMP 5.2.2 agent (snmpd) compiled on Solaris 10
using Sun Forte Developer 7 C segfaults when NMS (also
running NetSNMP 5.2.2 on Solaris 10, compiled with Sun
Forte) does an snmpwalk against any MIB I've tried. 
More details:

NMS:
SNMP version: NetSNMP 5.2.2
Compiler: Sun Forte Developer 7 C 5.4 2002/03/09
uname -a: SunOS NMS 5.10 Generic_118822-23 sun4u sparc
SUNW,Ultra-5_10
OpenSSL version 0.9.7e

Client:
SNMP version: NetSNMP 5.2.2
Compiler: Sun Forte Developer 7 C 5.4 2002/03/09
uname -a: SunOS Client 5.10 Generic_118822-23 sun4u
sparc SUNW,Sun-Blade-1500
OpenSSL version 0.9.7g

    Start snmpd on client machine under gdb:

Client # gdb snmpd
(gdb) run -f -L

    Now, from NMS, run snmpwalk against Client using
any of several MIBs (I've tried TCP-MIB, SNMPv2-MIB,
IP-MIB and HOST-RESOURCES-MIB specifically):

NMS # snmpwalk -v 2c -c <ro-community> -m <MIB> Client

    This will go along for a while, but always fails
at the same point:

SNMPv2-SMI::mib-2.25.3.6.1.4.1536 = INTEGER: 78146280
Timeout: No Response from Client

    On Client, see the following at this point:

Connection from UDP: [129.79.6.150]:-26504

Program received signal SIGSEGV, Segmentation fault.
0xfeb147c4 in _ndoprnt () from /lib/libc.so.1
(gdb)

    A backtrace shows:

(gdb) bt
#0  0xfeb147c4 in _ndoprnt () from /lib/libc.so.1
#1  0xfeb18408 in snprintf () from /lib/libc.so.1
#2  0xff28b798 in Get_Next_HR_Disk_Partition ()
   from /opt/lib/libnetsnmpmibs.so.9
#3  0xff28cd94 in Get_Next_HR_Partition () from
/opt/lib/libnetsnmpmibs.so.9
#4  0xff28c44c in header_hrpartition () from
/opt/lib/libnetsnmpmibs.so.9
#5  0xff28c960 in var_hrpartition () from
/opt/lib/libnetsnmpmibs.so.9
#6  0xff35840c in netsnmp_old_api_helper ()
   from /opt/lib/libnetsnmphelpers.so.9
#7  0xff137f98 in netsnmp_call_handler () from
/opt/lib/libnetsnmpagent.so.9
#8  0xff1385b4 in netsnmp_call_handlers () from
/opt/lib/libnetsnmpagent.so.9
#9  0xff125c34 in handle_var_requests () from
/opt/lib/libnetsnmpagent.so.9
#10 0xff127034 in handle_getnext_loop () from
/opt/lib/libnetsnmpagent.so.9
#11 0xff128030 in handle_pdu () from
/opt/lib/libnetsnmpagent.so.9
#12 0xff127944 in netsnmp_handle_request () from
/opt/lib/libnetsnmpagent.so.9
#13 0xff123a1c in handle_snmp_packet () from
/opt/lib/libnetsnmpagent.so.9
#14 0xfeffb1f4 in _sess_process_packet () from
/opt/lib/libnetsnmp.so.9
#15 0xfeffcf34 in _sess_read () from
/opt/lib/libnetsnmp.so.9
#16 0xfeffcfd0 in snmp_sess_read () from
/opt/lib/libnetsnmp.so.9
#17 0xfeffb480 in snmp_read () from
/opt/lib/libnetsnmp.so.9
#18 0x00017890 in receive ()
#19 0x00016b60 in main ()

    Running the same snmpwalk command locally on Client
gives the same error, although the OID is expressed
nearly absolute, rather than beginning with mib-2:

iso.3.6.1.2.1.25.3.6.1.4.1536 = INTEGER: 78146280
Timeout: No Response from localhost

    The gdb backtrace is identical, so I won't attach
a second copy.

    The configure command used on both NMS and Client
when building (client was configure using the 
--with-prefix=/opt option, while NMS was installed
into default /usr/local, otherwise the same on both):

./configure --with-cc=cc \
            --with-openssl=/usr \
            --with-sys-contact="root@<machine-FQDN>" \
            --with-sys-location="appropriate location"\
            --with-logfile="/var/log/snmp/snmpd.log" \
            --with-mib-modules="host smux
mibII/mta_sendmail ucd-snmp/diskio" \
            --with-perl-modules \
            --with-libwrap=/usr/lib

    The following config. summary was seen after the
configuration step:

--------------------------------------------------------
            Net-SNMP configuration summary:
---------------------------------------------------------

  SNMP Versions Supported:    1 2c 3
  Net-SNMP Version:           5.2.2
  Building for:               solaris2
  Network transport support:  Callback Unix TCP UDP
  SNMPv3 Security Modules:    usm
  Agent MIB code:             mibII ucd_snmp snmpv3mibs
notification target agent_mibs agentx utilities host
smux mibII/mta_sendmail ucd-snmp/diskio
  SNMP Perl modules:          building -- not embeddable
  Embedded perl support:      disabled
  Authentication support:     MD5 SHA1
  Encryption support:         DES AES

---------------------------------------------------------

    Can't think of anything else to add right now. 
If more info is needed, please request from
jgronek@indiana.edu.  Thanks much
      

----------------------------------------------------------------------

Comment By: Thomas Anders (tanders)
Date: 2006-02-14 00:50

Message:
Logged In: YES 
user_id=848638

First, the notification build issue is supposed to be a tar
issue. Please unpack with GNU tar as suggested earlier.

Is the crash fully reproducible all time?

----------------------------------------------------------------------

Comment By: Ian (ianeal)
Date: 2006-02-13 21:45

Message:
Logged In: YES 
user_id=1451385

Incidentally, this is the version of Sun Workshop that I am
using

root@unixbox : cc -V
cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15
usage: cc [ options] files.  Use 'cc -flags' for details
ro

----------------------------------------------------------------------

Comment By: Ian (ianeal)
Date: 2006-02-13 21:43

Message:
Logged In: YES 
user_id=1451385

Hi, I to have been able to reproduce both of these bugs
although I was able to work around the 5.3 compilation issue
with snmpNotifyFilterTable by disabling disman/event and
disman/event-mib via the --with-out-mib-modules directive.

The core file generates the following stack trace on Solaris
10 when snmpwalked

pstack /core
 ff111c78 _ndoprnt (43f0e455, ffbfe4e0, ffbfdd41, ff16b234,
20, ffbfdf7c) + 1d4
 ff115864 snprintf (ffbfe55c, 400, 43f0e455, 0, 0, 0) + 7c
 000d1618 Get_Next_HR_Disk_Partition (0, 400, 0, fffffff8,
0, 3b07d1) + 100
 000d21c8 ???????? (1, b, 3b86b0, 3b86d0, ffbfed78, 2)
 000d1ccc header_hrpartition (ffbfed4c, 3b86b0, 3b86a0, 0,
ffbfed34, ffbfed38) + 10c
 000d1f60 var_hrpartition (ffbfed4c, 3b86b0, 3b86a0, 0,
ffbfed34, ffbfed38) + 48
 000e2fe8 netsnmp_old_api_helper (23dca8, 23c138, 3b7c78,
3b0788, 1, 1) + 1a0
 000acb24 netsnmp_call_handler (23dce8, 23c138, 3b7c78,
3b0788, 1, 1) + 104
 000acde4 netsnmp_call_handlers (23c138, 3b7c78, 3b0788,
9fc98, ff242000, 1000) + 214
 000a12f8 handle_var_requests (3b0ab8, c7, 0, 23cbf8, 0,
3b0899) + c8
 000a1cd4 handle_getnext_loop (3b0ab8, 0, ffffffff,
fffffff8, 0, 3b07d1) + b4
 000a24d4 handle_pdu (3b0ab8, 5, ffbff3ec, fffffff8,
ffffffe0, 3b7c8d) + 2bc
 000a215c netsnmp_handle_request (3b0ab8, 0, 3b0a20, 3e1ae0,
2f, 3b0ab9) + bc
 0009fbb4 handle_snmp_packet (1, 2fbfc0, 10d3cec7, 3b0a20,
0, 1000) + 24c
 001047bc ???????? (2f7f30, 2fbfc0, 2fbf88, 2fbe40, 3b7c30, 10)
 001054f4 _sess_read (2f7f30, ffbff708, 20, 0, 0, 0) + b84
 00105570 snmp_sess_read (2f7f30, ffbff708, ff167a84, 1, 40,
0) + 18
 00104930 snmp_read (ffbff708, ffbff708, 0, 0, 40ad40,
ffbff791) + 28
 0009d41c agent_check_and_process (1, 70210, 916e0, 1270fc,
ff242000, 2) + 11c
 0007371c main     (4, ffbff884, ffbff898, 1d0400, ff240100,
ff240140) + aec
 00055098 _start   (0, 0, 0, 0, 0, 0) + 108


root@unixbox/ : df -k
Filesystem            kbytes    used   avail capacity 
Mounted on
/dev/dsk/c0t0d0s0    14595850 3369632 11080260    24%    /
/devices                   0       0       0     0%    /devices
ctfs                       0       0       0     0%   
/system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%   
/etc/mnttab
swap                  582816     848  581968     1%   
/etc/svc/volatile
objfs                      0       0       0     0%   
/system/object
fd                         0       0       0     0%    /dev/fd
/dev/dsk/c0t0d0s3    4127390  424455 3661662    11%    /var
swap                  619504   37536  581968     7%    /tmp
swap                  582016      48  581968     1%    /var/run
linuxbox1:/unix_home 50200576 32703640 17496936    66%    /home
linuxbox1:/build     36831232 5435904 31395328    15%    /build
solarisbox:/space/home/build
                     30213190 23079624 6831435    78%   
/oldbuild
solarisbox:/opt/SUNWspro   6196278 3409427 2724889    56%  
 /opt/SUNWspro
linuxbox:/space4      118169876 97694136 14473056    88%   
/space4

Perhaps ctfs or objfs is causing problems?

----------------------------------------------------------------------

Comment By: Thomas Anders (tanders)
Date: 2006-01-11 22:15

Message:
Logged In: YES 
user_id=848638

These files are definitely available in the tarball. I've
just downloaded it from Atlanta,GA, checked the MD5 hash,
unpacked it and the files are there:

ls -ld
agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_{constants,data_access,interface}.h
                
-rw-r--r--  1 anders users 4222 2005-12-01 22:06
agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_constants.h
                
-rw-r--r--  1 anders users 3277 2005-12-01 22:06
agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_data_access.h
                
-rw-r--r--  1 anders users 5303 2005-12-01 22:06
agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h


Can you please try unpacking with a recent GNU tar, please?

----------------------------------------------------------------------

Comment By: Jeff Gronek (jgronek)
Date: 2006-01-11 20:17

Message:
Logged In: YES 
user_id=1406786


    Attempting to build the 5.3 release fails altogether on
Solaris 10.  Unpack and configure with minimal options on
Solaris 10/Forte Developer 7 C 5.4:

./configure --with-cc=cc \
            --with-openssl=/usr \
            --with-sys-contact="contact@fqdn" \
            --with-sys-location="System location" \
            --with-logfile="/full/path/to/file" \
            --with-perl-modules \
            --with-libwrap=/usr/lib

    After chugging along, the configure step now fails with
the error below (sorry for the length).  Seems that there
are three header files that the configure step is searching
for, but which are not in the 5.3 source code distribution.
The files:

            snmpNotifyFilterTable_constants.h
            snmpNotifyFilterTable_data_access.h
            snmpNotifyFilterTable_interface.h

are not in source code net-snmp-5.3.tar.gz downloaded from
either the Atlanta, GA or Phoenix, AZ download sites
(haven't tried any others yet).

    If further info is needed, request from jgronek@indiana.edu.


Error on which configure dies:

checking for and configuring mib modules to use...  mibII
ucd_snmp snmpv3mibs notification notification-log-mib target
agent_mibs agentx disman/event-mib disman/schedule utilities
host.
 mibII ucd_snmp snmpv3mibs notification notification-log-mib
target agent_mibs agentx disman/event-mib disman/schedule
utilities host mibII/system_mib mibII/sysORTable mibII/at
mibII/ifTable mibII/ip mibII/snmp_mib mibII/tcp mibII/icmp
mibII/udp mibII/vacm_vars mibII/setSerialNo
ucd-snmp/vmstat_solaris2 ucd-snmp/memory_solaris2
ucd-snmp/proc ucd-snmp/versioninfo ucd-snmp/pass
ucd-snmp/pass_persist ucd-snmp/disk ucd-snmp/loadave
ucd-snmp/extensible agent/extend ucd-snmp/errormib
ucd-snmp/file ucd-snmp/dlmod ucd-snmp/proxy
ucd-snmp/logmatch snmpv3/snmpEngine snmpv3/snmpMPDStats
snmpv3/usmStats snmpv3/usmConf snmpv3/usmUser
notification/snmpNotifyTable
snmp-notification-mib/snmpNotifyFilterTable
notification/snmpNotifyFilterProfileTable
notification-log-mib/notification_log
target/snmpTargetAddrEntry target/snmpTargetParamsEntry
target/target target/target_counters
agent/nsTransactionTable agent/nsModuleTable agent/nsDebug
agent/nsCache agent/nsLogging agentx/master agentx/subagent
disman/event disman/schedule/schedCore
disman/schedule/schedConf disman/schedule/schedTable
utilities/override utilities/execute utilities/iquery
host/hr_system host/hr_storage host/hr_device host/hr_other
host/hr_proc host/hr_network host/hr_print host/hr_disk
host/hr_partition host/hr_filesys host/hr_swrun
host/hr_swinst util_funcs kernel_sunos5 mibII/interfaces
mibII/ipAddr mibII/var_route mibII/route_write
mibII/tcpTable mibII/udpTable mibII/vacm_context
mibII/vacm_conf
header_complex"./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h",
 line 32: cannot find include file:
"snmpNotifyFilterTable_constants.h"
"./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h",
 line 318: cannot find include file:
"snmpNotifyFilterTable_interface.h"
"./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h",
 line 319: cannot find include file:
"snmpNotifyFilterTable_data_access.h"
cc: acomp failed for
./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
"./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h",
 line 32: cannot find include file:
"snmpNotifyFilterTable_constants.h"
"./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h",
 line 318: cannot find include file:
"snmpNotifyFilterTable_interface.h"
"./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h",
 line 319: cannot find include file:
"snmpNotifyFilterTable_data_access.h"
cc: acomp failed for
./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
"./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h",
 line 32: cannot find include file:
"snmpNotifyFilterTable_constants.h"
"./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h",
 line 318: cannot find include file:
"snmpNotifyFilterTable_interface.h"
"./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h",
 line 319: cannot find include file:
"snmpNotifyFilterTable_data_access.h"
cc: acomp failed for
./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h
configure: WARNING: mib module error
configure: error: mib module
"snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable"
requires module
"snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface"
but
snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.h
or
snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable_interface.c
could not be found in ./agent/mibgroup


----------------------------------------------------------------------

Comment By: Thomas Anders (tanders)
Date: 2006-01-07 00:33

Message:
Logged In: YES 
user_id=848638

The bug is being marked pending and its priority is being lowered
due to a lack of response to questions from the developers.

Pending bugs will be deleted if no response is received within a
reasonable amount of time.


----------------------------------------------------------------------

Comment By: Thomas Anders (tanders)
Date: 2005-12-20 01:28

Message:
Logged In: YES 
user_id=848638

We've had somebody trying to reproduce this with 5.2.2 on
Solaris 11/SPARC and he couldn't. Thus, we'd need further
information and cooperation to be able to track this down.
Are you able to get a core file from snmpd at the time of
the crash? Also, can you give as much details as possible
about your disk layout? 

----------------------------------------------------------------------

Comment By: Thomas Anders (tanders)
Date: 2005-12-17 00:44

Message:
Logged In: YES 
user_id=848638

Can you please re-test with 5.3.rc1 and tell us if you hit
the same problem? If so, does "make test" reports the
problem in the (last) snmpwalk test? We'd appreciate to get
this info ASAP, as this may be a show-stopper for the
upcoming 5.3 release expected for Xmas!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1382864&group_id=12694


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Net-snmp-bugs mailing list
Net-snmp-bugs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-bugs


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

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