Is there a memory leak in readRDMFieldDictionary? rfa8.1.0.L1
Hello
I am using the C++ API on Linux rfa8.1.0.L1. I have created a very small simple program that looks like this:
::rfa::rdm::RDMFieldDictionary& foo = ::rfa::rdm::RDMFieldDictionary::create();
foo.destroy();
This is fine, but the moment that I add a call to readRDMFieldDictionary in between the calls to create() and destroy(), the program leaks memory according to LeakSanitiser, like so:
================================================================= ==13136==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 256 byte(s) in 1 object(s) allocated from: #0 0x7fbd695c55a0 in __interceptor_realloc ../../../../gcc-8.2.0-src/libsanitizer/asan/asan_malloc_linux.cc:105 #1 0x42e230 in rfa::rdm::RDMFieldDictionaryInt::readRDMFieldDictionary(rfa::common::RFA_String const&) (/apps/a1628967/ECOMMFX-630/s2bx/build.waf/debug_asan/install/unittest/RFA_Leaks_UnitTest+0x42e230)
Direct leak of 256 byte(s) in 1 object(s) allocated from: #0 0x7fbd695c55a0 in __interceptor_realloc ../../../../gcc-8.2.0-src/libsanitizer/asan/asan_malloc_linux.cc:105 #1 0x42e253 in rfa::rdm::RDMFieldDictionaryInt::readRDMFieldDictionary(rfa::common::RFA_String const&) (/apps/a1628967/ECOMMFX-630/s2bx/build.waf/debug_asan/install/unittest/RFA_Leaks_UnitTest+0x42e253)
Direct leak of 256 byte(s) in 1 object(s) allocated from: #0 0x7fbd695c55a0 in __interceptor_realloc ../../../../gcc-8.2.0-src/libsanitizer/asan/asan_malloc_linux.cc:105 #1 0x42e20d in rfa::rdm::RDMFieldDictionaryInt::readRDMFieldDictionary(rfa::common::RFA_String const&) (/apps/a1628967/ECOMMFX-630/s2bx/build.waf/debug_asan/install/unittest/RFA_Leaks_UnitTest+0x42e20d)
SUMMARY: AddressSanitizer: 768 byte(s) leaked in 3 allocation(s).
Best Answer
-
I could see the problem with the Visual Studio Profiler.
If you are an RDC named user, please submit this issue to the RDC support team via Contact Premium support to investigate and confirm the problem.
1
Answers
-
Hello @irfan.butt ,
If you are designing or looking into a new realtime consumer or producer application, I would recommend to go with new, strategic and continuously improving Refinitiv Real-Time SDK C/C++ API suite, comprised of EMA - ease of use message tier and low-level ETA transport tier, Quickstart guide can be helpful in getting the first integration quickly and efficiently. Would first look into EMA option.
Article Choosing a Refinitiv Real-time Streaming API can be very helpful in making informed and up-to-date selection of realtime API.
If the issue is with an existent RFA application, please see Refinitiv Robust Foundation API (RFA) C++ and more details in the linked PCN, on re-branding, the existing applications will continue to work as is, however, it's important to know, that past the mandatory migration date, only re-branded versions continue to be fully supported , please also see this this previous discussion thread for the detailed relevant answer.
Hope this information is of help
1 -
Hi @zoya faberov thanks for your prompt reply.
The issue is with an existing RFA application. We've only just noticed the leak because we've written a new unit test that is compiled with LeakSanitiser.
As a result of this, I simplified the code so that I now have a very simple test which calls create() and destroy().
The moment I call readRDMFieldDictionary(...) in between these 2 calls, LeakSanitiser reports the 3 leaks I have mentioned. The leaks are unrelated to the complexity of the dictionary, i.e. if the dictionary has 0 entries, I get 3 leaks, if it has 10 entries, I get 3 leaks, if it has 10s of entries, I still get 3 leaks.
I can try upgrading to a more recent version of the RFA library. How can I get a new version of the library? Has the interface changed between 8.1.0.L1 and more recent versions?
Regards
Irfan
0 -
Hello @irfan.butt ,
Please download the latest rebranded version from Refinitiv Robust Foundation API (RFA) C++-> Downloads.
If your app was running for a while and there were no issues (i.e. excessive memory increases) , I would be cautious of a mis-report of an issue:
- The reason being that RFA is a very mature API, has been around for long time, dictionary read has been in place, and all this time, any issue reported were fixed in the next releases.
- Even if we consider that most would use the recommended download of the dictionary from infra (always up-to-date) still many would read local, and would have reported any leaks by now.
I would rebuild with the latest ( the interface should be the same) and see if you still observe the report.
If you continue seeing the report, I would let the app run for a while and see if you observe the leak, the increase in size and how much, without subscriptions/publications established, and go from there.
0 -
Hi there, thanks for investigating and confirming my findings. I'll raise this with someone in our organisation who has RDC named user access, and I'll also see if we are able to upgrade to the latest version of the library.
Regards
Irfan
0 -
Also,
@Jirapongse , which version of the RFA library did you find this leak in?0 -
I tested with RFA 8.2.2.L1.
1 -
Hi
@Jirapongse , thanks for letting me know that's most helpful. I'll see what I can do about raising this with your Premium Support team.Regards
Irfan
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