Experimental Physics and Industrial Control System
Hi Andrew,
I reopen a Thread about tricky behavior of dbloadtemplate which can not translates more 100 macros in one shot.
I have these errors when I start a softIOC
More than dbTemplateMaxVars = 100 macro variables used
Substitution file error.
line 17: 'VANODEMES__FUNCTION'
More than dbTemplateMaxVars = 100 macro variables used
Substitution file error.
line 18: 'TDISMES__FUNCTION'
More than dbTemplateMaxVars = 100 macro variables used
Substitution file error.
line 18: 'DEBEAUDISMES__OFFSET'
More than dbTemplateMaxVars = 100 macro variables used
Substitution file error.
line 18: 'LOCKSTATE__OFFSET'
/admin/spiral2/scripts/bootIOC: line 80: 16751 Erreur de segmentation ./$IOC_CMD_SCRIPT
I have changed the value of dbTemplateMaxVars to 900 in base/src/dbtools/dbLoadTemplate.y but the value shown in error messages stills to 100.
I am sure I made something wrong, but in earlier EPICS version I remenber having changed the max values inside dbtools and just having type a "make" to see changes.
What must I do to push changes with this new version of dbtools?
Thanks for your help.
Dominique.
Subject: Re: Macros limited (edition ;-)
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: Touchard Dominique <[email protected]>
Date: Fri, 5 Jul 2013 10:39:43 -0500
Hi Dominique,
On 2013-07-05 Dominique Touchard wrote:
> It seems that the number of macros for template substitutions during IOC
> startup is limited to 100. Over, a segmentation fault stop the IOCs.
>
> Is this number correct? Is there any reason?
I was surprised but you're right, src/dbtools/dbLoadTemplate.y defines
VAR_MAX_VARS as 100 which sets a limit to the number of variables that
dbLoadTemplate() can handle. It also defines VAR_MAX_VAR_STRING as 5000
setting the maximum size of the "variable=value,..." string which it
constructs to pass to dbLoadRecords(). In neither case though does it check
when the storage limit set by those macros gets exceeded, thus causing a
crash. This is obviously unacceptable and needs to be fixed in Base.
To get around this limit for a particular application you could do the
template expansion on the host at build time using the msi (Macro
Substitution and Include) program which is distributed as an EPICS extension.
You can also increase the above values in your source code and rebuild base,
which might be a simpler fix in some circumstances.
I have filed a bug-report for this issue. If someone feels inclined to look
at rewriting the dbLoadTemplate() code to remove these limitations please let
me know.
https://bugs.launchpad.net/epics-base/+bug/1198234
- Andrew
- Replies:
- Re: Macros limited (edition ;-) Andrew Johnson
- Navigate by Date:
- Prev:
EPICS support for LinMot E1100-GP Marcin Lukaszewski
- Next:
Re: Macros limited (edition ;-) Andrew Johnson
- 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:
EPICS support for LinMot E1100-GP Marcin Lukaszewski
- Next:
Re: Macros limited (edition ;-) Andrew Johnson
- 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