You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Mahler <bm...@apache.org> on 2020/04/21 17:43:42 UTC

Review Request 72352: Fixed a bug where OpenSSLSocketImpl accept loop can silently stop.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72352/
-----------------------------------------------------------

Review request for mesos and Greg Mann.


Bugs: MESOS-10114
    https://issues.apache.org/jira/browse/MESOS-10114


Repository: mesos


Description
-------

The accept loop was chaining the loop body Future on the result of
io::poll/io::read, which meant that any failed poll/read would cause
the loop body to return a failed future and the loop to stop running.

This would lead to the server socket silently no longer accepting
incoming connections.


Diffs
-----

  3rdparty/libprocess/src/ssl/openssl_socket.hpp 0528c03faaa5f8372cf09c1f51be66934f405661 
  3rdparty/libprocess/src/ssl/openssl_socket.cpp 3f4dab6b92f202ee89cc2e06db997c41e4c6ca00 


Diff: https://reviews.apache.org/r/72352/diff/1/


Testing
-------

Added a test in subsequent patch.


Thanks,

Benjamin Mahler


Re: Review Request 72352: Fixed a bug where OpenSSLSocketImpl accept loop can silently stop.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72352/#review220491
-----------------------------------------------------------


Ship it!




Ship It!

- Greg Mann


On April 24, 2020, 7:14 p.m., Benjamin Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72352/
> -----------------------------------------------------------
> 
> (Updated April 24, 2020, 7:14 p.m.)
> 
> 
> Review request for mesos and Greg Mann.
> 
> 
> Bugs: MESOS-10114
>     https://issues.apache.org/jira/browse/MESOS-10114
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The accept loop was chaining the loop body Future on the result of
> io::poll/io::read, which meant that any failed poll/read would cause
> the loop body to return a failed future and the loop to stop running.
> 
> This would lead to the server socket silently no longer accepting
> incoming connections.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/ssl/openssl_socket.hpp 0528c03faaa5f8372cf09c1f51be66934f405661 
>   3rdparty/libprocess/src/ssl/openssl_socket.cpp 3f4dab6b92f202ee89cc2e06db997c41e4c6ca00 
> 
> 
> Diff: https://reviews.apache.org/r/72352/diff/2/
> 
> 
> Testing
> -------
> 
> Added a test in subsequent patch.
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>


Re: Review Request 72352: Fixed a bug where OpenSSLSocketImpl accept loop can silently stop.

Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72352/
-----------------------------------------------------------

(Updated April 24, 2020, 7:14 p.m.)


Review request for mesos and Greg Mann.


Changes
-------

* Used .onReady instead of .then


Bugs: MESOS-10114
    https://issues.apache.org/jira/browse/MESOS-10114


Repository: mesos


Description
-------

The accept loop was chaining the loop body Future on the result of
io::poll/io::read, which meant that any failed poll/read would cause
the loop body to return a failed future and the loop to stop running.

This would lead to the server socket silently no longer accepting
incoming connections.


Diffs (updated)
-----

  3rdparty/libprocess/src/ssl/openssl_socket.hpp 0528c03faaa5f8372cf09c1f51be66934f405661 
  3rdparty/libprocess/src/ssl/openssl_socket.cpp 3f4dab6b92f202ee89cc2e06db997c41e4c6ca00 


Diff: https://reviews.apache.org/r/72352/diff/2/

Changes: https://reviews.apache.org/r/72352/diff/1-2/


Testing
-------

Added a test in subsequent patch.


Thanks,

Benjamin Mahler


Re: Review Request 72352: Fixed a bug where OpenSSLSocketImpl accept loop can silently stop.

Posted by Benjamin Mahler <bm...@apache.org>.

> On April 23, 2020, 8:34 a.m., Greg Mann wrote:
> > 3rdparty/libprocess/src/ssl/openssl_socket.cpp
> > Lines 581-585 (original), 581-585 (patched)
> > <https://reviews.apache.org/r/72352/diff/1/?file=2224524#file2224524line581>
> >
> >     Instead of using `.then()` and returning `Nothing()`, can you use `.onReady()` and make the callback a void function?

Yep!


- Benjamin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72352/#review220451
-----------------------------------------------------------


On April 21, 2020, 5:43 p.m., Benjamin Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72352/
> -----------------------------------------------------------
> 
> (Updated April 21, 2020, 5:43 p.m.)
> 
> 
> Review request for mesos and Greg Mann.
> 
> 
> Bugs: MESOS-10114
>     https://issues.apache.org/jira/browse/MESOS-10114
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The accept loop was chaining the loop body Future on the result of
> io::poll/io::read, which meant that any failed poll/read would cause
> the loop body to return a failed future and the loop to stop running.
> 
> This would lead to the server socket silently no longer accepting
> incoming connections.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/ssl/openssl_socket.hpp 0528c03faaa5f8372cf09c1f51be66934f405661 
>   3rdparty/libprocess/src/ssl/openssl_socket.cpp 3f4dab6b92f202ee89cc2e06db997c41e4c6ca00 
> 
> 
> Diff: https://reviews.apache.org/r/72352/diff/1/
> 
> 
> Testing
> -------
> 
> Added a test in subsequent patch.
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>


Re: Review Request 72352: Fixed a bug where OpenSSLSocketImpl accept loop can silently stop.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72352/#review220451
-----------------------------------------------------------




3rdparty/libprocess/src/ssl/openssl_socket.cpp
Lines 581-585 (original), 581-585 (patched)
<https://reviews.apache.org/r/72352/#comment308831>

    Instead of using `.then()` and returning `Nothing()`, can you use `.onReady()` and make the callback a void function?


- Greg Mann


On April 21, 2020, 5:43 p.m., Benjamin Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72352/
> -----------------------------------------------------------
> 
> (Updated April 21, 2020, 5:43 p.m.)
> 
> 
> Review request for mesos and Greg Mann.
> 
> 
> Bugs: MESOS-10114
>     https://issues.apache.org/jira/browse/MESOS-10114
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The accept loop was chaining the loop body Future on the result of
> io::poll/io::read, which meant that any failed poll/read would cause
> the loop body to return a failed future and the loop to stop running.
> 
> This would lead to the server socket silently no longer accepting
> incoming connections.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/ssl/openssl_socket.hpp 0528c03faaa5f8372cf09c1f51be66934f405661 
>   3rdparty/libprocess/src/ssl/openssl_socket.cpp 3f4dab6b92f202ee89cc2e06db997c41e4c6ca00 
> 
> 
> Diff: https://reviews.apache.org/r/72352/diff/1/
> 
> 
> Testing
> -------
> 
> Added a test in subsequent patch.
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>