question

Upvotes
Accepted
26 1 3 12

Application crashes while handling "Force Logout From DACs"

Hi,

I am testing "Force Logout From DACs" with my pricefeed simulator and application. Whenever "Force Logout From DACs" is received to the application, it carries out following actions. I am using ema3.6.6.L1.

m_consumer->unregister(m_loginHandle);
m_loginHandle = 0;
delete m_consumer;
m_consumer = nullptr;

m_consumer = new refinitiv::ema::access::OmmConsumer(consumerConfig);

I can see following message in XmlTrace file just before application getting crashed.

<!-- End Message (Channel IPC descriptor = 105) -->
<!-- Incoming Message (Channel IPC descriptor = 105) -->
<!-- Time: 12:04:55:236 -->
<!-- rwfMajorVer="14" rwfMinorVer="1" -->
<refreshMsg domainType="RSSL_DMT_SOURCE" streamId="2" containerType="RSSL_DT_MAP" flags="0x168 (RSSL_RFMF_HAS_MSG_
KEY|RSSL_RFMF_SOLICITED|RSSL_RFMF_REFRESH_COMPLETE|RSSL_RFMF_CLEAR_CACHE)" groupId="0" dataState="RSSL_DATA_OK" st
reamState="RSSL_STREAM_OPEN" code="RSSL_SC_NONE" text="Refresh Complete"  dataSize="398">
    <key  flags="0x8 (RSSL_MKF_HAS_FILTER)"  filter="11"/>
    <dataBody>

Application is getting crashed with following stack trace

#0  0x00007fec113d19bd in refinitiv::ema::access::LoginCallbackClient::processStatusMsg(RsslMsg*, RsslReactorChannel*, RsslRDMLoginMsgEvent*) () from /x01/exch/current/libs/libpricefeedelektron.d.so
#1  0x00007fec113d2f72 in refinitiv::ema::access::LoginCallbackClient::processCallback(RsslReactor*, RsslReactorChannel*, RsslRDMLoginMsgEvent*) () from /x01/exch/current/libs/libpricefeedelektron.d.so
#2  0x00007fec114cda2c in _reactorProcessMsg () from /x01/exch/current/libs/libpricefeedelektron.d.so
#3  0x00007fec114cffca in _reactorWatchlistMsgCallback () from /x01/exch/current/libs/libpricefeedelektron.d.so
#4  0x00007fec114f76fa in rsslWatchlistReadMsg () from /x01/exch/current/libs/libpricefeedelektron.d.so
#5  0x00007fec114d03ae in _reactorReadWatchlistMsg () from /x01/exch/current/libs/libpricefeedelektron.d.so
#6  0x00007fec114d0c82 in _processRsslRwfMessage () from /x01/exch/current/libs/libpricefeedelektron.d.so
#7  0x00007fec114d103f in _reactorDispatchFromChannel () from /x01/exch/current/libs/libpricefeedelektron.d.so
#8  0x00007fec114d869a in rsslReactorDispatch () from /x01/exch/current/libs/libpricefeedelektron.d.so
#9  0x00007fec113da73d in refinitiv::ema::access::OmmBaseImpl::rsslReactorDispatchLoop(long long, unsigned int, bool&) () from /x01/exch/current/libs/libpricefeedelektron.d.so
#10 0x00007fec113dac4f in non-virtual thunk to refinitiv::ema::access::OmmBaseImpl::run() ()
   from /x01/exch/current/libs/libpricefeedelektron.d.so
#11 0x00007fec1142faea in refinitiv::ema::access::Thread::runThread(void*) ()
   from /x01/exch/current/libs/libpricefeedelektron.d.so
#12 0x00007fec17e1f14a in start_thread () from /lib64/libpthread.so.0
#13 0x00007fec17b4edc3 in clone () from /lib64/libc.so.


What could be the reason ? Whenever i delete consumer, are there anything else to be done ? Following is the "Force Logout From DACs" message received by the applicaiton. Note that i tried this with Real-Time-SDK-2.1.2.L1 as well. Same behaviour was observed.

<!-- End Message (Channel IPC descriptor = 105) -->
<!-- Incoming Message (Channel IPC descriptor = 105) -->
<!-- Time: 12:04:54:844 -->
<!-- rwfMajorVer="14" rwfMinorVer="1" -->
<statusMsg domainType="RSSL_DMT_LOGIN" streamId="1" containerType="RSSL_DT_NO_DATA" flags="0x20 (RSSL_STMF_HAS_STATE)" dataState="RSSL_DATA_SUSPECT" streamState="RSSL_STREAM_CLOSED" code="RSSL_SC_NOT_ENTITLED" text="Force Logout from DACS."  dataSize="0">
    <dataBody>
    </dataBody>
</statusMsg>


#technologyema-apic++
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @thilinaillangasinghe ,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thank you,

AHS

Hello @thilinaillangasinghe

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thank you,

AHS

Upvotes
Accepted
79.2k 251 52 74

@thilinaillangasinghe

Actually, it relates to the stream state. The "Force Logout From DACs" is a status text in a status message of the login stream and the stream state in that login status message is CLOSED.

When the stream is CLOSED, API will not recover the stream. Therefore, when the login stream is CLOSED, the OMMConsumer will not recover the login stream and it stops working.

To recover the login stream, the application needs to re-login to the server. To do this in EMA, the application needs to create a new instance of the OMMConsumer.



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
26 1 3 12

Can it be something like, whatever the thread having LoginCallbackClient object, is not getting destroyed whenever Consumer object is getting destroyed ?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@thilinaillangasinghe

Did you delete the consumer (delete m_consumer) inside the callback function, such as AppClient::onStatusMsg?

Hi @thilinaillangasinghe , would you mind addressing @Jirapongse 's request, so we investigate the issue further?
Upvotes
26 1 3 12

Hi @Jirapongse , yes, i delete consumer inside onStatusMsg callback function. Please confirm if it could be the reason. I'll accept your answer

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@thilinaillangasinghe

Yes, it could be the problem.

The thread that calls the application's callback methods is owned by the OmmConsumer.

It is not the good idea to delete the OmmConsumer while it is in use.


Upvotes
26 1 3 12

I failed to find a documentation specifically asking to handle Force Logout From DACs. @Jirapongse , @aramyan.h , can you please mention a link, if it is already mentioned somewhere in Realtime SDK repository documentations ?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.