EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Bug in seq-2.1.13
From: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Thu, 19 Sep 2013 17:48:08 +0200
Hello Everyone

it appears I made a stupid mistake in one of the patches that led to the 
last release (2.1.3) of the sequencer: I was a bit over-zealous with 
signalling the get/put semaphores in case of timeout and accidentally 
did so even in pvGetComplete and pvPutComplete where this is definitely 
wrong (they use epicsEventTryWait, so timeout just means 'not yet 
available').

The effect is that sometimes these functions return a wrong result: they 
can return TRUE when in fact the callback from CA did not yet arrive, 
which is particularly bad with pvGetComplete, since it can mean that if 
the pvGetComplete is used in a when clause then in the code block that 
follows the result is not yet available.

Also note that in non-safe mode, this can lead to a race condition 
between update from the CA callback and access from the program, 
possibly corrupting the variable's content. This has always been true 
for monitored variables, but not when using asynchronous pvGet.

A fix for this (and the other currently know problems) is in the latest 
snapshot

  http://tinyurl.com/epics-seq/releases/seq-snapshot-latest.tar.gz

and in the darcs repository.

As a side note, the reason I found this bug in the first place was that 
I added a test for a new feature in version 2.2. I added a slightly 
adapted version of this test to the 2.1 branch, so something like this 
should not happen again ;-)

A new release (2.1.14) will be available soon.

Cheers
Ben
-- 
"Make it so they have to reboot after every typo." -- Scott Adams


Replies:
Re: Bug in seq-2.1.13 Benjamin Franksen

Navigate by Date:
Prev: Re: threading in asyn device support Ralph Lange
Next: Re: threading in asyn device support Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: threading in asyn device support Andrew Johnson
Next: Re: Bug in seq-2.1.13 Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·