I am using sequencer v1.9.5 with EPICS R3.13.5 on a MVME2400.
I have set up an event flag queue to monitor a process variable:
double pos;
assign pos to "{axis}:px";
evflag posFlag;
syncQ pos posFlag;
monitor pos;
This appears to work, but when I leave the IOC running overnight it always
crashes with messages of the form
0x316f380 (EV_seqAux): proc_db_events_queued:
pos queue memory allocation failure
It will surprise no one that I have tracked this to a memory allocation bug.
In proc_db_events_queued() in seq_ca.c memory is allocated for each QENTRY:
pEntry = (QENTRY *) calloc(sizeof(QENTRY), 1);
...
ellAdd(&pSP->pQueues[pDB->queueIndex], (ELLNODE *) pEntry);
and the QENTRYs are popped from the queue and processed in seq_pvGetQ() in
seq_if.c
pEntry = (QENTRY *) ellGet(&pSP->pQueues[pDB->queueIndex]);
/* If none, "impossible" */
if (pEntry == NULL)
{
...
}
/* Extract information from entry (code from seq_ca.c)
(pDB changed to refer to channel for which monitor
was posted) */
else
{
...
} ...
However, the QENTRYs are never free'ed. I have compared this with the code
from v2.0.7 where the else clause ends with
else
{
...
/* Free queue entry */
free(pEntry);
}
I am not sure whether the queues are even supposed to work in v1.9.5, but
this is the only bug I have encountered. Since it is so easy to fix, it
would be desirable to release one more bug fix for those of us still working
with EPICS R3.13!
Cheers,
Dr. Russell O. Redman
Tel: (250) 363-6917 | Fax: (250) 363-0045
<mailto:[email protected]>
National Research Council Canada | Conseil national de recherches Canada
5071 West Saanich Road | 5071 West Saanich Road
Victoria, B. C. V9E 2E7 | Victoria, C.-B. V9E 2E7
Government of Canada | Gouvernement du Canada
- Navigate by Date:
- Prev:
Re: Linux -> PPC cross-compile of the Motor Record Ronald L. Sluiter
- Next:
Tornado 2.2, cross-compiling woes Andy Foster
- 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
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
A new type of "Peta File" is stalking the children....The US Army! Report Wash
- Next:
Tornado 2.2, cross-compiling woes Andy Foster
- 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
2018
2019
2020
2021
2022
2023
2024
|