caget w/ missing CA name server is slow to fail

Bug #1532328 reported by mdavidsaver
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Confirmed
Low
Unassigned

Bug Description

When EPICS_CA_NAME_SERVERS is set a value which is a valid host, but which is does not have a CA server on the given port, the catools are slow to fail (30 seconds for me). An invalid host name fails fast (1 sec).

> export EPICS_CA_NAME_SERVERS=localhost:40001
> caget TST{pico}Mode-Sel
> CAC: Unable to connect because "Connection refused"
> Channel connect timed out: 'TST{pico}Mode-Sel' not found.
> CAC TCP socket shutdown error was Transport endpoint is not connected

From the error, the delay isn't waiting for connect(), but may be due to some missing error handling which doesn't handle failure of connect().

I'm testing with Base 3.14.12.3.

Tags: ca
Revision history for this message
Andrew Johnson (anj) wrote :

Confirmed:

tux$ time caget this-is-not-a-real-pv
Channel connect timed out: 'this-is-not-a-real-pv' not found.

real 0m1.012s
user 0m0.005s
sys 0m0.005s

tux$ export EPICS_CA_NAME_SERVERS=nomachine
tux$ time caget this-is-not-a-real-pv
../iocinf.cpp: Parsing 'EPICS_CA_NAME_SERVERS'
 Bad internet address or host name: 'nomachine'
Channel connect timed out: 'this-is-not-a-real-pv' not found.

real 0m1.020s
user 0m0.006s
sys 0m0.006s

tux$ export EPICS_CA_NAME_SERVERS=tux
tux$ time caget this-is-not-a-real-pv
CAC: Unable to connect because "Connection refused"
Channel connect timed out: 'this-is-not-a-real-pv' not found.
CAC TCP socket shutdown error was Transport endpoint is not connected

real 0m30.015s
user 0m0.003s
sys 0m0.010s

If there is a real name-server (or an IOC) on the host with no such PV, the failure is fast again:

tux$ time caget this-is-not-a-real-pv
Channel connect timed out: 'this-is-not-a-real-pv' not found.

real 0m1.010s
user 0m0.007s
sys 0m0.006s

tags: added: ca
Changed in epics-base:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.