Open ericonr opened 1 year ago
Could be an issue in PCAS, the C++ CA server that the Gateway and PCASPy use. On the other hand, if the PCASPy IOC serves the array out (and doesn't encounter issues), it might rather be related to the Gateway's use of PCAS.
It's memory corruption of the underlying gdd data container. Probably a container is created with the reported size (5000), then filled with the data of the real size array.
PCASPy should also get a ticket for allowing this and sending illegal Channel Access traffic.
if the PCASPy IOC serves the array out (and doesn't encounter issues)
Afaik it doesn't, its been running for a few years now.
Probably a container is created with the reported size (5000), then filled with the data of the real size array.
That's what I imagined!
PCASPy should also get a ticket for allowing this and sending illegal Channel Access traffic.
Noted, will send this report their way.
The backtrace for this crash is included below. It happens when we try to access a char array PV that's served by a PCASPy IOC, where 'count' was configured to 5000, but the actual count was 6270. It prints the following error message:
*** Error in '/opt/epics-7.0.4/modules/ca-gateway-2.1.2/bin/linux-x86_64/gateway': free(): invalid next size (normal): 0x00007fffc8001d00 ***
Interestingly,
caget
only requests the first 5000 bytes, and doesn't crash, andpyepics
requests all bytes and stores them properly, so doesn't corrupt memory either. This makes it seem that each client has to handle this their own way, meaning ca-gateway doesn't.The crash location and error message indicates to me that there was memory corruption which libc detected and, for security reasons, abort()ed on.