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
update_interface_state() for providing interfaces-state.interface... has a few problems.
At first, you should probably merge or pick this commit, as the setters are broken since 5ff31d9.
Secondly, the function is dispatching rpc_get_interface_state() synchronously while we almost always will be called by some libev dmconfig watcher deep down in the stacktrace. It is generally unsafe to mix synchronous and asynchronous dmconfig use. The synchronous call will do ev_run() on the default event loop, so all sorts of watchers could be run unexpectedly. Furthermore, even if we created a dedicated event loop, but reused the dmconfig connection to the config agent (eg. mand-cfgd), this could cause trouble as there might currently be traffic on that connection.
(In my case, it's causing crashes, although I haven't analyzed the exact chain of events.)
I'm unsure how to solve this. Perhaps all synchronous calls should be on their own event loop and the config agent should make sure that the "-state" role is registered on a dedicated dmconfig connection not used for anything else but answering rpc_get_interface_state().
The text was updated successfully, but these errors were encountered:
Sorry, this is not related to your question: OpenCPE has not been updated for about 6-7 years. Is this project abandoned?
Seems to be pretty much dead, yes. However I'm using and keeping it up to date in this branch/fork: https://github.com/metratec/mand
The way we are using it is in no way connected to OpenCPE.
I am not aware of any other comparable open source device management database. dconf with some additional embedded patches might be a viable alternative if you are willing to go for the GNOME stack (or at least glib).
Btw. I seem to have fixed the bug described here in f478a5b and 3354f34. In our config agent, I use a dedicated dmconfig session for state reporting to be on the safe side. The commit could probably be ported to mand-cfgd.
update_interface_state()
for providinginterfaces-state.interface...
has a few problems.At first, you should probably merge or pick this commit, as the setters are broken since 5ff31d9.
Secondly, the function is dispatching rpc_get_interface_state() synchronously while we almost always will be called by some libev dmconfig watcher deep down in the stacktrace. It is generally unsafe to mix synchronous and asynchronous dmconfig use. The synchronous call will do ev_run() on the default event loop, so all sorts of watchers could be run unexpectedly. Furthermore, even if we created a dedicated event loop, but reused the dmconfig connection to the config agent (eg. mand-cfgd), this could cause trouble as there might currently be traffic on that connection.
(In my case, it's causing crashes, although I haven't analyzed the exact chain of events.)
I'm unsure how to solve this. Perhaps all synchronous calls should be on their own event loop and the config agent should make sure that the "-state" role is registered on a dedicated dmconfig connection not used for anything else but answering rpc_get_interface_state().
The text was updated successfully, but these errors were encountered: