-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
velib_python: fix race condition during service creation #1310
Comments
jhofstee
added a commit
to victronenergy/meta-victronenergy
that referenced
this issue
Jul 17, 2024
v1.6.16: Fix potential race condition with systemcalc victronenergy/venus#1310 v1.6.14: Accept invalid dbus-path as non-error condition as well v1.6.15: Support for DC genset
izak
added a commit
to victronenergy/dbus-digitalinputs
that referenced
this issue
Sep 19, 2024
This reduces the possibility of a race condition during scanning. victronenergy/venus#1310
izak
added a commit
to victronenergy/dbus_generator
that referenced
this issue
Sep 19, 2024
This brings it up to date with master and makes it the same as the other projects. Also makes interface explicit on dbus calls, which will become important once dbus-generator starts talking to acsystem services. victronenergy/venus#1310
izak
added a commit
to victronenergy/dbus_vebus_to_pvinverter
that referenced
this issue
Sep 19, 2024
Only register the dbus service after all mandatory dbus paths are populated. Also, update velib_python. victronenergy/venus#1310
jhofstee
added a commit
to victronenergy/meta-victronenergy
that referenced
this issue
Sep 19, 2024
Avoid race conditions when service is scanned before all mandatory paths are populated. victronenergy/venus#1310
jhofstee
added a commit
to victronenergy/meta-victronenergy
that referenced
this issue
Sep 19, 2024
Bring velib_python up to date Avoiding the race condition in system scanning was already fixed in Venus 3.40, this just brings the code up to date with the other prjects. victronenergy/venus#1310 Add Helper relay for connected gensets victronenergy/venus#1286
jhofstee
added a commit
to victronenergy/meta-victronenergy
that referenced
this issue
Sep 19, 2024
Avoid race conditions when service is scanned before all mandatory paths are populated. victronenergy/venus#1310
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This bug has been in velib_python since at least March 2014, and affects ALL python services that publish data, and uses velib_python.
The bug is that the dbus service name is claimed before the paths and interfaces are registered.
This means that another service scanning this one precisely after the name was claimed but before service construction is complete, may get any number of errors, including:
The bug affects faster platforms more. Observed mostly with DSE genset services on Ekrano, but will affect others. Could not be reproduced on the slowest platform, the CCGX, and only with many repeated attempts a Cerbo.
The fix consists of
VeDbusService
object. This allows to first construct the vedbus Object, then set all paths up, and only thereafter register it on the dbus. See this commit as well as the few commits after that.And then updating the following projects to use the new velib_python and explicitly do service construction after adding all the paths:
The text was updated successfully, but these errors were encountered: