[AGENT++] SNMP++ 3.2.16 memory fault on AIX 5.3
???163
touchzhao at 163.com
Sat Feb 11 07:22:44 CET 2006
Hi,
A couple days ago, I submit a crash of snmp++ program. It report the crash
point like this:
> CSNMPMessageQueue::HandleEvents(int,const fd_set&,const fd_set&,const
> fd_set&)(this = 0x20d73858, maxfds = 48, readfds = &(...), = &(...), =
> &(...)), line 468 in "msgqueue.cpp"
> (dbx) l
> 468 FD_ZERO(&snmp_writefds);
I suppose there’s some other code have overwritten the free heap,
hence the program access the wrong address.
So I compile the consoleExamples in snmp++ via xlC_r (VisualAge C++
Professional / C for AIX Compiler, Version 6) with such options:
COPTIONS
= -g -bdynamic -brtl -D_AIX -D_XPG4_EXTENDED -D__unix -D_REENTRANT -qdbxextr
a -qcheck=all -qfullpath -qheapdebug
CINCDIRS = -I. -I../include
USEROPTS =
CFLAGS = $(COPTIONS) $(CINCDIRS) $(USEROPTS)
LDFLAGS = -g -brtl -bdynamic -qthreaded -qheapdebug
SHARED = -G
And snmp++ lib are also compiled with the same setting.
The example program ‘snmpGet’ issues such information:
$ snmpGet 10.0.254.254 .1.3.6.1.2.1.1.1.0
SNMP++ Get to 10.0.254.254 SNMPV1 Retries=1 Timeout=100ms Community=public
1546-525 Object 0x20109558 is invalid or a libc heap object at line 535 in
../include/snmp_pp/address.h
1546-522 Traceback:
d9e383fc = _debug_ufree + 0x38
d9e30a18 = _debug_free + 0x18
d9e213d0 = ? + 0x44
1000be38 = __dt__10UdpAddressFv + 0x8C
10023984 = __dt__12CSNMPMessageFv + 0xA4
100246bc = __dt__Q2_17CSNMPMessageQueue20CSNMPMessageQueueEltFv +
0xA8
100252c4 = DeleteEntry__17CSNMPMessageQueueFUl + 0x5C
100273dc = SNMPBlockForResponse__15EventListHolderFUlR3Pdu + 0xA0
10005d60 =
snmp_engine__4SnmpFR3PdulT2RC10SnmpTargetPFiP4SnmpR3PduR10SnmpTargetPv_vPCvi
+ 0x1028
10004ca0 = get__4SnmpFR3PduRC10SnmpTarget + 0x50
1000b850 = main + 0x798
1546-525 Object 0x201096B8 is invalid or a libc heap object at line 535 in
../include/snmp_pp/address.h
1546-522 Traceback:
d9e383fc = _debug_ufree + 0x38
d9e30a18 = _debug_free + 0x18
d9e213d0 = ? + 0x44
1000be38 = __dt__10UdpAddressFv + 0x8C
1000c9c4 = __dt__10GenAddressFv + 0xB0
1000c70c = __dt__10SnmpTargetFv + 0x74
1000c34c = __dt__7CTargetFv + 0xB4
100239cc = __dt__12CSNMPMessageFv + 0xEC
100246bc = __dt__Q2_17CSNMPMessageQueue20CSNMPMessageQueueEltFv +
0xA8
100252c4 = DeleteEntry__17CSNMPMessageQueueFUl + 0x5C
100273dc = SNMPBlockForResponse__15EventListHolderFUlR3Pdu + 0xA0
10005d60 =
snmp_engine__4SnmpFR3PdulT2RC10SnmpTargetPFiP4SnmpR3PduR10SnmpTargetPv_vPCvi
+ 0x1028
10004ca0 = get__4SnmpFR3PduRC10SnmpTarget + 0x50
1000b850 = main + 0x798
1546-525 Object 0x20109168 is invalid or a libc heap object at line 535 in
../include/snmp_pp/address.h
1546-522 Traceback:
d9e383fc = _debug_ufree + 0x38
d9e30a18 = _debug_free + 0x18
d9e213d0 = ? + 0x44
1000be38 = __dt__10UdpAddressFv + 0x8C
1000790c = __dt__10GenAddressFv + 0x98
10005df0 =
snmp_engine__4SnmpFR3PdulT2RC10SnmpTargetPFiP4SnmpR3PduR10SnmpTargetPv_vPCvi
+ 0x10B8
10004ca0 = get__4SnmpFR3PduRC10SnmpTarget + 0x50
1000b850 = main + 0x798
Oid = 1.3.6.1.2.1.1.1.0
Value = Cisco Internetwork Operating System Software
IOS (tm) c6sup2_rp Software (c6sup2_rp-DSV-M), Version 12.1(26)E4, RELEASE
SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Sat 15-
1546-525 Object 0x20108BD8 is invalid or a libc heap object at line 535 in
../include/snmp_pp/address.h
1546-522 Traceback:
d9e383fc = _debug_ufree + 0x38
d9e30a18 = _debug_free + 0x18
d9e213d0 = ? + 0x44
1000be38 = __dt__10UdpAddressFv + 0x8C
1000c9c4 = __dt__10GenAddressFv + 0xB0
1000c70c = __dt__10SnmpTargetFv + 0x74
1000c34c = __dt__7CTargetFv + 0xB4
1000b9f0 = main + 0x938
$
Can anyone help me how to avoid the memory fault?
Best regards,
Moore
More information about the AGENTPP
mailing list