-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix observed hangs with LV measurements for certain situations of service launches #266
Conversation
…data to use Signed-off-by: Jonathan Mendez <jonathan.mendez@ni.com>
Signed-off-by: Jonathan Mendez <jonathan.mendez@ni.com>
Would you be able to post some screenshots for the relevant changes? I'm not sure if I need to look at all these files or if most are just type prop that had to be saved. |
Source/Runtime/MeasurementLink Measurement Server/Classes/MeasurementServiceV1/Start Sync.vi
Show resolved
Hide resolved
...ntLink Measurement Server/Classes/MeasurementServiceV1/Register gRPC Methods and Messages.vi
Outdated
Show resolved
Hide resolved
I found that the only VIs with real changes are:
|
Yes, I'm working on that now. Unfortunately I ran out of time at my computer as I was posting the PR earlier. |
Signed-off-by: Jonathan Mendez <jonathan.mendez@ni.com>
Signed-off-by: Jonathan Mendez <jonathan.mendez@ni.com>
Signed-off-by: Jonathan Mendez <jonathan.mendez@ni.com>
c46484c
to
b170ddf
Compare
* main: Fix observed hangs with LV measurements for certain situations of service launches (#266)
What does this Pull Request accomplish?
Fixes AB#2508868 and AB#2464807
Why should this Pull Request be merged?
In the existing implementation of the service startup code, there is a race condition caused by a delay between registering the measurement service with Discovery Service (enabling clients to try to call the measurement service) and registering the user events for handling calls to the measurement service (enabling the measurement service to receive and react to calls). If a client makes a call to the measurement service between those two pieces of code, the measurement service never handles the call and the client waits indefinitely.
The fix moves the event registration before the measurement is registered with Discovery Service. The events are registered and the registration refnum is stored in the service private data to later be wired to the event handler. Through testing, the registration call is sufficient to be ready to handle calls, even if the event handler structure has not been reached yet.
What testing has been done?
Tested the implementation using a reproducing TestStand sequence that repeatedly calls and kills a measurement. Before the fix, a hang would consistently occur within a few minutes. After the fix, I have not observed a hang over many minutes and repeated runs.