RFA access violation - update message with status close

Hi
we received an update message with a response status Closed(4) and it crashes in RFA lib with access violation.
TREP 3
RFA 8.1
Message(
hintMask :81 'Q'
msgType: 1
msgModelType: 6,
respType: UpdateEnum (3)
respTypeNum: 0
header: (buffer: 0x000000)
....
respStatus: ( respState: CloseEnum (4), dataState: SuspectEnum(2), statusCode: 1)
)
What we suspect is that we'r trying to read fields and lib crashes in rsslDecodeFieldEntry with access violation.
Can you explain what kind of message is and how to manage this update?
We can provide a dump for further analysis.
Regards
Stefan
Best Answer
-
The link to RDMUsageGuide.pdf in my post seems to automatically generate by the forum engine. Please get the document from RFA C++ package. We provide the document under folder "<RFA 8.1 Packages>/Docs". And RDC named user can download the RFA package from https://developers.refinitiv.com/thomson-reuters-enterprise-platform/robust-foundation-api-rfa/downloads
Regarding snippet of codes you provide. Not sure that below codes is just typo?
if (data.getDataType() != rfa::data::FieldListEnum)
And actually it should be
if (data.getDataType() == rfa::data::FieldListEnum)
I would suggest you add codes to check if the data contains Blank by calling isBlank method before you decode it.
if(!data.isBlank())
{
....
}
There is some case we found the publisher send a blank field list to consumer app. Using isBlank can help detect the issue. Anyway, the best way to confirm issue is to get RSSL trace log to confirm actual data application received.
0
Answers
-
I don't think the response status related to this issue because Market Price Update message does not use RespStatus (see RDMUsageGuide.pdf) so the status you see should be status that RFA reuses the object.
Typically, the application can verify whether or not the response message contains response status by checking HintMask using the following code. And it should be false when you test HintMask with the update message.
if(respMsg.getHintMask() & RespMsg::RespStatusFlag)
{
// Process RespStatus
}
And not sure that have you checked if the response message contains payload before decoding it? You can use the HintMask to check, and it should be able to help avoid the case that update message does not have a payload.
if (respMsg.getHintMask() & RespMsg::PayloadFlag)
{
// process payload
}
-Do you have the call stack from the Access Violation crash?
From the initial information, it looks like you found the crash when the application is trying to read fields and lib crashes in rsslDecodeFieldEntry with an access violation. So it could be the case that application receive unknown fid or enum value and it could be the case that the field contains a blank value. You may need to update the data dictionary to the latest version.
If you can replicate the issue again, please turn on RSSL trace log using instruction from the following link. It should be able to help us identify what kind of data or message that cause the crash.
0 -
Here is how our code looks like following:
if (respMsg.getHintMask() & rfa::message::RespMsg::PayloadFlag)
{
const rfa::common::Data& data = respMsg.getPayload();
if (data.getDataType() != rfa::data::FieldListEnum)
{
const rfa::data::FieldList& fList = static_cast<const rfa::data::FieldList&>(data);
rfa::data::FieldListReadIterator it;
for (it.start(fList); !it.off(); it.forth())
{
....
}
}
}The call stack shows this:
.dll!rsslDecodeFieldEntry(RsslDecIterator * iIter, RsslFieldEntry * oField) Line 222 C
.dll!rfa::data::FieldListReadIterator::start(const rfa::data::FieldList & fieldList, unsigned char iteratorMask, rfa::data::FieldListDef * pFieldListDef) Line 28 CI'm not sure it helps but here are the values we can see on the _fieldEntry on the iterator:
+ rfa::data::DataEntry {_entryAttrib={_entryType=243 'ó' _containedDataType=128 '€' _bCopy=false ...} } rfa::data::DataEntry
_contentMask 0 '\0' unsigned char
+ _rwfFieldEntry {fieldId=0 dataType=86 'V' encData={length=0 data=0x00000000 <NULL> } } RwfFieldEntryWe'll try to have the RSSL logs enabled and send you more details if needed.
I'll appreciate also if you update the link to "RDMUsageGuide.pdf" which looks broken.
0 -
I'm sorry for responding late, but we had difficulties to reproduce again the issue. It happened once and this was the latest message logged by RFA lib, I'm not 100% sure taht this was the failing message because at that precise time we wasn't able to dump the process, but looks like a good candidate.
<updateMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="66" containerType="RSSL_DT_FIELD_LIST" flags="0x10 (RSSL_UPMF_HAS_SEQ_NUM)" updateType="0 (RDM_UPD_EVENT_TYPE_UNSPECIFIED)" seqNum="23568" dataSize="0">
<dataBody>
</dataBody>
</updateMsg>
Can you have a look if additional checks should be added in our code in order to protect against access violation in it.start() call :
if (respMsg.getHintMask() & rfa::message::RespMsg::PayloadFlag) { const rfa::common::Data& data = respMsg.getPayload();
if (data.getDataType() == rfa::data::FieldListEnum) { const rfa::data::FieldList& fList = static_cast<const rfa::data::FieldList&>(data);
rfa::data::FieldListReadIterator it;
for (it.start(fList); !it.off(); it.forth()) { ....
}
}
}Let me know if you need more details.
Regards,
Stefan
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 716 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