You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jojy Varghese <jo...@mesosphere.io> on 2015/12/07 07:55:14 UTC

Review Request 41026: libevent ssl: Added check for buffer length before swapping request.

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

Review request for mesos and Joris Van Remoortere.


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


Repository: mesos


Description
-------

recv_callback could be called from libevents receive callback and Socket::recv
for the same buffer event and different requests. There is a check for buffer
length at Socket::recv but not at libevent's receive callback. This could lead
to the incoming request for Socket::recv being swapped out even though the
buffer length is zero. This change adds a check for buffer length before
swapping out the receive request object.


Diffs
-----

  3rdparty/libprocess/src/libevent_ssl_socket.cpp 55b91dd47bb5bd5e97147d0af91c7899fd42702c 

Diff: https://reviews.apache.org/r/41026/diff/


Testing
-------

make check


Thanks,

Jojy Varghese


Re: Review Request 41026: libevent ssl: Added check for buffer length before swapping request.

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41026/#review109226
-----------------------------------------------------------


Patch looks great!

Reviews applied: [41026]

Passed command: export OS=ubuntu:14.04;export CONFIGURATION="--verbose";export COMPILER=gcc; ./support/docker_build.sh

- Mesos ReviewBot


On Dec. 7, 2015, 6:55 a.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41026/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2015, 6:55 a.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4069
>     https://issues.apache.org/jira/browse/MESOS-4069
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> recv_callback could be called from libevents receive callback and Socket::recv
> for the same buffer event and different requests. There is a check for buffer
> length at Socket::recv but not at libevent's receive callback. This could lead
> to the incoming request for Socket::recv being swapped out even though the
> buffer length is zero. This change adds a check for buffer length before
> swapping out the receive request object.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/libevent_ssl_socket.cpp 55b91dd47bb5bd5e97147d0af91c7899fd42702c 
> 
> Diff: https://reviews.apache.org/r/41026/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>


Re: Review Request 41026: libevent ssl: Added check for buffer length before swapping request.

Posted by Jojy Varghese <jo...@mesosphere.io>.

> On Dec. 8, 2015, 1:43 a.m., Joseph Wu wrote:
> > Would it be plausible to write a repro/test (in the libprocess level) for this?
> > 
> > Presumably, we should be able to write a process that does a "long running streaming download" (which causes the bug, according to your diagnosis).

The steps described in the bug is a good way to test. I was able to repro the issue 1/10 times. Since this is a race condition, will be hard to write test.


- Jojy


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


