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  <20102011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: Re: Race conditions in SNL programs
From: Andrew Johnson <anj@aps.anl.gov>
To: Benjamin Franksen <benjamin.franksen@bessy.de>
Cc: tech-talk@aps.anl.gov
Date: Thu, 20 May 2010 21:16:27 -0500
Hi Ben

On Thursday 20 May 2010 17:53:04 Benjamin Franksen wrote:
>
> This bug must have been in the sequencer for a long, long time, probably
> right from the beginning.

I'm not convinced it's quite as bad as you think; I suspect it derives from 
R3.14.x when Jeff introduced the ca_enable_preemptive_callback option.  Before 
this time the CA library never got a chance to process network messages unless 
you called it using ca_pend_event() or ca_pend_io() so the callbacks would 
only run when the thread was inside the CA library.

Hmm, that doesn't necessarily work with multiple state sets though, I wonder 
if CA supported sharing CA contexts back then?  I think Jeff may have to chime 
in on that one, but he may already be on his way to Diamond for the Codeathon 
next week so don't hold your breath.

In the short term you should be able to fix this for single-SS programs by 
changing the argument to the ca_context_create() call (in pvCa.cc) to disable 
preemptive callbacks; I'm not sure if you will have to make any other changes, 
but you should be able to look back through the history to see what else was 
done at the same time that option was turned on.  Longer term the ball is in 
your court I guess...

- Andrew

PS: I usually assume that everyone who subscribes to core-talk also reads 
tech-talk, so there's probably no need to post to both.
-- 
The best FOSS code is written to be read by other humans -- Harald Welte


Replies:
Re: Race conditions in SNL programs Benjamin Franksen
References:
Race conditions in SNL programs Benjamin Franksen

Navigate by Date:
Prev: Re: genSub to aSub conversion Andrew Johnson
Next: Re: Race conditions in SNL programs Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: RE: Race conditions in SNL programs Chestnut, Ronald P.
Next: Re: Race conditions in SNL programs Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·