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  <20112012  2013  2014  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  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: caGateway crashes / use of *MustSucceed functions
From: Dirk Zimoch <[email protected]>
To: "[email protected]" <[email protected]>
Date: Wed, 18 May 2011 14:21:44 +0200
Hi all,

I got several caGateway crashes with the error message:
"errSymBld callocMustSucceed failed count 256 size 4"
Obviously it has some memory problems.

But is it really a good idea to abort a server only because of (probably temporary ?) resource problems? I think no. I would even go so far to say that the whole idea of the *MustSucceed functions is wrong. Many parts of EPICS are meant to run continuously as servers. Aborting the program when something goes wrong is probably the worst thing one can do. Thus I would consider any call of a *MustSucceed function during run-time a design flaw of the program. (It is probably a different question if this makes sense during startup.) An error in a lower layer of software should be passed to higher layers to be handled properly. That is what almost all systems functions have always done - either by returning a status code or by throwing an exception. But simply calling abort does not give the application the slightest chance to do anything.

In this case, it seems the gateway wanted to post an error message (maybe about being out of memory?). But callocMustSucceed called by errSymLookup, in turn called by casStrmClient::sendErrWithEpicsStatus killed the whole application instead. This not only killed even those parts of the server that were still functioning. Additionally it makes debugging quite hard.

Therefore I propose to remove all *MustSucceed functions from future EPICS releases and allow and require proper error handling by the application.

Any opinions on this topic?

Dirk

Replies:
Re: caGateway crashes / use of *MustSucceed functions Benjamin Franksen
Re: caGateway crashes / use of *MustSucceed functions J. Lewis Muir

Navigate by Date:
Prev: Re: Channel Access not connecting Bruce Hill
Next: Re: caGateway crashes / use of *MustSucceed functions Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: alh1_2_24 build problem Andrew Johnson
Next: Re: caGateway crashes / use of *MustSucceed functions Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·