Open hhslepicka opened 3 years ago
A little update
If I make so that this condition (https://github.com/epics-extensions/ca-gateway/blob/master/src/gatePv.cc#L1558) is always true, all the problems are gone for timestamps.
If I apply the same "patch" to the latest version of the gateway everything seems to behave properly (at least for my uneducated brain).
By behave properly I mean it didn’t look odd to my tests which were:
I have not tested it with waveforms as they will require some changes on my simple database.
Thanks. This is a better place than my inbox. No bad intentions. (Only the best!) But I am pretty snowed in at this moment and may take a while to get to it.
If you have some time: you could morph your manual test into a test of the built-in test suite (they are pretty similar). That would help avoiding regressions once it is fixed.
Sorry that I reached out directly.. I should have thought of opening an issue here in the first place but the brain was damaged from GDD and ca-gateway! 😄 Thank you for the reply!
I will give that a try and see if I can make the regression test cover this case.
Bug Report
Recently at SLAC we started to notice some issues with the Archiver Appliance not properly archiving PVs.
When tracking it down we noticed that some PVs coming through the Gateway were reporting the timestamp as after the first time through the gateway.
We were running the latest from ca-gateway after an upgrade from 2.0.6.0.
Here is how it looks like:
I was able to isolate the issue once I moved back to 2.0.6.0 and cherry-picked every commit between 2.0.6 and 2.1.0 and testing on every change. The commit that introduces the issue is this one: https://github.com/epics-extensions/ca-gateway/commit/c6dc1597d991e41e96c16402cc4406c3b6b2f998
I am not very familiar with GDD and the ca-gateway but I am trying to investigate the root cause.
Please let me know if you have some insight or guidance or comments that could help me in finding a fix for it. I understand if not since it is a change introduced more than 5 years ago. (I guess folks run some very old gateways =) ).
Thank you!
Steps to Reproduce
In a host start a simple IOC. In my case I am running one with
softIoc -d static.db
wherestatic.db
is:Start a ca-gateway running 2.0.6.0 allowing only the PVs from this IOC to pass and using a different port for clients to connect to it (in my case I chose 5124).
From another host, try to caget this PV with the -a option to fetch the whole timestamp information as well. Notice that it will work…
Run again caget with the -a option and it will still work.
Now upgrade the ca-gateway to 2.1.0 or greater and repeat the test above.
On the first caget it will work but on the second it will display the timestamp as undefined.
Note: camonitor will have the same effect in case you are monitoring from the second host and update the PV via the first. The monitor update will display the new value but undefined for the timestamp.