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

[SSI] Server does not call Finished() on client disconnect #616

Closed
slithy opened this issue Nov 3, 2017 · 1 comment
Closed

[SSI] Server does not call Finished() on client disconnect #616

slithy opened this issue Nov 3, 2017 · 1 comment

Comments

@slithy
Copy link

slithy commented Nov 3, 2017

In the normal case, when a client makes a request, Finished() is called before the client disconnects:

171103 11:36:34 14217 XrootdXeq: mike.14362:29@localhost pvt IP64 login
[DEBUG] Service::Prepare():
[DEBUG]    Resource name: /ctafrontend
[DEBUG] RequestProc() constructor
[DEBUG] XrdSsiPbService::ProcessRequest(): Binding Processor to Request
[DEBUG] RequestProc::Execute()
[DEBUG] RequestProc::Finished()
[DEBUG] XrdSsiPbService::ProcessRequest(): Unbinding Processor from Request
[DEBUG] ~RequestProc() destructor
171103 11:36:35 14217 XrootdXeq: mike.14362:29@localhost disc 0:00:01

However, if the client disconnects (process is killed or the connection times out), Finished() is not called until the server has finished processing the response. Here I artifically made the response take 100 seconds to illustrate the problem:

171103 11:36:54 14075 XrootdXeq: mike.14377:27@localhost pvt IP64 login
[DEBUG] Service::Prepare():
[DEBUG]    Resource name: /ctafrontend
[DEBUG] RequestProc() constructor
[DEBUG] XrdSsiPbService::ProcessRequest(): Binding Processor to Request
[DEBUG] RequestProc::Execute()
171103 11:36:55 14217 XrootdXeq: mike.14377:27@localhost disc 0:00:01
171103 11:38:34 14075 XrootdsendResp: mike.14377:27@localhost query async resp aborted; user gone.
[DEBUG] RequestProc::Finished()
[DEBUG] XrdSsiPbService::ProcessRequest(): Unbinding Processor from Request
[DEBUG] ~RequestProc() destructor

Note that the client disconnects at 11:36:55 but the response is not aborted immediately. It runs to completion before it realises that the client is no longer present. At 11:38:34, it realises that the user is gone and then calls Finished().

In the intervening time between the client disconnect and Finished(), new client connections are refused with this error:

Unable to write /ctafrontend; address already in use

(Note that normally multiple simultaneous connections are fine, it's only after a client disconnect that new connections are refused).

@xrootd-dev
Copy link

xrootd-dev commented Nov 3, 2017 via email

@abh3 abh3 closed this as completed in 59a9919 Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants