[ace-bugs] [ASNMP]: synchronous get example does not give oid and value result

HERGOTT Bruno bruno.hergott at thalesgroup.com
Thu Nov 5 10:13:14 CST 2015


ACE VERSION: 6.2 (and probably 6.3 and <6.2 also, because the ASNMP source have no functional change)

HOST MACHINE and OPERATING SYSTEM: PC with Windows XP

Config.h : #include "ace/config-win32.h"


Microsoft Visual C++


No $ACE_ROOT/bin/MakeProjectCreator/config/default.features file



ASNMP\examples\get example affected

(and all code which would do the same synchronous call)


THE PROBLEM AFFECT: EXECUTION


SYNOPSIS:
synchronous get example does not give oid and value result


DESCRIPTION:
After get example compilation I launch it like that :
"..ASNMP\examples\get>get.exe 10.198.7.80

ASNMP:INFO:SNMP Version 1 GET SAMPLE PROGRAM
OID: 1.3.6.1.2.1.1.1.0
Device: 10.198.7.80:161
[ Retries=1         Timeout=1 ms Community= ]
        Oid =
        Value =

ASNMP:INFO: command completed normally.
"
The problem is Oid = nothing and Value = nothing

Note that for get_async example the result is correct :
"
ASNMP\examples\get>get_async.exe 10.198.7.80

ASNMP:INFO:SNMP Version 1 GET SAMPLE PROGRAM
OID: 1.3.6.1.2.1.1.1.0
Device: 10.198.7.80:161
[ Retries=1         Timeout=1000 ms Community= ]
        Oid = 1.3.6.1.2.1.1.1.0
        Value = Hardware: x86 Family 6 Model 37 Stepping 5 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.1 (Build
2600 Multiprocessor Free)

ASNMP:INFO: command completed normally.
"

Googling "ACE ASNMP synchronous get bug" shows something very close to this synchronous get example problem at https://groups.google.com/forum/#!topic/comp.soft-sys.ace/bFP6c6n2aFA (with ACE 5.6.7)
So maybe you already know the problem but I don't know if you know.. anyway this problem seems to subsist in ACE 6.2 (and probably ACE 6.3).

I have launched debugger : the sending of the SNMP get seems OK in transaction::run() then this function returns 0 because an handler has been registered.
At this point this description sentence echoes with the "The function transaction::run can't  work with reactor since this is a function may be called from a synchronic flow." written at the web link given above.
Then back in Snmp::run_transaction, transaction::result is called but return -1 because of iov_len == 0, then (and I think it's another, but minor bug) as the pdu content has not changed the test "pdu.get_request_id() == hold_req_id" is true and the loop exit as if the response was checked OK..

I have also launched wireshark showing me that, at the network level, everything is fine : I have a response from 10.198.7.80:161 which contains "Hardware: x86 Family 6 Model 37 Stepping 5 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.1 (Build 2600 Multiprocessor Free)"

[@@ THALES GROUP INTERNAL @@]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.isis.vanderbilt.edu/pipermail/ace-bugs/attachments/20151105/05bde4a4/attachment.html>


More information about the ace-bugs mailing list