Error handling

6 posts / 0 new
Last post
Offline
Last seen: 6 years 2 months ago
Joined: 08/28/2013
Posts: 66
Error handling

Hi,

I would like to know which preconisation are you (RTI) giving for handling errors.

For example, i have a good behaviour but suddenly i got this following:

DDS RX of Type
[5.783333302] ERROR:ModuleID=7,Errcode=198,X=1,E=0,STATUS=f0000000
  empty/DataReaderInterface.c:752/DDS_DataReaderInterface_receive:

[DATAREADER] No entry for topic DPC_ST
[5.816666634] ERROR:ModuleID=6,Errcode=22,X=1,E=0,STATUS=f0000000
  empty/RTPSInterface.c:2091/RTPSReceiver_forward_upstream:receive

[5.816666634] ERROR:ModuleID=7,Errcode=198,X=1,E=0,STATUS=f0000000
  empty/DataReaderInterface.c:752/DDS_DataReaderInterface_receive:

[5.966666629] ERROR:ModuleID=6,Errcode=59,X=1,E=0,STATUS=f0000000
  empty/RTPSInterface.c:3200/RTPSInterface_receive:pstream

What should the user process do in order to handle this kind of error.

Moreover, if such error occurs often, shall the subscriber and datawriter be delete and created again ?
Is there kind of "flush" buffer method to restart everything ?

Im working with RTI Micro Edition 2.2.3

Regards,


Rodolf

 

 

Offline
Last seen: 2 years 3 months ago
Joined: 01/17/2013
Posts: 22

Hi Rodolf,

The error DataReaderInterface.c:752/DDS_DataReaderInterface_receive is likely triggered by a sample being rejected due to a resource limit being exceeded.  Enabling DDS_SAMPLE_REJECTED_STATUS when creating the DataReader and installing an on_sample_rejected callback with the DataReaderListener would verify this.  An example empty callback follows:  

void
MyDataReaderListener_on_sample_rejected(
                        void *listener_data,
                        DDS_DataReader *reader,
                        const struct DDS_SampleRejectedStatus *status)
{
} 

DDS_SampleRejectedStatus will have the last_reason for the rejection, and which will indicate which resource limit was exceeded that caused the rejection:

typedef enum
{
    /*e \dref_SampleRejectedStatusKind_NOT_REJECTED
     */
    DDS_NOT_REJECTED,

    /*e \dref_SampleRejectedStatusKind_REJECTED_BY_INSTANCES_LIMIT
     */
    DDS_REJECTED_BY_INSTANCES_LIMIT,

    /*e \dref_SampleRejectedStatusKind_REJECTED_BY_SAMPLES_LIMIT
     */
    DDS_REJECTED_BY_SAMPLES_LIMIT,

    /*e \dref_SampleRejectedStatusKind_REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT
     */
    DDS_REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT,

    /*e \dref_SampleRejectedStatusKind_REJECTED_BY_REMOTE_WRITERS_LIMIT
     */
    DDS_REJECTED_BY_REMOTE_WRITERS_LIMIT,

    /*e \dref_SampleRejectedStatusKind_REJECTED_BY_REMOTE_WRITERS_PER_INSTANCE_LIMIT
     */
    DDS_REJECTED_BY_REMOTE_WRITERS_PER_INSTANCE_LIMIT,

    /*e \dref_SampleRejectedStatusKind_REJECTED_BY_SAMPLES_PER_REMOTE_WRITER_LIMIT
     */
    DDS_REJECTED_BY_SAMPLES_PER_REMOTE_WRITER_LIMIT
} DDS_SampleRejectedStatusKind;

Increasing that limit should mitigate the errors.

The other errors from RTPSInterface are downstream and triggered by this DataReaderInterface error.

Regards,

Edward

 

Offline
Last seen: 6 years 2 months ago
Joined: 08/28/2013
Posts: 66

Hi Edward,

Thanks for information, i will use all call backs in order to better trace what is happening.
What i don t understand is that my ressources are OK for my DataReader to receive the Topics (size of 52 bytes).
There is only one datawriter publishing one instance many times:

dr_qos->resource_limits.max_instances=2;
dr_qos->resource_limits.max_samples=10;
dr_qos->resource_limits.max_samples_per_instance=5;
dr_qos->history.depth = 1;
dr_qos->history.kind = DDS_KEEP_LAST_HISTORY_QOS;
dr_qos->liveliness.lease_duration.sec = 1;
dr_qos->reader_resource_limits.max_remote_writers = 10;

