EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  <19981999  2000  2001  2002  2003  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  <19981999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: ca_put_callback problem (dbPutNotify bug)
From: Marty Kraimer <[email protected]>
To: [email protected]
Date: Wed, 09 Dec 1998 08:08:15 -0600
Till Straumann, who is working on ioc support for a beam line at BESSY, reported
the following problem.

He wrote device support for an ao record. The device support returns an error
status if the write_ao to the device fails. If a CA client calls ca_put_callback
for this record and write_ao returns an error, the CA event task goes into an
infinite loop.

Till not only found the bug he also found the cause and the solution.

The following happens: putNotify, if necessary, calls dbProcess. If dbProcess
returns an error (In Till's case device support returned an error to aoRecord
which returned an error to dbProcess) then putNotify tells CA that the put is
complete. But because the record was processed CA was already notified.

This bug is almost certainly in all releases of EPICS that support
ca_put_callback.

This will be fixed in future releases.

Here is the diff showing the bug fix.

cvs diff -c dbNotify.c
Index: dbNotify.c
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/db/dbNotify.c,v
retrieving revision 1.7
diff -c -r1.7 dbNotify.c
*** dbNotify.c  1998/04/20 16:00:17     1.7
--- dbNotify.c  1998/12/08 16:16:59
***************
*** 206,212 ****
      status=dbProcess(precord);
      if(status!=0) {
        ppn->status = status;
-       issueCallback(ppn);
      }
  ret_pending:
      return(S_db_Pending);



Marty Kraimer

Navigate by Date:
Prev: Re: living without soft links Tim Mooney
Next: Java Native Interface for Channel Access Functions Mike Oothoudt
Index: 1994  1995  1996  1997  <19981999  2000  2001  2002  2003  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: tkCVS - tk based GUI for CVS Ralph Lange
Next: Java Native Interface for Channel Access Functions Mike Oothoudt
Index: 1994  1995  1996  1997  <19981999  2000  2001  2002  2003  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 ·