We recently had an issue where an IOC that had been
working for over a year stopped working. On investigation,
we found that one of the PV's was in a LINK INVALID state.
We finally traced that to dbAccess.c, and from there to a
gateway configuration issue in which a missing hostname
made a PV read-only that the IOC needed to write to.
I've created a small patch for 3.14.12 dbAccess.c that adds calls
to recGblRecordError where recGblSetSevr is being called
to set LINK INVALID due to a CA put error, along with a
couple of other places where SEVR is set w/o any error msg.
This would have saved us long hours of debugging if it
had been in place earlier, so I thought it might be worth
adding to base.
Thanks,
- Bruce
--
Bruce Hill
Member Technical Staff
SLAC National Accelerator Lab
2575 Sand Hill Road M/S 10
Menlo Park, CA 94025
Index: src/db/dbAccess.c
===================================================================
--- src/db/dbAccess.c (revision 12874)
+++ src/db/dbAccess.c (revision 12875)
@@ -579,6 +579,7 @@
if (precord->stat==SCAN_ALARM) goto all_done;
if (precord->lcnt++ !=MAX_LOCK) goto all_done;
if (precord->sevr>=INVALID_ALARM) goto all_done;
+ recGblRecordError(status, precord, "Active scan count exceeded!");
recGblSetSevr(precord, SCAN_ALARM, INVALID_ALARM);
monitor_mask = recGblResetAlarms(precord);
monitor_mask |= DBE_VALUE|DBE_LOG;
@@ -886,6 +887,7 @@
status=dbCaGetLink(plink,dbrType,pbuffer,&stat,&sevr,pnRequest);
if (status) {
+ recGblRecordError(status, precord, "dbCaGetLink error!");
recGblSetSevr(precord, LINK_ALARM, INVALID_ALARM);
} else {
inherit_severity(pcalink,precord,stat,sevr);
@@ -922,14 +924,18 @@
status = dbScanLink(psource, pdest);
}
}
- if (status)
+ if (status) {
+ recGblRecordError(status, psource, "Error processing record via PROC field!");
recGblSetSevr(psource, LINK_ALARM, INVALID_ALARM);
+ }
} else if (plink->type == CA_LINK) {
struct dbCommon *psource = plink->value.pv_link.precord;
status = dbCaPutLink(plink, dbrType, pbuffer, nRequest);
- if (status < 0)
+ if (status < 0) {
+ recGblRecordError(status, psource, "dbCaPutLink error, unable to write to record!");
recGblSetSevr(psource, LINK_ALARM, INVALID_ALARM);
+ }
} else {
cantProceed("dbPutLinkValue: Illegal link type");
}
- Replies:
- RE: Adding error msgs to dbAccess.c Allison, Stephanie
- Navigate by Date:
- Prev:
et_wish installation nalaka samarasinghe
- Next:
Re: PV name change and autosave Pete Jemian
- 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:
et_wish installation nalaka samarasinghe
- Next:
RE: Adding error msgs to dbAccess.c Allison, Stephanie
- 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
|