-
Notifications
You must be signed in to change notification settings - Fork 43
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
IOC lockRequest messages and inconsistent record scanning #71
Comments
I never had real-time in mind when writing this driver and did not pay much atttention on the performance values.
I wonder a bit that you see only "return to normal" messages but no actual error message. Need to check that. Please provide full database, protocol files and sample data. Best send per mail directly to me. |
This IOC is using Serial We have 146 records that can access this port but only 62 that have a regular scan rate. That's a good point, the numbers aren't the time between record processes but the time between the communications triggered by the record processing. I got these values by setting asynSetTraceIOMask to report each command sent. As this is the time between messages sent from the IOC I don't think the device is the slow part, I see the subsequent response from the device in around 1ms (again using asynSetTraceIOMask). I will send the IOC to you via email. Sorry I missed some previous error messages: `[Wed Mar 24 12:14:36 2021]�[31;1m2021/03/24 12:14:36.753586 main BL04I-MO-ROBOT-01:BCODE lockRequest: port robot_serial not connected [Wed Mar 24 12:14:36 2021]�[0m�[31;1m2021/03/24 12:14:36.753613 main BL04I-MO-ROBOT-01:BCODE: Can't start @init handler [Wed Mar 24 12:14:36 2021]�[0m�[31;1m2021/03/24 12:14:36.753622 main BL04I-MO-ROBOT-01:BCODE: Record initialization failed [Wed Mar 24 12:14:36 2021]�[0mBad init_rec return value PV: BL04I-MO-ROBOT-01:BCODE ao: init_record |
The message "lockRequest: port robot_serial not connected" shows that |
Thanks Dirk, thanks for looking into this and explaining the issue. We are using a terminal server over TCP to talk to a serial device. What is odd is this method of communication is extremely common at diamond and using the older version of stream device (2.5) we never see this error. |
I changed something in the connection handling, using Anyway, this has nothing to do with the processing time changes. |
Comparing with my older code, I see that before relying on auto-connect, I used |
Hi Dirk, I don't know this module intimately but are you saying that using the |
Using And it slows down the port thread later when the device drops out, but you may not see that as the rest of the IOC will continue to run, only all records connected to the same port will get As the |
OK thanks Dirk, now that I understand the errors I think I can run with them. The other issue is the performance but I guess that's potentially a rabbit hole... |
For that I would probably need access to such a device. Simply you telling me "something is slower" does not really allow me to track things down. What you can do: Build intermediate versions of StreamDevice and hunt down which commit caused the performance loss. Then I may understand what is going on. Maybe start with the latest 2.7 version and compare it to the first 2.8 version. |
OK thanks, i'll do that. Because i'm comparing to a very old version it may be the case that the performance has gotten worse over many commits but I will verify that. Thanks |
Apologies for the slow progress on this. I have narrowed the issue down to commit d777084 The issue if present after this commit but not before it. |
Hi,
I'm in the early stages of characterising an issue I've been seeing but in case it's something obvious I thought I would raise it now. Our version of streamDevice is 2.8.18.
We have rolled this version of streamDevice out on a few IOCs and haven't had any issues except for on one IOC. The IOC in question monitors how long it takes to get a response from a device, it reports that some readback PVs aren't getting updated as fast as they were on an older version (2.5). The record in question and an "ai" record and has a scan rate of 0.2 seconds. By setting some asyn trace masks I was able to see exactly when the record was querying the hardware, below is the time in seconds between these queries:
2.8.18:
avg 0.458166666666666
max 1.569
stdev 0.385062690171769
2.5:
avg 0.342230769230769
max 0.777
stdev 0.220675811463744
As you can see there doesn't appear to be a big difference in the average but the max is double. It's also less consistent as shown in the stdev.
This particular IOC does also give the occasional error, on boot and during operation:
2021/03/24 14:26:57.778463 robot_serial BL04I-MO-ROBOT-01:CNTL_ERR_CODE lockRequest: status returned to normal 2021/03/24 14:26:56.867206 robot_serial BL04I-MO-ROBOT-01:DRYTMR lockRequest: status returned to normal 2021/03/24 14:26:56.867218 robot_serial BL04I-MO-ROBOT-01:DRY_SPEED lockRequest: status returned to normal 2021/03/24 14:26:56.867229 robot_serial BL04I-MO-ROBOT-01:DRY_TIME lockRequest: status returned to normal
I don't know if this is related.
It should be pointed out that i've seen this behaviour by only changing the streamDevice dependency.
I appreciate this isn't much to go on but I will investigate further, I just thought i'd raise the issue now in case you can see anything obvious.
Thanks
The text was updated successfully, but these errors were encountered: