Print

Print


Well, it's a small consolation but it appears that we were both correct. Indeed, there was a race condition that would affect MacOS. That problem was masked in my initial testing by the immediate connect problem. Adding sufficient tracing via cerr changed the timing to make the race issue obvious. So, the fix has been pushed. However, the immediate connect problem remains and can be best seen on Solaris when connecting to 'localhost' (or its equivalent). So, as a byproduct I now have a complete trace that points out the issue. When the client gets an immediate connect it fails to start the handshake but enables write events. When the event callback is invoked it sees that there is no outstanding write so it simply disables write notifications. That means the handshake is never preformed and the connection eventually times out. Below is the trace (not that lines starting with 'Cl' are in the client code and correspond to the first few characters of the associated file). The code was complicated enough that I couldn't see how to fix it. Again, you need to try this on Solaris as it always immediately connects to a server running on the same machine, MacOS sometimes does and sometimes not, and Linux never does.

sysdev4500> ./xrdfs sysdev4500 ls /tmp/abh
ClStr Calling Connect(120)
ClSoc Connect status=0
ClSoc Immediate connect; pStatus=connected
ClPB enabling write events!
IOE fd 10 Enable: ->Enable(4,60)
IOE fd 10 Init: begin events=4
IOE fd 10 Init: Include() returned true channel now locked
IOE fd 10 Init: Modify(4) == true [prior events=0] channel now locked
IOE fd 10 Modify: Init() returned true
IOE fd 10 Enable: Modify(4) == true [prior events=0] channel now locked
ClStr Connect status OK, pSubStreams[0]->status=Connecting
IOE fd 10 CbkXeq: callback events=4 toq=1 erc=0 callback present poller=norm
IOE fd 10 CbkXeq: invoking callback; events=4
ClPB In callback; evflags=4 ev=4
ClAsyn ReadyToWrite & socket connected & handshakes NOT Done; ->OnWriteWhileHandshaking()
ClAsyn pOutgoing=false; ->DisableUplink()
ClPB disabling write events!
IOE fd 10 Disable: Modify(0) == true [prior events=4] channel now locked
ClAsyn pOutgoing=false; simply return
IOE fd 10 CbkXeq: callback returned true
******* HANG *******

On the server side:

130427 22:43:24 001 XrdInet: Accepted connection from [log in to unmask]
130427 22:43:24 005 XrdSched: running ?:22@sysdev4500 inq=0
130427 22:43:54 005 XrdProtocol: ?:22@sysdev4500 terminated handshake not received


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