Folks,
Andrew Johnson thought he remembered someone at the recent EPICS
collaboration meeting talking about improvements to the EZCA extension to use 3.14
preemptive callbacks. Has someone done some work on this?
Here’s why I want to know:
Thanks to help from Andrew I just discovered that the IDL interface
(and probably other scripting languages like Matlab, etc.) can cause serious
problems with an EPICS IOC. The problem arises when the IDL client sets
monitors on a PV (with caSetMonitor()), but then does not call ca_pend_event()
frequently. ca_pend_event() is called by the “caGet”,
“caPut”, “cacheckMonitor”, etc. functions in IDL. But
if one calls caSetMonitor() and then just sits at the IDL prompt,
ca_pend_event() is not being called. When that happens the CA server is trying
to send monitor events to the client. These initially queue up on the client
side, but eventually they begin to queue up on the server side. As they queue
on a vxWorks server they consume mbufs. I have found that a single client in
this state will consume all of the 256 byte clusters, and some of the 512 byte
clusters. If a few more clients are in this state then there are no mbufs
available above a certain size. When that happens no new CA connections can be
made, other network services fail, etc.
I think this problem could be avoided if we changed the ezca C library
that IDL calls to use preemptive callbacks, so that periodic calls to
ca_pend_event are no longer needed.
Thanks,
Mark