[ 
https://issues.apache.org/jira/browse/MESOS-8138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16221487#comment-16221487
 ] 

Yan Xu commented on MESOS-8138:
-------------------------------

{quote}
the master realizes the disconnection when it tries to the pipe immediately
{quote}

How? You mean the 
[following|https://github.com/apache/mesos/blob/f26ffcee0a359a644968feca1ec91243401f589a/src/master/master.cpp#L8178-L8179]
 will execute {{Self::exited}} immediately?

{code:title=}
      http.closed()
        .onAny(defer(self(), &Self::exited, framework->id(), http));
{code}

It looks like it won't because {{http.close()}} internally tracks a 
{{process::http::Pipe::Writer writer}} 
[object|https://github.com/apache/mesos/blob/f26ffcee0a359a644968feca1ec91243401f589a/src/master/master.hpp#L303]
 which is instantiated 
[here|https://github.com/apache/mesos/blob/f26ffcee0a359a644968feca1ec91243401f589a/src/master/http.cpp#L843]
 which is not connected to the broken socket at all if the HttpProxy is 
terminated. 

Right?

> Master can fail to detect HTTP framework disconnection if it disconnects very 
> fast
> ----------------------------------------------------------------------------------
>
>                 Key: MESOS-8138
>                 URL: https://issues.apache.org/jira/browse/MESOS-8138
>             Project: Mesos
>          Issue Type: Bug
>          Components: HTTP API, master
>            Reporter: Yan Xu
>
> What we've observed is that if the framework disconnects before the master 
> actor processes the initial subscribe request, the master would [set up an 
> exited 
> callback|https://github.com/apache/mesos/blob/f26ffcee0a359a644968feca1ec91243401f589a/src/master/master.cpp#L8179]
>  that never gets triggered.
> It looks like it's because when the socket closes and libprocess terminates 
> the HttpProxy for this socket, [the pipe reader for this proxy is not 
> set|https://github.com/apache/mesos/blob/f599839bb854c7aff3d610e49f7e5465d7fe9341/3rdparty/libprocess/src/process.cpp#L1515-L1518].
>  
> Later when the master [sets up the 
> callback|https://github.com/apache/mesos/blob/f26ffcee0a359a644968feca1ec91243401f589a/src/master/master.cpp#L8179],
>  it would be a noop in this regard.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to