What should be put in order to receive continously an instance ?
I will and can not set max_samples_per_instance to 999999999999999999999.

Regards,

Rodolf

Offline
Last seen: 2 years 3 months ago
Joined: 01/17/2013
Posts: 22

Hi Rodolf,

Those limits seem ok.  While I investigate the code further, please implement the callback to verify samples are being rejected.  

Also, are you using read() and/or take()?  And are you calling read/take from the DataReaderListener's on_data_available callback, or are you doing a polling read/take?

Regards,

Edward

 

Offline
Last seen: 6 years 2 months ago
Joined: 08/28/2013
Posts: 66

Hi,

I didn t implement yet all callbacks. As soon as done, i come back with more information.
Im using "basic" implementation, i.e. the callback on_data_available with a take method finished by return_loan.

May be it is related also with this value take_max_sample in input of take():

const DDS_Long TAKE_MAX_SAMPLES = 32;
ret = DDS_DataReader_take(dr,(REDA_Sequence *) &sampleSEQUENCE, &info_seq, TAKE_MAX_SAMPLES,DDS_ANY_SAMPLE_STATE, DDS_ANY_VIEW_STATE, DDS_ANY_INSTANCE_STATE);

Offline
Last seen: 6 years 2 months ago
Joined: 08/28/2013
Posts: 66

Hi,

I added all callbacks, i.e. rejected sample and i don t get any clue why data exchange fails.

Should these callbacks be set also for participant ?
I have done only for DataReader and DataWriter.

Everything is fine in my process untill a launch of a new subscriber for my datawriter where i get these logs:

] TID[2173716528]remove remote subscription
0x81904830 (udp_rx_uc): DDS DataWriter of Topic xxx has currently 0000 Nb of DataReader Matching with Qos
[45.49999998] TID[2173716528]remove remote publication
[45.66666664] TID[2173716528][DP] Deleted remote publication c149cd52.ce5ca73d.dec0adde.3c2
[45.66666664] TID[2173716528]remove remote publication
[45.66666664] TID[2173716528][DP] Deleted remote publication c149cd52.ce5ca73d.dec0adde.4c2
[45.66666664] TID[2173716528]remove remote subscription
[45.66666664] TID[2173716528]remove remote subscription
[115.649999975] TID[2173716528]enable remote participant: name=[SUB],GUID=[d4acd52.ad0243a2.dec0adde.1c1]
[115.649999975] TID[2173716528]enable remote publication
[115.666666641] ERROR:ModuleID=6,Errcode=76,X=1,E=0,STATUS=f0000000
  empty/RTPSInterface.c:1883/RTPSInterface_bind_external:

[115.666666641] ERROR:ModuleID=7,Errcode=109,X=1,E=0,STATUS=f80000ac
  empty/DataReaderDiscovery.c:590/DDS_DataReader_add_route:datareader[0.85888808.dfc0adde.3c7]: add route for topic=DCPSPublication

[115.683333306] TID[2173716528]enable remote subscription
[115.699999973] TID[2173716528]enable remote publication
[115.699999973] ERROR:ModuleID=6,Errcode=76,X=1,E=0,STATUS=f0000000
  empty/RTPSInterface.c:1883/RTPSInterface_bind_external:

[115.699999973] ERROR:ModuleID=7,Errcode=109,X=1,E=0,STATUS=f80000ac
  empty/DataReaderDiscovery.c:590/DDS_DataReader_add_route:datareader[0.85888808.dfc0adde.4c7]: add route for topic=DCPSSubscription

[115.699999973] TID[2173716528]enable remote subscription
[115.699999973] ERROR:ModuleID=6,Errcode=60,X=1,E=0,STATUS=f0000000
  empty/RTPSInterface.c:3213/RTPSInterface_receive:

[115.716666638] ERROR:ModuleID=6,Errcode=60,X=1,E=0,STATUS=f0000000
  empty/RTPSInterface.c:3213/RTPSInterface_receive:

[118.66666664] ERROR:ModuleID=6,Errcode=60,X=1,E=0,STATUS=f0000000
  empty/RTPSInterface.c:3213/RTPSInterface_receive:

With practice, i know that is related to remote publication and subscription ressources but i am unable to log or catch this kind of error event.

The worst is that my external subscriber found the publisher but the publisher do not see or detect the subscriber.

Any help would be appreciated.
Regards,

Rodolf