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

Subject: Re: writing to aao crashes ioc
From: Korhonen Timo <[email protected]>
To: Benjamin Franksen <[email protected]>, Dirk Zimoch <[email protected]>
Cc: [email protected]
Date: Tue, 20 Apr 2010 13:21:31 +0200
Hi Dirk,

Now that Ben pointed this out, it rang a bell.
This probably does not help in any way, but almost exactly ten years
ago there was a discussion thread about aao record in tech-talk, starting from:


http://www.aps.anl.gov/epics/tech-talk/2000/msg00310.php

I thought however that these issues (memory allocation, etc) would have been solved already
a long time ago....
If I remember correctly, at that time I assumed Eric (Bjorklund) would do the changes,
he probably expected that I do and we never cross-checked. :-(


best regards,

Timo


Benjamin Franksen wrote:
On Tuesday 20 April 2010, Dirk Zimoch wrote:
Tim Mooney wrote:
Dirk, I was seeing something similar (though in 3.14.11),
and "dbpr <recordname>,5" showed "DTYP: <nil>",
until I added the line
device(aao,CONSTANT,devAaoSoft,"Soft Channel")
to the .dbd file.
Hi Tim.

That is not the problem:
DTYP: Soft Channel

The ioc also crashes when the aao record is not processed! Thus DTYP
cannot be the problem.

I believe the aao record support is at fault.


The problem is that it does not allocate bptr itself but leaves this to device support. However, when device support's init_record method is called, it is too late. Because by then links have already been initialized, thus cvt_db_addr has been called, which sets the field address to bptr, i.e. NULL.

This explains why regular puts work but puts via db links lead to a crash. If you dbpf from the ioc shell or do caput, the cvt_db_addr gets called and since this is after device support init, bptr will contain a valid pointer to the array.

You could verify my theory by issuing a 'caput aao1.OUT aao2'. After this, the IOC should not crash when processing aao1. It shoudl still crash when processing ao1, until you re-initialize thits OUT link, too.

Solution: Fix aao (and probably aai) record support to either allocate bptr itself or else call device support's init_record during the first pass of record support initialization.

Cheers
Ben



--
Timo Korhonen PSI (Paul Scherrer Institut, http://www.psi.ch) CH-5232 Villigen PSI tel + 41- 56 3103262 fax + 41 - 56 310 5090 e-mail: [email protected]



Replies:
Re: writing to aao crashes ioc Eric Bjorklund
References:
writing to aao crashes ioc Dirk Zimoch
Re: writing to aao crashes ioc Tim Mooney
Re: writing to aao crashes ioc Dirk Zimoch
Re: writing to aao crashes ioc Benjamin Franksen

Navigate by Date:
Prev: Re: writing to aao crashes ioc Benjamin Franksen
Next: Re: writing to aao crashes ioc Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: writing to aao crashes ioc Benjamin Franksen
Next: Re: writing to aao crashes ioc Eric Bjorklund
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
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 ·