Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: Re: scan task stack overflow
From: Marty Kraimer <mrk@aps.anl.gov>
To: Geoff Savage <savage@fnal.gov>
Cc: tech-talk@aps.anl.gov
Date: Thu, 22 Sep 2005 07:31:18 -0500
Geoff Savage wrote:

Hi,

We have overflowed the stack of the scan5 task by putting too many records at a 5 second scan rate. What is the best way to handle this situation? Aside from reducing the number of records.

Thanks, Geoff


The other reply's all give good advice so I just want to add a couple of comments

The number of records in a particular scan set will NOT cause a stack overflow. Thus

What can cause a stack overflow is too many records linked together via forward links or process passive database links. A linked record is processed by a recursive call to dbProcess. Each call uses additional stack space.

Another thing that cause stack overflow is support routines allocating lots of stack space. For example

void badSupport( ...)
{
     double data[1000];
     ...
}

The above allocates 8000 bytes of stack space.

Marty Kraimer
References:
scan task stack overflow Geoff Savage

Navigate by Date:
Prev: Re: scan task stack overflow Ralph Lange
Next: EDM <--> MEDM display-file translators Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: scan task stack overflow Geoff Savage
Next: RE: scan task stack overflow Laznovsky, Michael
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·