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: Re: [EXTERNAL] caget freezes the bash script
From: "Vodopivec, Klemen via Tech-talk" <tech-talk at aps.anl.gov>
To: "Zimmermann, David Daniel" <dzimm at lanl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 22 Jul 2021 20:48:45 +0000
The only possible values from that PV are: enabled (7+1 bytes) and disabled (8+1 bytes).

Now I tried running the script through strace which resolved the problem. That’s what is bizarre about this problem, the same script runs fine for weeks, and at some points stops working and chokes on pvget, then after a while or after certain command (strace in this case) it recovers and I have to wait another 2 or more week to resurface.

— Klemen

> On Jul 22, 2021, at 3:24 PM, Zimmermann, David Daniel <dzimm at lanl.gov> wrote:
> 
> Have you checked how much output the pvget produces? I would wonder if it exceeded the capacity of the pipe to grep.
> 
> David Zimmermann
> Scientist, Controls Software
> AOT-IC Accelerator Operations and Technology, Instrumentation and Controls
> 
> Office: 505.664.0824
> Mobile: 503.547.5966
> 
> Los Alamos National Laboratory
> lanl.gov
> 
> 
> On 7/22/21, 1:12 PM, "Tech-talk on behalf of Vodopivec, Klemen via Tech-talk" <tech-talk-bounces at aps.anl.gov on behalf of tech-talk at aps.anl.gov> wrote:
> 
> 
>> On Jul 22, 2021, at 12:22 PM, Kasemir, Kay via Tech-talk <tech-talk at aps.anl.gov> wrote:
>> 
>>>>> Which is it, caget or pvget?  They're two separate programs.
>>>> The script is using `pvget -p ca ...`, so in the end it's using the CA client library, same as `caget ...`
>> 
>>> I understand that in theory it should be the same, but when trying to track down an issue, it's not good to assume such things.
>> 
>> Indeed, and the EPICS version might make a difference.
>> 
> 
>    You’re absolutely right, little details matter in trying to troubleshoot. But I intentionally didn’t want to blast with massive amount of information that would scare people away.
> 
>> I read
>>  "pvget replaced caget, giving us two implementations that behave the same."
>> as both "caget" and "pvget -p ca" were used with the same result.
> 
>    Correct, both caget and pvget were tried with the same effect. Both caget and pvget are compiled from the same 3.14.12.6 distribution, pvget is from PVAccess library version 4.5.
> 
>> Maybe one can attach gdb to the hung caget/pvget process and see why it's stuck and not exiting.
> 
>    Interestingly, after the bash script freezes, pvget doesn’t show in the list of processes any more. But I know it ran based on the wireshark output. Which would indicate problem in bash script somehow but the line after the one showed simply doesn’t execute. So it’s like pvget or caget leave the stdout descriptor open and bash script can’t continue. I say this because the following modified line works fine
> 
>    remexp_enabled=$(pvget -p ca -w 0.5 -t ${BL}:CS:TL:RemExp:En | echo enable 2>/dev/null)
> 
>    But this one hangs similar to the original line (expected PV value is 'enabled' or 'disabled')
> 
>    remexp_enabled=$(pvget -p ca -w 0.5 -t ${BL}:CS:TL:RemExp:En | grep enabled 2>/dev/null)
> 
>    The difference is that echo doesn’t care about the stdin and executes immediately, while grep has to wait for closed stdin before it can exit. But that’s just a wild guess.
> 
>    — Klemen
> 


Replies:
Re: [EXTERNAL] caget freezes the bash script Michael Davidsaver via Tech-talk
References:
caget freezes the bash script Vodopivec, Klemen via Tech-talk
Re: caget freezes the bash script J. Lewis Muir via Tech-talk
Re: [EXTERNAL] Re: caget freezes the bash script Kasemir, Kay via Tech-talk
Re: [EXTERNAL] Re: caget freezes the bash script J. Lewis Muir via Tech-talk
Re: [EXTERNAL] Re: caget freezes the bash script Kasemir, Kay via Tech-talk
Re: [EXTERNAL] caget freezes the bash script Vodopivec, Klemen via Tech-talk
Re: [EXTERNAL] caget freezes the bash script Zimmermann, David Daniel via Tech-talk

Navigate by Date:
Prev: Re: [EXTERNAL] caget freezes the bash script Zimmermann, David Daniel via Tech-talk
Next: Re: [EXTERNAL] caget freezes the bash script Michael Davidsaver 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: [EXTERNAL] caget freezes the bash script Zimmermann, David Daniel via Tech-talk
Next: Re: [EXTERNAL] caget freezes the bash script Michael Davidsaver 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 ·