Skip to content
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

RPC call to Platform Driver before onstart will break DriverAgent instance. #3202

Closed
davidraker opened this issue Jan 21, 2025 · 0 comments
Closed
Assignees

Comments

@davidraker
Copy link
Contributor

DriverAgent instances are created for each device, and each of these has a self.interface attribute, which is only created onstart. Calling an RPC method, .e.g., set_point before the onstart method runs will cause an AttributeError due to the missing interface attribute which is not handled. Restart of the driver is required to fix that device.

To Reproduce
Create an agent which is makes frequent RPC calls to the driver and start it at the same time or before the driver. Some percentage of the time, the race condition will be triggered.

Expected behavior
The exception should be handled so that it does not break the device.

Additional context
The interface attribute should have been created in init, but this would break some interfaces which require things that aren't available yet. Adding a dummy interface would not really fix the issue either so, while not ideal, we should probably just be catching the missing attribute to avoid the bad effects and logging that it happened.

@davidraker davidraker self-assigned this Jan 21, 2025
@davidraker davidraker mentioned this issue Jan 21, 2025
1 task
@craig8 craig8 closed this as completed Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants