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  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: caget freezes the bash script
From: "Vodopivec, Klemen via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 22 Jul 2021 13:02:28 +0000
Hi,

This may be loosely related to EPICS, but since it’s only happening with caget/pvget commands I thought to ask here.

We’ve been having a weird issue when querying for a PV value from a BASH script. Most of the time the script works and is run several times in a day. Occasionally it will stop working. Debugging the script with bash -x, the last line is always:

remexp_enabled=$(pvget -p ca -w 0.5 -t ${BL}:CS:TL:RemExp:En 2>/dev/null)

After that line, the bash script simply freezes and has to be terminated. pvget replaced caget, giving us two implementations that behave the same. There are several grep and other commands before this line which execute just fine, which eliminates the obvious out-of-resources issue. Capturing network traffic with Wireshark shows that pvget completes the request and closes the socket just fine.

Interestingly, adding a dummy redundant pvget beforehand fixes the issue for the duration of the script:

pvget -p ca -w 0.5 -t ${BL}:CS:TL:RemExp:En 2>/dev/null
remexp_enabled=$(pvget -p ca -w 0.5 -t ${BL}:CS:TL:RemExp:En 2>/dev/null)

However, when similar dummy pvget is run before executing the script, the issue gets resolves completely.

Any ideas how to troubleshoot are much welcome.

Thanks, Klemen

Replies:
Re: caget freezes the bash script J. Lewis Muir via Tech-talk

Navigate by Date:
Prev: Re: pyepcis does not seem to honor EPICS_CA_ADDR_LIST Mark Rivers via Tech-talk
Next: Re: pyepcis does not seem to honor EPICS_CA_ADDR_LIST Koennecke Mark (PSI) via Tech-talk
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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: pyepcis does not seem to honor EPICS_CA_ADDR_LIST Koennecke Mark (PSI) via Tech-talk
Next: Re: caget freezes the bash script J. Lewis Muir via Tech-talk
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  <20212022  2023  2024 
ANJ, 22 Jul 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·