ADLINK-IST / opensplice

This is the Vortex OpenSplice Community Edition source repository. For our commercial offering see
https://www.adlinktech.com/en/vortex-opensplice-data-distribution-service
Apache License 2.0
259 stars 155 forks source link

Random Corruption on Startup #107

Closed fresh-ji closed 4 years ago

fresh-ji commented 4 years ago

Dear whom it my concerned, I am following the opensplice dds hello world example to test my application. First i packaged my "messenger related thing" into DataTypes.dll, then i revised "DDSEntityManager.h" to support multiple topic, datawriter and datareader managements, at last i created serveral topics, datawriters and datareaders. However, on the last process, the application corrupted at random time. It means: 1.the corruption occurs RANDOMLY, from my test about one in two the corruption occurs. But once the application starts normally, the following processes would goes well without any exceptions. 2.the corruption point occurs RANDOMLY, it could happen when any topic is being created, when any datawriter is being created, when any datareader is being created, when subscriber is being created, when publisher is being created. Once it happens, the console window shut down itself and left nothing.

My dds edition:PXXX-VortexOpenSplice-6.9.181018OSS-HDE-x86_64.win-vs2017-installer My ide edition:visual studio 2013

fresh-ji commented 4 years ago

捕获2 this is the normal situation, everything well

fresh-ji commented 4 years ago

捕获1 捕获3 捕获4

Those are failed situations. The application stops at a random point, waiting 1 second , and corrupts.

ThijsSassen commented 4 years ago

@fresh-ji can you share the content of your ospl-info.log / ospl-error.log files? and the code of your example?

fresh-ji commented 4 years ago

This is the INFO when everything goes right: ospl-info-success.log

This is the INFO when corruption happens: ospl-info-fail.log

The error-log do not generates every time, it means, somethings the program corrupts without error-log. In other times, the following one generates: ospl-error.log

This is the primary invocation codes, the corruption could happens in these lines sometime: main

At last is the "DDSEntityManager" your example provides, i revised it by adding a input parameter: ct

Thanks for your concerning!

ThijsSassen commented 4 years ago

@fresh-ji the only indication i see in the logs is that some threads cannot make progress. Is there a high cpu load on your system or is your main loop spinning at 100% cpu? And from your code i can see you are using classic cpp API i would urge you to move to the isocpp2 API which is a much better fit for modern c++ programming.

fresh-ji commented 4 years ago

Thanks for your advices, i have found the isocpp2 examples and i will learn them carefully. I am just a fresh man of dds. I have a simple question: I noticed that the examles you offered are alomost one-topic-only. In my situation, i want to register many topics and datawriters/datareaders. As a relsult, what framework should i take, just one thread to listen all or every datareader has its own thread. And which example should i refer to? 捕获 Thanks for your concerning.

ThijsSassen commented 4 years ago

@fresh-ji If your new to DDS then before you start building anything I suggest you start with a dds tutorial and after this you can read through the Getting started guide