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: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Tue, 20 Apr 2010 12:21:36 +0200
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

Replies:
Re: writing to aao crashes ioc Korhonen Timo
Re: writing to aao crashes ioc Dirk Zimoch
References:
writing to aao crashes ioc Dirk Zimoch
Re: writing to aao crashes ioc Tim Mooney
Re: writing to aao crashes ioc Dirk Zimoch

Navigate by Date:
Prev: Re: Analog Input records, Stream Device, and INVALID Alarms Dirk Zimoch
Next: Re: writing to aao crashes ioc Korhonen Timo
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 Dirk Zimoch
Next: Re: writing to aao crashes ioc Korhonen Timo
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 ·