Closed jilavsky closed 2 years ago
restart BS has helped for now
That's the best first step. It assumes this is a one-time connection timeout issue.
I'll look into which PyEpics version (expecting 3.5.0) and also add diagnostic to inform which version of libca
is in use.
We still do not know the root cause why connection timeouts continue to be a problem. For certain it is an unidentified situation that happens here randomly.
In [7]: epics.__version__
Out[7]: '3.5.0'
In [10]: epics.ca.find_libca()
Out[10]: '/share1/bluesky/conda_envs/bluesky_2022_1/epics/lib/linux-x86_64/libca.so'
In [16]: epics.ca.version()
Out[16]: '4.13'
Per https://github.com/APS-USAXS/ipython-usaxs/issues/546#issuecomment-1042407960, hard-code the PYEPICS_LIBCA
environment variable in the startup shell script.
The version of libca
referenced above was installed from the epics-base
package:
(/share1/bluesky/conda_envs/bluesky_2022_1) bash-4.2$ conda list epics
# packages in environment at /share1/bluesky/conda_envs/bluesky_2022_1:
#
# Name Version Build Channel
epics-base 7.0.5.0 h295b1ef_0 conda-forge
pyepics 3.5.0 py39hf3d152e_1 conda-forge
PyEpics also provides its own libca
, installed locally here:
/share1/bluesky/conda_envs/bluesky_2022_1/lib/python3.9/site-packages/epics/clibs/linux64/libca.so
Still version 4.13:
(/share1/bluesky/conda_envs/bluesky_2022_1) bash-4.2$ export PYEPICS_LIBCA=/share1/bluesky/conda_envs/bluesky_2022_1/lib/python3.9/site-packages/epics/clibs/linux64/libca.so
(/share1/bluesky/conda_envs/bluesky_2022_1) bash-4.2$ ipython
Python 3.9.7 (default, Sep 16 2021, 13:09:58)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.29.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import ophyd
In [2]: sr = ophyd.EpicsSignalRO("S:SRcurrentAI", name="sr")
In [3]: sr.get()
Out[3]: 102.131801510282
In [5]: import epics
In [6]: epics.ca.version()
Out[6]: '4.13'
In [7]: epics.ca.find_libca()
Out[7]: '/share1/bluesky/conda_envs/bluesky_2022_1/lib/python3.9/site-packages/epics/clibs/linux64/libca.so'
In [8]:
Interesting. Same 4.13 version with older EPICS base libca
:
In [6]: epics.ca.version()
Out[6]: '4.13'
In [7]: epics.ca.find_libca()
Out[7]: '/APSshare/epics/base-3.15.6/lib/linux-x86_64/libca.so'
Another:
In [5]: epics.ca.version()
Out[5]: '4.13'
In [6]: epics.ca.find_libca()
Out[6]: '/APSshare/epics/base-7.0.4.1/lib/linux-x86_64/libca.so'
Note:
In [7]: epics.ca.version??
Signature: epics.ca.version()
Source:
@withCA
def version():
""" Print Channel Access version string.
Currently, this should report '4.13' """
return bytes2str(libca.ca_version())
So do not expect epics.ca.version()
to be a useful diagnostic.
nothing more to do here
Started BS testing again, cannot even do preUSAXStune: