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  <20202021  2022  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Connection to PVA server fails despite server
From: "Wlodek, Jakub via Tech-talk" <tech-talk at aps.anl.gov>
To: Michael Davidsaver <mdavidsaver at gmail.com>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 13 Nov 2020 22:04:05 +0000
Hi all,

I recreated the environment that was causing the error, and re-tested, with the pvAccess patch enabled -
and I get the appropriate error message now. I think with this error if a situation like this ever comes up
it will be much more obvious what the issues is:

I have no name!@xf17bm-ioc2:/epics/base/bin/linux-x86_64$ ./pvget XF:17BM-BI{USB-Cam:8}Pva1:Image
2020-11-13T22:02:01.938 Error during authorization setup: Unable to determine user account name

XF:17BM-BI{USB-Cam:8}Pva1:Image epics:nt/NTNDArray:1.0
    union value
        (none)
    codec_t codec
        string name
        any parameters
            (none)
    long compressedSize 0
    long uncompressedSize 0
    dimension_t[] dimension
    int uniqueId 0
    time_t dataTimeStamp <undefined>
        long secondsPastEpoch 0
        int nanoseconds 0
        int userTag 0
    epics:nt/NTAttribute:1.0[] attribute
    string descriptor
    alarm_t alarm
        int severity 0
        int status 0
        string message
    time_t timeStamp <undefined>
        long secondsPastEpoch 0
        int nanoseconds 0
        int userTag 0
    display_t display
        double limitLow 0
        double limitHigh 0
        string description
        string format
        string units

Thanks for the help,
Jakub

From: Michael Davidsaver <mdavidsaver at gmail.com>
Sent: Wednesday, November 11, 2020 2:13 AM
To: Wlodek, Jakub <jwlodek at bnl.gov>
Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>; Kasemir, Kay <kasemirk at ornl.gov>
Subject: Re: Connection to PVA server fails despite server
 
On 11/10/20 3:38 PM, Michael Davidsaver wrote:
>> If an exception were thrown, I think it would be caught here.
>> Where it is only printed at debug log level.  (my doing it seems)
>> Running with EPICS_PVA_DEBUG=1 set should show this.
> https://github.com/epics-base/pvAccessCPP/blob/master/src/server/responseHandlers.cpp#L210-L213

I was wrong about where this exception would be thrown and caught.
It is thrown once during initialization.  It actually isn't caught at all.
This is undefined behavior because a c++ exception is being allowed
to propagate into C code.  In this case epicsThreadOnce().
In the case of Linux+gcc, it seem that this doesn't crash, but does leave
the authentication mechanics in an unknown state.

The fix is simple enough.  If the exception is simply caught and logged,
then things degrade as I had intended.  The client will print a message,
and then fall back to the anonymous method.

> $ pvget cnt
> 2020-11-10T18:23:27.535 Error during authorization setup: Unable to determine user account name
>
> cnt 2020-11-10 18:23:27.144  1

cf.

https://github.com/epics-base/pvAccessCPP/commit/564f19e466b3d2624a9dbbaa894123127be5150e?w=1

If you are still able, please verify that this is the error you see.

References:
Connection to PVA server fails despite server Wlodek, Jakub via Tech-talk
Re: Connection to PVA server fails despite server Michael Davidsaver via Tech-talk
Re: Connection to PVA server fails despite server Wlodek, Jakub via Tech-talk
Re: Connection to PVA server fails despite server Kasemir, Kay via Tech-talk
Re: Connection to PVA server fails despite server Michael Davidsaver via Tech-talk
Re: Connection to PVA server fails despite server Michael Davidsaver via Tech-talk
Re: Connection to PVA server fails despite server Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: Re: read RVB and VAL don't match when moving smarAct motors without encoders Peterson, Kevin M. via Tech-talk
Next: Re: read RVB and VAL don't match when moving smarAct motors without encoders Kevin Peterson 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Connection to PVA server fails despite server Michael Davidsaver via Tech-talk
Next: Re: Connection to PVA server fails despite server 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  <20202021  2022  2023  2024 
ANJ, 13 Nov 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·