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  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Problem with autosave module making it crash at random basis.
From: "Abdalla Ahmad" <[email protected]>
To: "Mooney, Tim M." <[email protected]>, "Konrad, Martin" <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 17 Apr 2018 08:47:10 +0000

Thank you for your suggestions

 

The problem is that the crash happens on a random basis, no specified time or event. What makes it worse is that the same IOC sometimes crash due to an issue in the SNMP driver.

 

Right now I am waiting for the IOC to crash to see if there could be a core dump file and run Mark's instructions in a previous thread. After that I will try the latest version. If the problem persists I will run the IOC in a procServ process and postpone this issue.

 

Thank you very much!

Abdalla.

 

From: Mooney, Tim M. [mailto:[email protected]]
Sent: Monday, April 16, 2018 10:32 PM
To: Konrad, Martin <[email protected]>; Abdalla Ahmad <[email protected]>; [email protected]
Subject: Re: Problem with autosave module making it crash at random basis.

 

Hi Abdalla,

Have you tried running a more recent version of autosave?  Since the version tagged "synApps_5_6" (which is also tagged R4-8),

I found a string buffer being overrun, and went through systematically, replacing strcpy with strncpy, strcat with strncat, and sprintf with snprintf.

You could rule buffer overrun out as a cause by running R5-6-2 or later.

 

Tim Mooney ([email protected]) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


From: [email protected] <[email protected]> on behalf of Konrad, Martin <[email protected]>
Sent: Monday, April 16, 2018 1:03:21 PM
To: Abdalla Ahmad; [email protected]
Subject: Re: Problem with autosave module making it crash at random basis.

 

Hi Abdalla,
> The first 2 lines are the IOC shell output before the segmentation
> fault happened.
Seems like it's happening in this line:

https://github.com/epics-modules/autosave/blob/synApps_5_6/asApp/src/save_restore.c#L1371

I can think of 3 reasons why it might crash:

1. Invalid file descriptor out_fd
2. Invalid C string SRversion - which BTW seems to contain a wrong
version number ;-)
3. Invalid C string datetime

(2) Seems unlikely as SRversion is a pointer to a constant string.
Regarding (3): This gets populated in [1]. Note that the whole function
has been rewritten recently [2]. I'm wondering if this is because
someone else ran into problems... Missing 0-termination for example
might cause a segfault. You might want to try the latest version of
fGetDateStr.c. I would also recommend to run your IOC in the debugger so
you can inspect these variables after the IOC crashed (or turn on core
files).

-Martin

[1]
https://github.com/epics-modules/autosave/blob/synApps_5_6/asApp/src/fGetDateStr.c
[2]
https://github.com/epics-modules/autosave/commit/39d1dcbfbbf0971dc6fd6f13b0e77d65e21b577c#diff-101e75ddd0243986d9009539b0f7ece1

--
Martin Konrad
High Performance Controls Team Leader
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: [email protected]


References:
Re: Problem with autosave module making it crash at random basis. Konrad, Martin
Re: Problem with autosave module making it crash at random basis. Mooney, Tim M.

Navigate by Date:
Prev: June EPICS Meeting Registration Open Andrew Johnson
Next: RE: PV gateway renders PVs as disconnected Abdalla Ahmad
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Problem with autosave module making it crash at random basis. Mooney, Tim M.
Next: RE: Problem with autosave module making it crash at random basis. Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 26 Apr 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·