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.