EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: libezca and EPICS-3.14
From: "Jeff Hill" <[email protected]>
To: "'Till Straumann'" <[email protected]>
Cc: "'Tech-talk'" <[email protected]>
Date: Thu, 5 Dec 2002 12:03:08 -0700
1) Be careful about using R3.14's new feature allowing preemptive
callback with EZCA. Being a legacy single threaded code, the EZCA
library probably isn't properly protected against CA callbacks occurring
preemptively from another thread, at any time, even when it is not
executing in a CA function.

2) If the CA client library does not see the server's beacon then it
sends an "are you there" message to the server over TCP. It is supposed
to work (in preemptive callback mode or otherwise) in a way that if you
do not call ca_pend_event() very often and a UDP beacon is lost, then it
will still send the "are you there" message and will not disconnect
until ca_pend_event() is called again and the "are you there" has not
been replied to within a reasonable amount of time.

3) This disconnect message that you are seeing, assuming that it is not
the false message occurring only when the process calls ca_task_exit()
and channels are still connected (that has been fixed after R3.14 beta
2), could be a bug related to proper implementation of (2) above.
However you are using R3.14 beta one which was a very preliminary (and
certainly buggy) release of R3.14. Given that we are about to release
R3.13.1, then it would be very interesting (at least for me) to see if
the same problem exists with R3.14 beta 2 and ezca. 

Jeff


> -----Original Message-----
> From: Till Straumann [mailto:[email protected]]
> Sent: Wednesday, December 04, 2002 9:24 PM
> To: Jeff Hill
> Cc: 'Tech-talk'
> Subject: Re: libezca and EPICS-3.14
> 
> Having Stephanie next door pays off :-)
> 
> My application behaves like this:
> 
>     ezcaGet();
> 
>     /* user works; this can take minutes, hours, days */
> 
>     ezcaGet();
>     /* second ezcaGet() fails if more than ~80sec expire
>      * between the ezca calls
>      */
> 
> Steph pointed out that the CA library still needs to handle
> beacons even when idle and recommended to initialize the
> application's CA context with ca_enable_preemptive_callback.
> As a (undocumented) side effect, this would result in beacons
> being handled by one of the CA background threads.
> (At least, this is what I recall from our conversation - if
> not completely accurate, I'm to blame for misquoting)
> 
> Anyways, this helped, the disconnects are gone and I'm  happy
> because I no longer need 3.13 around :-)
> 
> -- Till
> 
> PS: the app now does
> 
>      ca_context_create(ca_enable_preemptive_callback);
> 
>      ...
>      ezcaGet();
> 
>      /* user works for hours */
> 
>      ezcaGet();
>      /* SUCCESS */
> 
> 
> Jeff Hill wrote:
> >>CA.Client.Exception..........................................
> ..
> >>...
> >>     Warning: "Virtual circuit disconnect"
> >>     Context: "134.79.35.35:5064"
> >>     Source File: ../cac.cpp line 1809
> >>     Current Time: Wed Dec 04 2002 13:48:18.219267000
> >>.............................................................
> ..
> >
> >
> > Do you know for certain that the "read command" is failing or
> are you
> > encountering the following situation?
> >
> > In R3.14 beta 1 and beta 2 the ca client library will print
> the above
> > message if a connected channel still exists when you call
> > ca_task_exit(). To remain strictly backwards compatibility
> this message
> > is suppressed, only for this specific situation, in the
> latest version
> > of R3.14.
> >
> > Does ezca block in ca_pend_io() when it is waiting for the
> "read
> > command" to complete? If so, then how long is the timeout
> which is
> > provided to ca_pend_io()?
> >
> > Jeff
> >
> >
> >>-----Original Message-----
> >>From: Till Straumann [mailto:[email protected]]
> >>Sent: Wednesday, December 04, 2002 3:12 PM
> >>To: Tech-talk
> >>Subject: libezca and EPICS-3.14
> >>
> >>Hi.
> >>
> >>I discussed this briefly with Marty at JLAB. He suggested
> >>I should post to the list. I was not sure whether the
> >>EZCA library is supported under 3.14.
> >>
> >>Here's my problem:
> >>
> >>I have put together a CA interface for SCILAB (a nice open
> >>source tool a la matlab) who builds on top of libezca. Works
> >>fine with 3.13.
> >>Using 3.14_beta1, I can access (e.g. read using ezcaget) a PV
> >>into SCILAB without problem. An attempt to access the same PV
> >>a couple of minutes later fails, however, giving the
> following
> >>error:
> >>
> >>CA.Client.Exception..........................................
> ..
> >>...
> >>     Warning: "Virtual circuit disconnect"
> >>     Context: "134.79.35.35:5064"
> >>     Source File: ../cac.cpp line 1809
> >>     Current Time: Wed Dec 04 2002 13:48:18.219267000
> >>.............................................................
> ..
> >>.....
> >>
> >>Strange enough, if I repeat the read command for a couple
> >>of times, it works again. Let some time expire and it again
> >>fails.
> >>And so on.
> >>
> >>Does somebody have an explanation or, yet better, a fix?
> >>
> >>-- Till
> >
> >
> 



Replies:
Re: libezca and EPICS-3.14 Till Straumann
Re: libezca and EPICS-3.14 Till Straumann
References:
Re: libezca and EPICS-3.14 Till Straumann

Navigate by Date:
Prev: Building 3.13Extensions with 3.14 base Problem. Edwin du
Next: Re: libezca and EPICS-3.14 Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: libezca and EPICS-3.14 Till Straumann
Next: Re: libezca and EPICS-3.14 Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·