Hi,
I am using v5.6-v5.7.2 of net-snmp releases. The software was working without
any issues under Sparc Solaris 10. One day after reboot, snmpd started crash.
So I started debug the software. The software crashed during "make test" phase:
/export/home/121897/net-snmp5.7.2/testing/fulltests/temptests/T001snmpv1get_simple..............Segmentation
Fault - core dumped
After my debuging the software, I found the following part was the cause of the
crash.
The source file is
net-snmp-5.7.2/agent/mibgroup/ip-mib/data_access/ipaddress_solaris2.c
The function is "_load_v4(netsnmp_container *container, int idx_offset)". The
following part was causing the crash:
if (CONTAINER_INSERT(container, entry) < 0) {
DEBUGMSGTL(("access:ipaddress:container", "unable to insert %s\n",
ipae.ipAdEntIfIndex.o_bytes));
netsnmp_access_ipaddress_entry_free(entry);
return (-3);
}
After more investigation, I found this server had ethernet interface
configuration error:
e1000g0:
flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu
1500 index 2
inet 10.200.8.45 netmask ffffff00 broadcast 10.200.8.255
groupname dbprd
e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.200.8.43 netmask ffffff00 broadcast 10.200.8.255
e1000g0:2: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.200.8.43 netmask ffffff00 broadcast 10.200.8.255
e1000g0:3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.200.8.49 netmask ffffff00 broadcast 10.200.8.255
When the program is setting up ipAddressTable, CONTAINER_INSERT(container,
entry) returns normally returns "greater than 0". So this section of program
doesn't execute. However when it hits e1000g0:2, it return negative value. The
e1000g0:2 is miss configure the interface, and it is not UP.
So here is my question:
Is this crash by design?
It is nice to give us more meaningful error messages instead of crashing, and
just give SIGSEGV.
I didn't debug why this part of program give negative value when it hits
miss-configured interface.
When I checked the core file using mdb, I got the following output:
> ::status
debugging core file of snmpd (32-bit) from dbprd01
file: /export/home/121897/net-snmp-5.7.2/agent/.libs/snmpd
initial argv:
/export/home/121897/net-snmp-5.7.2/agent/.libs/snmpd -d -r -U -p /tmp/snmp-test
threading model: multi-threaded
status: process terminated by SIGSEGV (Segmentation Fault)
> ::stack
libnetsnmpmibs.so.30.0.2`ipAddressTable_container_load+0x30(10c990, 8, 3770,
37bc, 77, 107e20)
libnetsnmpmibs.so.30.0.2`ipAddressTable_container_init+0xa8(3, 10c948, 7f9f9cb8
, 7fa2a734, 8, 3658)
libnetsnmpmibs.so.30.0.2`_ipAddressTable_initialize_interface+0xd4(4c00,
7fae43c0, 4c00, 7f9cdf84, 0, 7fae43d4)
libnetsnmpmibs.so.30.0.2`init_mib_modules+0x13fc(0, 1, 0, 0, 15a05, 15a00)
main+0xbd4(c, ffbff334, 7f4c758c, ffbff4d1, ffffffff, 0)
_start+0x5c(0, 0, 0, 0, 0, 0)
Hopefully, I gave enough information. This is my first time mailing to this
group. I am only subscribing this mailing list by Digest mode. So I will be
appreciated if you reply this email including my email address.
Thanks,
Nobuo
------------------------------------------------------------------------------
CONFIDENTIALITY NOTICE: This e-mail, including any attachments, is for the
sole use of the intended recipient and may contain confidential and privileged
information. If you are not an intended recipient, or the person responsible
for delivering this message to an intended recipient, you are hereby notified
that reading, copying, using or distributing this message is prohibited. If you
are not an intended recipient, please contact the sender by reply email and
destroy all copies of the original message from your computer system.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders