ca-gateway icon indicating copy to clipboard operation
ca-gateway copied to clipboard

Undefined Timestamp with ca-gateway >= R2-0-6-0

Open hhslepicka opened this issue 3 years ago • 5 comments

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:

$ EPICS_CA_SERVER_PORT=5124 caget -a KFE:TEST:HUGO:ENUM
KFE:TEST:HUGO:ENUM             <undefined> NO

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 where static.db is:
record(mbbo, "KFE:TEST:HUGO:ENUM")
{
   field(ZRST, "YES")
   field(ZRVL, "0")
   field(ONST, "NO")
   field(ONVL, "1")
   field(TWST, "MAYBE")
   field(TWVL, "2")
   field(VAL,  "0")
   field(PINI, "YES")
}
record(ai, "KFE:TEST:HUGO:AI")
{
   field(VAL, "0.0")
   field(PREC, 3)
   field(PINI, "YES")
}
  • 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.

hhslepicka avatar Mar 17 '21 17:03 hhslepicka