g+
g+ Communities
Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  Index 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014 
<== Date ==> <== Thread ==>

Subject: using vxWorks td() to shutdown CA clients and sequence tasks
From: johill@lanl.gov (Jeff Hill)
To: "EPICS-tech-talk" <tech-talk@aps.anl.gov>
Cc: "William Lupton" <wlupton@hapuna.keck.hawaii.edu>, "Rozelle Wright" <rwright@lanl.gov>
Date: Mon, 24 Jan 2000 14:05:04 -0700
All,

Proposed impact:

1) All vxWorks EPICS users must, starting with EPICS R3.14, 
avoid deleting CA related tasks (threads) with "td() and 
"taskDelete()".

2) Sequence programs will be shut down with some as-of-yet
unwritten subroutine (vxWorks command line) provided by
the sequencer facility. Other facilities based on the CA 
client library and also vxWorks might need to implement 
similar capabilities.

If this sort of thing has an impact on you, then please 
read on.

At some point in the past we went to great lengths to
ensure that the sequencer and the CA client library
would gracefully shutdown if on vxWorks, out of the 
blue, one of the CA client's tasks (threads) was abruptly
deleted by any user using vxWorks shell commands such as 
"td()" or "taskDelete()". We provided support for this 
probably because at the time users were used to "kill"ing
UNIX processes, and they naturally assumed that directly
deleting tasks (threads) should be possible also. 

We are now porting iocCore to other multi-threaded 
operating systems, and this feature is particularly
difficult and error prone to implement on all operating 
systems. We now see that it would have been much easier 
to implement a special command in the sequencer for deleting 
one or all of its sequence program(s).

So I propose that we remove the thread deletion cleanup
handler from the CA client library, and in the 
future (starting with release 3.14) all vxWorks client 
tool applications must implement a graceful shutdown 
at the client tool application level which calls
ca_task_exit(), and that users will need to be more 
careful about directly deleting threads with the operating 
system in the future. If they are not careful they may 
crash their IOC.

Jeff
______________________________________________
Jeffrey O. Hill         E-mail johill@lanl.gov
LANL MS H820            Voice  505 665 1831
Los Alamos NM 87545 USA FAX    505 665 5107


Replies:
Re: using vxWorks td() to shutdown CA clients and sequence tasks Chip Watson

Navigate by Date:
Prev: Re: Python/CA Noboru Yamamoto
Next: Re: using vxWorks td() to shutdown CA clients and sequence tasks Chip Watson
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014 
Navigate by Thread:
Prev: RE: Python/CA Jeff Hill
Next: Re: using vxWorks td() to shutdown CA clients and sequence tasks Chip Watson
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·