On Dec. 8, 2015, 1:22 a.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41026/
> -----------------------------------------------------------
> 
> (Updated Dec. 8, 2015, 1:22 a.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4069
>     https://issues.apache.org/jira/browse/MESOS-4069
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> recv_callback could be called from libevents receive callback and Socket::recv
> for the same buffer event and different requests. There is a check for buffer
> length at Socket::recv but not at libevent's receive callback. This could lead
> to the incoming request for Socket::recv being swapped out even though the
> buffer length is zero. This change adds a check for buffer length before
> swapping out the receive request object.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/libevent_ssl_socket.cpp 55b91dd47bb5bd5e97147d0af91c7899fd42702c 
> 
> Diff: https://reviews.apache.org/r/41026/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>


Re: Review Request 41026: libevent ssl: Added check for buffer length before swapping request.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41026/#review109246
-----------------------------------------------------------


Would it be plausible to write a repro/test (in the libprocess level) for this?

Presumably, we should be able to write a process that does a "long running streaming download" (which causes the bug, according to your diagnosis).

- Joseph Wu


On Dec. 7, 2015, 5:22 p.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41026/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2015, 5:22 p.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4069
>     https://issues.apache.org/jira/browse/MESOS-4069
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> recv_callback could be called from libevents receive callback and Socket::recv
> for the same buffer event and different requests. There is a check for buffer
> length at Socket::recv but not at libevent's receive callback. This could lead
> to the incoming request for Socket::recv being swapped out even though the
> buffer length is zero. This change adds a check for buffer length before
> swapping out the receive request object.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/libevent_ssl_socket.cpp 55b91dd47bb5bd5e97147d0af91c7899fd42702c 
> 
> Diff: https://reviews.apache.org/r/41026/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>


Re: Review Request 41026: libevent ssl: Added check for buffer length before swapping request.

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41026/#review111347
-----------------------------------------------------------


Patch looks great!

Reviews applied: [41026]

Passed command: export OS=ubuntu:14.04;export CONFIGURATION="--verbose";export COMPILER=gcc; ./support/docker_build.sh

- Mesos ReviewBot


On Dec. 18, 2015, 11:53 p.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41026/
> -----------------------------------------------------------
> 
> (Updated Dec. 18, 2015, 11:53 p.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4069
>     https://issues.apache.org/jira/browse/MESOS-4069
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> recv_callback could be called from libevents receive callback and Socket::recv
> for the same buffer event and different requests. There is a check for buffer
> length at Socket::recv but not at libevent's receive callback. This could lead
> to the incoming request for Socket::recv being swapped out even though the
> buffer length is zero. This change adds a check for buffer length before
> swapping out the receive request object.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/libevent_ssl_socket.cpp 55b91dd47bb5bd5e97147d0af91c7899fd42702c 
> 
> Diff: https://reviews.apache.org/r/41026/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>


Re: Review Request 41026: libevent ssl: Added check for buffer length before swapping request.

Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41026/#review111657
-----------------------------------------------------------

Ship it!


Ship It!

- Joris Van Remoortere


On Dec. 18, 2015, 11:53 p.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41026/
> -----------------------------------------------------------
> 
> (Updated Dec. 18, 2015, 11:53 p.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4069
>     https://issues.apache.org/jira/browse/MESOS-4069
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> recv_callback could be called from libevents receive callback and Socket::recv
> for the same buffer event and different requests. There is a check for buffer
> length at Socket::recv but not at libevent's receive callback. This could lead
> to the incoming request for Socket::recv being swapped out even though the
> buffer length is zero. This change adds a check for buffer length before
> swapping out the receive request object.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/libevent_ssl_socket.cpp 55b91dd47bb5bd5e97147d0af91c7899fd42702c 
> 
> Diff: https://reviews.apache.org/r/41026/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>


Re: Review Request 41026: libevent ssl: Added check for buffer length before swapping request.

Posted by Jojy Varghese <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41026/
-----------------------------------------------------------

(Updated Dec. 18, 2015, 11:53 p.m.)


Review request for mesos and Joris Van Remoortere.


Changes
-------

rebased with master.


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


Repository: mesos


Description
-------

recv_callback could be called from libevents receive callback and Socket::recv
for the same buffer event and different requests. There is a check for buffer
length at Socket::recv but not at libevent's receive callback. This could lead
to the incoming request for Socket::recv being swapped out even though the
buffer length is zero. This change adds a check for buffer length before
swapping out the receive request object.


Diffs (updated)
-----

  3rdparty/libprocess/src/libevent_ssl_socket.cpp 55b91dd47bb5bd5e97147d0af91c7899fd42702c 

Diff: https://reviews.apache.org/r/41026/diff/


Testing
-------

make check


Thanks,

Jojy Varghese


Re: Review Request 41026: libevent ssl: Added check for buffer length before swapping request.

Posted by Jojy Varghese <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41026/
-----------------------------------------------------------

(Updated Dec. 18, 2015, 11:51 p.m.)


Review request for mesos and Joris Van Remoortere.


Changes
-------

review addressed.


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


Repository: mesos


Description
-------

recv_callback could be called from libevents receive callback and Socket::recv
for the same buffer event and different requests. There is a check for buffer
length at Socket::recv but not at libevent's receive callback. This could lead
to the incoming request for Socket::recv being swapped out even though the
buffer length is zero. This change adds a check for buffer length before
swapping out the receive request object.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/Makefile.am 04d0fa324bf6eab98a51fc08298b9da2992d29d1 
  3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake a27cb98fa45cbd135ebfeca65e215fb3ff054739 
  3rdparty/libprocess/3rdparty/stout/include/Makefile.am b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe 
  3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp cd1bad14919b9d566d5201201d8c3b4a335d5b9f 
  3rdparty/libprocess/3rdparty/stout/include/stout/errorbase.hpp 1e9db7e1cd2f411efb94893ba2c29bd0694e4ddc 
  3rdparty/libprocess/3rdparty/stout/include/stout/internal/windows/grp.hpp 1b74be6e8330392f77bf8c5ad50397a4fea82b60 
  3rdparty/libprocess/3rdparty/stout/include/stout/internal/windows/pwd.hpp 60990bb4c82e0510cd665f5b05f24daae754de2d 
  3rdparty/libprocess/3rdparty/stout/include/stout/ip.hpp ffeb2d721149f600f552021c127694183f1aa837 
  3rdparty/libprocess/3rdparty/stout/include/stout/mac.hpp 09c0d4905ed548d9c82ab6e9083108a3abc0e2aa 
  3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp 3c80910653ad2f3b663f19395f10214029f1a75e 
  3rdparty/libprocess/3rdparty/stout/include/stout/numify.hpp 26a637bec1193dd51437bd689c34fbe6d1935d89 
  3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 14fbca6d222bdfc0e8be301050b4ea1a8a6e7758 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/freebsd.hpp 269e35f56044d250697fe2ffdb181f8bcae64d37 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/mkdtemp.hpp a3cc8cdcd52c5edd3e11ae4ae28b1275526f381d 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/bootid.hpp 7ea5e4631b14c48455af7c9feec98bcb4ae79d75 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/fork.hpp 11557e3938d23ae253dd4d4eade85600123e0b22 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/mkdtemp.hpp bbfbb8a07e9d59f3a22e6917e7f247a797f45de8 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/process.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp 293f82f6730551491504721e0af28e9537540db1 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/signals.hpp f46f5910f34de534413d4c7df2681baee7c9d348 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/process.hpp a91a9d4c6aa6bf35c63cea531c34b537431fd9dc 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/raw/environment.hpp 80cc45b24cfe6f6429d4d0ed4acdafba51c590eb 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/strerror.hpp f95ff598696ff4a33117745c9361d58d5cca24e0 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/sysctl.hpp 8cfc77fc30d1bd17f7d3d3b2e8ca449f331aa9ca 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/mkdtemp.hpp 2cb73bbb996775e3764ad852ccda5076b41aef41 
  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/process.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 4cf693fb7e8c6bb3ad1920ebe90d61f0adb5dc99 
  3rdparty/libprocess/3rdparty/stout/include/stout/try.hpp c444c0118d39ee6a5da4618d7c62784464377280 
  3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp d46e262e0fd1c2de36f3bf19d8bd693c23bf58cd 
  3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp 27c5d5df7db54bcbb8b110512e5398f12a34a28b 
  3rdparty/libprocess/3rdparty/stout/include/stout/windows/os.hpp e738cdbf5846950c475c159fb9a770acc45159f5 
  3rdparty/libprocess/3rdparty/stout/tests/dynamiclibrary_tests.cpp 27626ae28db090f1a002239ff5c674b82e8fc9a8 
  3rdparty/libprocess/3rdparty/stout/tests/numify_tests.cpp 444377df00922df12d4b3ed25b4cfe9071cff5c3 
  3rdparty/libprocess/3rdparty/stout/tests/os/signals_tests.cpp 8b78beba81735c379be254a0ce20e50b822e69d9 
  3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp e0a898d91e3521d4b228621a81412e1dd5ddf63d 
  3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp bf2a2b8a9f67c6a4cf66b156b9c14fae015a8af0 
  3rdparty/libprocess/3rdparty/stout/tests/strings_tests.cpp 7715fa4baa150f370bdd0fd5c2f98dc4c6f5fc55 
  3rdparty/libprocess/Makefile.am 82778bbd34cfcf54b4268e019d634eb64e506d55 
  3rdparty/libprocess/README.md c3f309a7dc1c94882c4cc97eeaf0736c2fca0ba5 
  3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake d36fa2fbe903fb278e6c00b47bfa4b81cf8f4673 
  3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake 3a2e0999722007475c023ade75719093e35cfc80 
  3rdparty/libprocess/configure.ac 134f8ef4395d059e2901bbb48826fbfc4e6e3124 
  3rdparty/libprocess/include/process/event.hpp d7f3447d1ae25c470650f784f0a223e85da3e264 
  3rdparty/libprocess/include/process/future.hpp 817fca2ba5352a2c1cea1cb6cf6ecc49821215e4 
  3rdparty/libprocess/include/process/http.hpp f0666f0fa48c4f3a98332d12066561a02a715236 
  3rdparty/libprocess/include/process/mime.hpp 9d0dd1def4cfc7a047059e96ec61f4904c1c000a 
  3rdparty/libprocess/include/process/owned.hpp c1a04cc86c224340f388efd59a84073b71716629 
  3rdparty/libprocess/include/process/process.hpp d3eb6986c3c3b4d67188f870028215104b3d732c 
  3rdparty/libprocess/src/authentication_router.hpp c2516516d412234b8d885643c374cf3c380437f8 
  3rdparty/libprocess/src/config.hpp 1e0c2a5a61c3d1a7b50057f876f88a157a5e4ed8 
  3rdparty/libprocess/src/io.cpp 9530192e2c7afbfa4bd9aa2af2ff40f00ee505a9 
  3rdparty/libprocess/src/libevent.cpp 61d056b5ecd218948a7a81b8af15155fc1e824d9 
  3rdparty/libprocess/src/libevent_ssl_socket.cpp 55b91dd47bb5bd5e97147d0af91c7899fd42702c 
  3rdparty/libprocess/src/process.cpp cff635e74d22185de7ae767bc268ef4d56ad89f8 
  3rdparty/libprocess/src/tests/http_tests.cpp 19261502be220aaa40add7ce30a9b2b65d1d9fdc 
  3rdparty/libprocess/src/tests/main.cpp 78858a2b84a439d8f8a60ec8bcb6ac3a308087a6 
  3rdparty/libprocess/src/tests/process_tests.cpp df388ed4397ed25cc574e4cc134d84a5888bfc86 
  3rdparty/libprocess/src/tests/subprocess_tests.cpp 8f0a31341eebb168f78bc74f8afbaef9ba98e847 
  CHANGELOG 388b8b91df6fce826413649b0a1480af3f78e918 
  bootstrap.bat 9ca1421c1d5aae67cfba05176007908422d85a5e 
  configure.ac 40d60a63cdba41d06305f09141f4d14d6e229d95 
  docs/allocation-module.md 1dc1abaf9e28abc01de728634593b42c7cfc8af5 
  docs/architecture.md d1b3c0e7ffab1b9e70fc51282a46cf97b7718a48 
  docs/authentication.md 5f13181e93df4dc15a62d5540eeb43c40f91344d 
  docs/authorization.md 1fc0e3f9a686480ffc4deb25e49f867318d1321a 
  docs/c++-style-guide.md 7f5e51948616036378b8993134ba6df09dad5d88 
  docs/clang-format.md 206bc2ccf42e5593f715c6ccf0cc42e5cbc62469 
  docs/configuration.md c75f56ce849f6960b3b6246bfa6949156a82eabb 
  docs/containerizer-internals.md f620c32cdd4dd7cf6f245fad4e50925531cb4a39 
  docs/effective-code-reviewing.md fdfafc7d11f8455b68395cd2a4df6dab75f07b22 
  docs/fetcher.md ec7372293491ed9ee4e20dda3c2def72a77a3f84 
  docs/getting-started.md a679093da97cb40499f0c9fd5c255d647fed062a 
  docs/high-availability.md 31aa66220617a3f8606b185ef247c11f00735227 
  docs/home.md 51c19bb9d0d74698fcdda6197d32ed8f4a57d7c9 
  docs/maintenance.md e6bfe0f655581a6a72de4579bd7e5753625c0e51 
  docs/mesos-documentation-guide.md PRE-CREATION 
  docs/mesos-provisioner.md fdb298c2a954e903317ef56abbcfe2470a2dfd23 
  docs/networking-for-mesos-managed-containers.md 3b3fde4ff4f152c374abd0f2cb4a4b4d1e699fc4 
  docs/oversubscription.md 0b1c20bf9bae9c179d82f5f611638faf91f91431 
  docs/reconciliation.md ea11905720a3cd60e88b18e64e5b882f5e250166 
  docs/release-guide.md 7c9ee140b394d61581f736f2413969d650f18fa4 
  docs/sandbox.md a2ad226b0ee7969622495f090579f15029a2a083 
  docs/scheduler-http-api.md 4223a316c9a8c6eb8b40e984d051066e6da1d56c 
  docs/testing-patterns.md cc150d6204992b551fe820d5aab54d6a6f60597d 
  include/mesos/authorizer/authorizer.hpp aa9bb8b556f80a7c9c0fa3db95643efb49368dd5 
  include/mesos/authorizer/authorizer.proto 7f981e6d9cdd79a7d58b943bdc5abc81b355092f 
  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  include/mesos/quota/quota.proto 03e816dcd4dead8326731ac221df7354c0610fed 
  include/mesos/v1/mesos.proto 4aed0980b28dc1000aa2821f35303b736bc5bff8 
  site/source/assets/css/main.css 73ca8946091a638a359b1d769961879a283fa099 
  site/source/blog/2015-12-16-mesos-0-26-0-released.md f4b466dd52e5cc76721ab1aea33b61f2f5fc2fa2 
  site/source/downloads.html.md 6812968aab6803bdd5796c5d7a52711f32b8fdf3 
  site/source/index.html.md e6dfd36937b35ecb363adc93476d112130c67e2b 
  src/CMakeLists.txt bdc45ae604c940dadc27ab6e8b8a3327bd00642b 
  src/Makefile.am e6d48dc16135b5d147d036e851422686eff7d5ef 
  src/authorizer/local/authorizer.hpp eb95c9fdb393f69501841da0e8a2342ceb3ab7e0 
  src/authorizer/local/authorizer.cpp 46e181a907bc5248a403baf9e02200fee7fc4ba3 
  src/cli/execute.cpp a2b610f32da3deb9d3df99c225d22a425e03cdba 
  src/cmake/MesosProtobuf.cmake 273d74df581d85b9ef08a533c6ad8e31a23f1417 
  src/common/http.hpp 4f4cbf6e53588b72204f9628dea5696c71eb66a5 
  src/common/http.cpp 5198650ba6dc1ea3dab7912e5ef6e375bf9acc96 
  src/common/resources.cpp b9d31aef8babee212374e352c57fadbff02167f3 
  src/examples/java/TestFramework.java cbcdeedb0da22f82e274d088eb15a4128fd920fe 
  src/examples/java/TestLog.java a35a37af040deddd7181b22739be516308e32ea2 
  src/exec/exec.cpp 83dbee9dd2d9a4e7ebf395c8070bc7f9f8412ef1 
  src/files/files.hpp 7b65a0a4fbc591fdf22b6f88d6c74034bd8ab599 
  src/hdfs/hdfs.hpp abdb9b9013abc5e7c2e0d94492b7c1586d32625e 
  src/hdfs/hdfs.cpp 51f016b049c6e947c4d27fbbbf79c53f9ec5a51e 
  src/health-check/main.cpp 0beaed575ec865d81e6e3d83d8a0c894613acba4 
  src/jvm/jvm.hpp d5023e4050d109ca97cedb05f85e1c24202ac3b0 
  src/launcher/executor.cpp 09e7de6f2136ed9ca13e4822aeabcba2f7c5837d 
  src/launcher/fetcher.cpp 0ff859846f31a31ff8605d54f8b68b3281f5440d 
  src/linux/ns.hpp 244a811b299c29b1dcd6652bd26e861e04df3f54 
  src/log/replica.cpp 45b77178fe93e26ae0ffde5ff0f02f36e5150bcb 
  src/logging/logging.cpp f7619b18fa4a78b20951edad892ca5c616bbed55 
  src/master/allocator/mesos/hierarchical.hpp 99c742906874c30c39c159e58a65277ade3c07fd 
  src/master/allocator/mesos/hierarchical.cpp 5da825a1d578a9ee40b4985378fddb3c5fb3b416 
  src/master/http.cpp 8dfd67f7d51b8395953d6beb77b2d71bc538eacd 
  src/master/master.hpp 7cb0e1692644e51271588abffa832e08c536b838 
  src/master/master.cpp 470b542729b01f41fc6a2e601a7a6c3d0c5353d5 
  src/master/quota.cpp df2cc5877160df101222756739f042895ceacc95 
  src/master/quota_handler.cpp 11167879b2480d9c8dd6398ca39c479089ec2272 
  src/master/validation.cpp 6a43bce5b7df6a9d939245c4726d060fa19eb305 
  src/messages/messages.proto b66bac14056407140bb3cf5aa3e67ac94df1a2f8 
  src/python/cli/src/mesos/cli.py f342992e0c15b1b1464bf3717634f07847aacdfe 
  src/slave/cmake/FindCurl.cmake df81fd538b06bf0c3e842a502bd5ef4083d897b5 
  src/slave/containerizer/fetcher.hpp bbdce88da6e41dbb88681bc9d604b00923033b3d 
  src/slave/containerizer/fetcher.cpp 4ac9149980cf7f013b318218a1b29369c5dcff17 
  src/slave/containerizer/mesos/containerizer.cpp 8242190dffa4d011ee2728a9f0a04d3857767b69 
  src/slave/containerizer/mesos/isolators/cgroups/perf_event.cpp 4d82c2b2f231c59cbb600869a0f2b716c1e55f5e 
  src/slave/containerizer/mesos/isolators/filesystem/linux.cpp 0df27d66ccd84e73b7fae068367c5dd035eaecb7 
  src/slave/containerizer/mesos/isolators/network/port_mapping.cpp 22a8428427b758bae4a0518356d7933c4110cd9f 
  src/slave/containerizer/mesos/provisioner/docker/message.proto 5c032701671b275d86c6d9276791a46df814396c 
  src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp bf85038f6a7e9940f9c410e7cf4ab50c2432673a 
  src/slave/containerizer/mesos/provisioner/docker/puller.hpp d12b3d0ec9c1c7ce174451e4035e106eedcdcfd1 
  src/slave/containerizer/mesos/provisioner/docker/puller.cpp 7e830bc00b1533092735063b4b93039058806111 
  src/slave/http.cpp 66abdcb12d670bc4b77fa5b5f8ce35220f9aa698 
  src/slave/qos_controllers/load.hpp 098a6d0b2dfc54b5b95a261a780eea70a838c12d 
  src/slave/qos_controllers/load.cpp 52520d6220784423c09001b8bd59e090ebf787ec 
  src/slave/slave.hpp b7586ce42bfac9d9885a3eb8d82deb94680c236c 
  src/slave/slave.cpp ef869695ffeb2e6d9ef0a78ddb676b1b7cd19afe 
  src/slave/state.hpp 9cc9df2f8afb2ae848db467892dfb7f54973a6a3 
  src/slave/state.cpp b912c554fc9cb5593f541a7803422c22dc03dffd 
  src/tests/attributes_tests.cpp 3f3dde1301566f279c3fc7dc24e3ef67039a4c14 
  src/tests/authorization_tests.cpp dcf348acc75b143e3a854bde17e6042dc90599d5 
  src/tests/common/http_tests.cpp 0ea06341b092cd6ad278075b12dd970b84c84464 
  src/tests/containerizer/memory_pressure_tests.cpp 4a03af2c9c0643d964b1d76e2096341b59bf5dce 
  src/tests/containerizer/provisioner_docker_tests.cpp b57ee8681e0861cf93f5dcf9368c004a57df1374 
  src/tests/executor_http_api_tests.cpp 8d86df5fd54bcfe998eb7dc4302509e7a00e9d84 
  src/tests/fetcher_cache_tests.cpp 1fb1e213d3c35479789688d1a3a49a3c6058b198 
  src/tests/fetcher_tests.cpp 1831d896ca8a52bec4adf87a67b6af845079796c 
  src/tests/group_tests.cpp 77349465e0163c8aa6bed6deefe3f98efb442f3d 
  src/tests/hdfs_tests.cpp 29f156028af57b83ee2aa299f3b1c89e96d15fd0 
  src/tests/health_check_tests.cpp 0fbccc373204d3b9431c614bdd6d046cc07e4566 
  src/tests/hierarchical_allocator_tests.cpp e239b4746494fcc2b362a83afb634a2ce5e25f9b 
  src/tests/main.cpp 942488e57419ace8b7a821f53024aced0f43c7d9 
  src/tests/master_maintenance_tests.cpp a14435c0e3f44b5a61e2f5a9debd20f4e447491f 
  src/tests/master_quota_tests.cpp 0473869783a714766ed26fff61d7f8c56342df74 
  src/tests/mesos.hpp 1c6acabab9d189a6d3cc8d63359053fd230377b8 
  src/tests/mesos.cpp 50ba8c448fcc4cee4d69074472c4e0e0c6cf7c0d 
  src/tests/oversubscription_tests.cpp 7a75fb38e0177e33cf0e7cb82b4b9ebf8f05fe0a 
  src/tests/persistent_volume_endpoints_tests.cpp c0feedee393b8475fd27b0af9344d306a392893e 
  src/tests/persistent_volume_tests.cpp 01b3c13751a5558d5f06edb8f650c8644dc54486 
  src/tests/repair_tests.cpp 63ec889c4954c2c60d3466952551aa25b3284ddf 
  src/tests/reservation_endpoints_tests.cpp b8edd6fafedd4c2221a8d19c1ebc71254071a8c7 
  src/tests/reservation_tests.cpp f429472e6b93a5d6d8fe6a5f7d5b94fc331f7295 
  src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
  src/tests/scheduler_http_api_tests.cpp 4d23a5a8368e0ed126469fa4a90a889b339ad004 
  src/tests/slave_tests.cpp 109d31c8661c6b91243852e7ee00ce9fa1effe4b 
  src/tests/values_tests.cpp a4eb68ad13407f471a07a9a923ed31c7890da9f7 
  src/v1/resources.cpp 0c0eee6b3b7ae3254d7dc7b06187855c9b873764 
  support/apply-review.sh 3a73492090d94b5a166c9a2cd78c77b616dc820d 
  support/apply-reviews.py b8a0b6df70d7b4bd13ebfd9e797df30479e89ab2 
  support/docker_build.sh 7882bd20e4b6ee28dc117086386de8faac995a3e 
  support/hooks/post-rewrite af907de7c6dd44fd6a7f34f52aaaed4460c44bc1 
  support/hooks/pre-commit bdc12af4c2e3f1c32c6b7763c791e41d7e9d72d4 
  support/site-docker/README.md 957117e1211f06b40c5fb621039dd90aff562a87 

Diff: https://reviews.apache.org/r/41026/diff/


Testing
-------

make check


Thanks,

Jojy Varghese


Re: Review Request 41026: libevent ssl: Added check for buffer length before swapping request.

Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41026/#review111295
-----------------------------------------------------------



3rdparty/libprocess/src/libevent_ssl_socket.cpp (lines 225 - 226)
<https://reviews.apache.org/r/41026/#comment171412>

    Let's explain the call-graph entry points here.



3rdparty/libprocess/src/libevent_ssl_socket.cpp (line 233)
<https://reviews.apache.org/r/41026/#comment171411>

    We don't need this as both call paths lock the bev already.
    Let's add a comment at the top of this function to elaborate on both call graphs, and how they lock the bev before entering.



3rdparty/libprocess/src/libevent_ssl_socket.cpp (line 234)
<https://reviews.apache.org/r/41026/#comment171404>

    We should either do this consistently or just use `size_t`. I vote for `size_t` for now.



3rdparty/libprocess/src/libevent_ssl_socket.cpp (line 237)
<https://reviews.apache.org/r/41026/#comment171413>

    Let's clearly explain why we need this (as per the example event orders we used to discover this bug).
    We may enter this function scheduled by libevent when it thought the buffer had data, but between libevent scheduling it and it being invoked, our lambda in `recv()` got invoked instead.


- Joris Van Remoortere


On Dec. 8, 2015, 1:22 a.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41026/
> -----------------------------------------------------------
> 
> (Updated Dec. 8, 2015, 1:22 a.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4069
>     https://issues.apache.org/jira/browse/MESOS-4069
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> recv_callback could be called from libevents receive callback and Socket::recv
> for the same buffer event and different requests. There is a check for buffer
> length at Socket::recv but not at libevent's receive callback. This could lead
> to the incoming request for Socket::recv being swapped out even though the
> buffer length is zero. This change adds a check for buffer length before
> swapping out the receive request object.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/libevent_ssl_socket.cpp 55b91dd47bb5bd5e97147d0af91c7899fd42702c 
> 
> Diff: https://reviews.apache.org/r/41026/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>


Re: Review Request 41026: libevent ssl: Added check for buffer length before swapping request.

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41026/#review109294
-----------------------------------------------------------


Patch looks great!

Reviews applied: [41026]

Passed command: export OS=ubuntu:14.04;export CONFIGURATION="--verbose";export COMPILER=gcc; ./support/docker_build.sh

- Mesos ReviewBot


On Dec. 8, 2015, 1:22 a.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41026/
> -----------------------------------------------------------
> 
> (Updated Dec. 8, 2015, 1:22 a.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-4069
>     https://issues.apache.org/jira/browse/MESOS-4069
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> recv_callback could be called from libevents receive callback and Socket::recv
> for the same buffer event and different requests. There is a check for buffer
> length at Socket::recv but not at libevent's receive callback. This could lead
> to the incoming request for Socket::recv being swapped out even though the
> buffer length is zero. This change adds a check for buffer length before
> swapping out the receive request object.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/libevent_ssl_socket.cpp 55b91dd47bb5bd5e97147d0af91c7899fd42702c 
> 
> Diff: https://reviews.apache.org/r/41026/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>


Re: Review Request 41026: libevent ssl: Added check for buffer length before swapping request.

Posted by Jojy Varghese <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41026/
-----------------------------------------------------------

(Updated Dec. 8, 2015, 1:22 a.m.)


Review request for mesos and Joris Van Remoortere.


Changes
-------

variable name fixed.


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


Repository: mesos


Description
-------

recv_callback could be called from libevents receive callback and Socket::recv
for the same buffer event and different requests. There is a check for buffer
length at Socket::recv but not at libevent's receive callback. This could lead
to the incoming request for Socket::recv being swapped out even though the
buffer length is zero. This change adds a check for buffer length before
swapping out the receive request object.


Diffs (updated)
-----

  3rdparty/libprocess/src/libevent_ssl_socket.cpp 55b91dd47bb5bd5e97147d0af91c7899fd42702c 

Diff: https://reviews.apache.org/r/41026/diff/


Testing
-------

make check


Thanks,

Jojy Varghese