Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect() to TCP name server has long timeout #11

Open
mdavidsaver opened this issue Sep 19, 2017 · 0 comments
Open

connect() to TCP name server has long timeout #11

mdavidsaver opened this issue Sep 19, 2017 · 0 comments
Labels

Comments

@mdavidsaver
Copy link
Contributor

An issue introduced by my addition of name lookup via. TCP. If a name server is not reachable, but there is a route, then the connect() will stall for a long time. This can stall cs-studio startup as the initial connection attempt is done during Context initialization.

This is only an issue if name servers are used other than localhost (eg. ssh tunnel).

"PVMgr JCADataSource Worker 1" #39 daemon prio=5 os_prio=0 tid=0x00007f23d9e21000 nid=0xd69 runnable [0x00007f235115f000]
   java.lang.Thread.State: RUNNABLE
        at sun.nio.ch.Net.connect0(Native Method)
        at sun.nio.ch.Net.connect(Net.java:454)
        at sun.nio.ch.Net.connect(Net.java:446)
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
        - locked <0x00000000eb5854e0> (a java.lang.Object)
        - locked <0x00000000eb585500> (a java.lang.Object)
        - locked <0x00000000eb5854f0> (a java.lang.Object)
        at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
        at com.cosylab.epics.caj.impl.CAConnector.tryConnect(CAConnector.java:179)
        at com.cosylab.epics.caj.impl.CAConnector.connect(CAConnector.java:94)
        at com.cosylab.epics.caj.CAJContext.getTransport(CAJContext.java:1533)
        at com.cosylab.epics.caj.impl.CAJNameClient.connect(CAJNameClient.java:34)
        at com.cosylab.epics.caj.CAJContext.initializeNameServers(CAJContext.java:777)
        at com.cosylab.epics.caj.CAJContext.internalInitialize(CAJContext.java:763)
        at com.cosylab.epics.caj.CAJContext.initialize(CAJContext.java:697)
        - locked <0x00000000eb33dfa0> (a com.cosylab.epics.caj.CAJContext)
        at com.cosylab.epics.caj.CAJContext.checkState(CAJContext.java:680)
        - locked <0x00000000eb33dfa0> (a com.cosylab.epics.caj.CAJContext)
        at com.cosylab.epics.caj.CAJContext.createChannel(CAJContext.java:966)
        at org.diirt.support.ca.JCAChannelHandler.connect(JCAChannelHandler.java:169)
        - locked <0x00000000eb38f480> (a org.diirt.support.ca.JCAChannelHandler)
        at org.diirt.datasource.MultiplexedChannelHandler.guardedConnect(MultiplexedChannelHandler.java:313)
        at org.diirt.datasource.MultiplexedChannelHandler.addReader(MultiplexedChannelHandler.java:247)
        - locked <0x00000000eb38f480> (a org.diirt.support.ca.JCAChannelHandler)
        at org.diirt.datasource.DataSource$1.run(DataSource.java:178)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
        - <0x00000000eb398828> (a java.util.concurrent.ThreadPoolExecutor$Worker)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant