Refinitiv / Real-Time-SDK

Other
180 stars 128 forks source link

Failed to call `Unregister` method on the `OmmConsumer`: `Failed to close item request. Reason: FAILURE. Error text: Channel.IOCtl failed` #277

Closed ArturWincenciak closed 2 months ago

ArturWincenciak commented 3 months ago

When calling the Unregister method on the OmmConsumer object, we get quite often an exception.

For example, after calling RegisterClient on the OmmConsume object, I register the IOmmConsumerClient with 270 different RequestMsg and then call the Unregister method on the OmmConsumer object for all registrations pass the handle ID (long) obtained from the RegisterClient.

To reproduce this bug, follow these steps:

  1. register for 270 RequestMsg with the same IOmmConsumerClient,
  2. then, after one second, call Unregister for each registration,
  3. and repeat this scenario 10 times.

This process is resulting in 10 to 15 exceptions.

Below, I am sharing the message and stack trace of the exception.

Failed to close item request. Reason: FAILURE. Error text: Channel.IOCtl failed, error: 

   at LSEG.Ema.Access.OmmConsumerImpl.HandleInvalidUsage(String text, Int32 errorCode)
   at LSEG.Ema.Access.OmmBaseImpl`1.Unregister(Int64 handle)
   at LSEG.Ema.Access.OmmConsumerImpl.Unregister(Int64 handle)
   at LSEG.Ema.Access.OmmConsumer.Unregister(Int64 handle)
   at GainCapital.Trep.Managed.Client.Internal.Impl.TrepSubscription.Dispose()
   at TrepSamples.Client.ReproduceBug.Unsubscribe() in C:\g\TrepSamples\TrepSamples\ReproduceBug.cs:line 84

Exception Type='OmmInvalidUsageException', Text='Failed to close item request. Reason: FAILURE. Error text: Channel.IOCtl failed, error: ', Error Code='-1'

We would be grateful if you could take care of this case.

V-Anyakin commented 3 months ago

@ArturWincenciak Thank you for raising this issue and the information provided. We created an internal Jira to investigate it.

vlevendel commented 2 months ago

RTSDK 2.2.0.L1 addresses this issue. Please let us know if you have further concerns. Closing.

ArturWincenciak commented 2 months ago

Thanks. We will test the RTSDK 2.2.0.L1 version.

ArturWincenciak commented 2 months ago

It works properly. Thank you.