EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: cau bug (all versions): crash on signal receipt
From: "Weatherford, Jeremy W." <[email protected]>
To: <[email protected]>
Date: Wed, 30 Jun 2004 10:24:28 -0500
If someone could tell me of a more appropriate place to report this, that would be wonderful.  It's not part of the EPICS base, so I didn't think it belonged in Mantis.

The bug is with both versions of cau, 20020903 and 20020802.  On receipt of any signal, cau's behavior is undefined.  It may segfault, which is the easy way out.  However, on two of our Linux boxes (RH Enterprise, kernel 2.4.21) it has reproducibly crashed destructively, allocating approx. 2G of memory and thrashing both CPUs.  When it does this, it takes about 5 minutes to die, leaving the system nearly unusable during that time.

The problem is in cau.c, at line 470 (20020802) or 473 (20020903):

   genSigInit();

genSigInit, in genSubr.c, is defined as:

   void genSigInit(void (*handler)(int))

Ooops.  Line 470/473 in cau.c should be:

   genSigInit(cauTaskSigHandler);

This allows cau to exit gracefully on receipt of a signal.  The moral of the story?  Use ANSI C prototypes!  (the offending argument-less prototype is in genDefs.h, line 236)

Jeremy Weatherford
SBC-CAT, APS


Replies:
Re: cau bug (all versions): crash on signal receipt Andrew Johnson

Navigate by Date:
Prev: Re: EDM Style Guide Terry Carlino
Next: [Fwd: Re: EDM Style Guide] Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: V850 device support Benjamin Franksen
Next: Re: cau bug (all versions): crash on signal receipt Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·