You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.
A problem introduced in PR #423 could lead to a crash of a device server when it tries to push an event at the same time as it is receiving a ZmqEventSubscriptionChange command.
This problem is coming from the fact that ZmqEventSupplier::create_full_event_name() is now called at the end of DServer::zmq_event_subscription_change() method. This method is modifying ZmqEventSupplier::event_name and ZmqEventSupplier::ctr_event_name members but its access is not protected by any mutex when this method is called in DServer::zmq_event_subscription_change() so several threads can modify its value which can get corrupted and lead to crashes.
One possible simple fix would be to have ZmqEventSupplier::create_full_event_name() no longer using ZmqEventSupplier::event_name and ZmqEventSupplier::ctr_event_name but using a local variable instead.
Some changes would then be required in ZmqEventSuppler::push_event() to store the result from create_full_event_name() in event_name and ctr_event_name variables.
The text was updated successfully, but these errors were encountered:
bourtemb
added a commit
to bourtemb/cppTango
that referenced
this issue
Sep 10, 2018
A problem introduced in PR #423 could lead to a crash of a device server when it tries to push an event at the same time as it is receiving a ZmqEventSubscriptionChange command.
This problem is coming from the fact that ZmqEventSupplier::create_full_event_name() is now called at the end of DServer::zmq_event_subscription_change() method. This method is modifying ZmqEventSupplier::event_name and ZmqEventSupplier::ctr_event_name members but its access is not protected by any mutex when this method is called in DServer::zmq_event_subscription_change() so several threads can modify its value which can get corrupted and lead to crashes.
One possible simple fix would be to have ZmqEventSupplier::create_full_event_name() no longer using ZmqEventSupplier::event_name and ZmqEventSupplier::ctr_event_name but using a local variable instead.
Some changes would then be required in ZmqEventSuppler::push_event() to store the result from create_full_event_name() in event_name and ctr_event_name variables.
The text was updated successfully, but these errors were encountered: