OK, this is clearly a client bug. The client does not properly handle the case when XrdNet::Connect() immediately returns with success instead of EINPROGRESS. You can see this in the following two traces (I added some print statements). This only happens in Solaris and MacOS when connecting to a local socket (Linux seems to always return EINPROGRESS). Everything works fine as long as you get EINPROGRESS status. It appears that there is a logic issue when testing for connection status on the first callback (which always happens). The other issue I saw is that the callback does not handle the case when more than one event is reflected (e.g. readytoread along with readytowrite). This also seems to cause problems. In any case, the builtin poller is working exactly as advertised.

Non working trace:
[2013-04-26 15:15:03 -0700][Debug ][PostMaster ] Creating new channel to: sysdev4500:1094 1 stream(s)
[2013-04-26 15:15:03 -0700][Debug ][TaskMgr ] Registering task: "TickGeneratorTask for: sysdev4500:1094" to be run at: [2013-04-26 15:15:18 -0700]
[2013-04-26 15:15:03 -0700][Dump ][PostMaster ] [sysdev4500:1094 #0] Sending message kXR_locate (path: */tmp/abh, flags: none) through substream 0 expecting answer at 0
[2013-04-26 15:15:03 -0700][Debug ][PostMaster ] [sysdev4500:1094] Found 1 address(es): [::172.23.16.108]:1094
[2013-04-26 15:15:03 -0700][Debug ][AsyncSock ] [sysdev4500:1094 #0.0] Attempting connection to [::172.23.16.108]:1094
ClSocket Connect satus=0
[2013-04-26 15:15:03 -0700][Debug ][Poller ] Adding socket 0x482280 to the poller
Init called ev=4 lock=1
SysIOEvents Callback ev=4 toq=1 cbk=1 ini=0
SysIOEvents Callback return ckok=1
[2013-04-26 15:15:04 -0700][Dump ][TaskMgr ] Running task: "FileTimer task"
[2013-04-26 15:15:04 -0700][Dump ][TaskMgr ] Will rerun task "FileTimer task" at [2013-04-26 15:15:19 -0700]

Working trace:
[2013-04-26 15:17:30 -0700][Debug ][PostMaster ] Creating new channel to: noric22:1094 1 stream(s)
[2013-04-26 15:17:30 -0700][Debug ][TaskMgr ] Registering task: "TickGeneratorTask for: noric22:1094" to be run at: [2013-04-26 15:17:45 -0700]
[2013-04-26 15:17:30 -0700][Dump ][PostMaster ] [noric22:1094 #0] Sending message kXR_locate (path: */tmp/abh, flags: none) through substream 0 expecting answer at 0
[2013-04-26 15:17:30 -0700][Debug ][PostMaster ] [noric22:1094] Found 1 address(es): [::134.79.200.115]:1094
[2013-04-26 15:17:30 -0700][Debug ][AsyncSock ] [noric22:1094 #0.0] Attempting connection to [::134.79.200.115]:1094
ClSocket Connect satus=150
[2013-04-26 15:17:30 -0700][Debug ][Poller ] Adding socket 0x482280 to the poller
Init called ev=4 lock=1
SysIOEvents Callback ev=4 toq=1 cbk=1 ini=0
[2013-04-26 15:17:30 -0700][Debug ][AsyncSock ] [noric22:1094 #0.0] Async connection call returned
[2013-04-26 15:17:30 -0700][Debug ][XRootDTransport ] [noric22:1094 #0.0] Sending out the initial hand shake + kXR_protocol
SysIOEvents Callback return ckok=1
SysIOEvents Callback ev=4 toq=1 cbk=1 ini=0
[2013-04-26 15:17:30 -0700][Dump ][AsyncSock ] [noric22:1094 #0.0] Wrote a message: , 44 bytes
SysIOEvents Callback return ckok=1
SysIOEvents Callback ev=1 toq=1 cbk=1 ini=0
[2013-04-26 15:17:30 -0700][Dump ][AsyncSock ] [noric22:1094 #0.0] Received message header, size: 8
[2013-04-26 15:17:30 -0700][Dump ][AsyncSock ] [noric22:1094 #0.0] Received a message of 16 bytes
[2013-04-26 15:17:30 -0700][Debug ][XRootDTransport ] [noric22:1094 #0.0] Got the server hand shake response (type: server [], protocol version 297)
SysIOEvents Callback return ckok=1
SysIOEvents Callback ev=1 toq=1 cbk=1 ini=0
[2013-04-26 15:17:30 -0700][Dump ][AsyncSock ] [noric22:1094 #0.0] Received message header, size: 8
[2013-04-26 15:17:30 -0700][Dump ][AsyncSock ] [noric22:1094 #0.0] Received a message of 16 bytes
[2013-04-26 15:17:30 -0700][Debug ][XRootDTransport ] [noric22:1094 #0.0] kXR_protocol successful (type: server [], protocol version 297)
[2013-04-26 15:17:30 -0700][Debug ][XRootDTransport ] [noric22:1094 #0.0] Sending out kXR_login request, username: abh


Reply to this email directly or view it on GitHub.



Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1