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

Joseph Wu commented on MESOS-6802:
----------------------------------

{code}
commit 5023e004030e6018ea64f6824c353ffe4165c907
Author: Greg Mann <[email protected]>
Date:   Fri Jan 13 15:47:57 2017 -0800

    Added new libprocess socket tests.
    
    This patch adds NetSocketTest.EOFBeforeRecv and
    NetSocketTest.EOFAfterRecv to verify that EOFs are
    reliably received whether or not there is a pending recv()
    request at the time the EOF is received.
    
    Review: https://reviews.apache.org/r/53803/
{code}

> SSL socket can lose bytes in the case of EOF
> --------------------------------------------
>
>                 Key: MESOS-6802
>                 URL: https://issues.apache.org/jira/browse/MESOS-6802
>             Project: Mesos
>          Issue Type: Bug
>          Components: libprocess
>            Reporter: Greg Mann
>            Assignee: Greg Mann
>              Labels: libevent, libprocess, ssl
>             Fix For: 1.2.0
>
>
> During recent work on SSL-enabled tests in libprocess (MESOS-5966), we 
> discovered a bug in {{LibeventSSLSocketImpl}}, wherein the socket can either 
> fail to receive an EOF, or lose data when an EOF is received.
> The {{LibeventSSLSocketImpl::event_callback(short events)}} method 
> immediately sets any pending {{RecvRequest}}'s promise to zero upon receipt 
> of an EOF. However, at the time the promise is set, there may actually be 
> data waiting to be read by libevent. Upon receipt of an EOF, we should 
> attempt to read the socket's bufferevent first to ensure that we aren't 
> losing any data previously received by the socket.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to