Re: Review Request 58059: Changed libprocess SocketManager to refer to HttpProxy by PID.

2017-04-04 Thread Greg Mann

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



Have you encountered a deadlock at all when running the test in 
https://reviews.apache.org/r/58056/ ? When running with libev, I see a deadlock 
after several hundred repetitions. It looks like `ProcessManager::use()` is 
being called on an `HttpProxy` through the `StremaingResponseDecoder` as part 
of a callback on the event loop, while `ProcessManager::cleanup()` is being 
called on the `HttpProcess` from the test.

One thread is blocked on this line:
https://github.com/apache/mesos/blob/7f04cf886fc2ed59414bf0056a2f351959a2d1f8/3rdparty/libprocess/src/process.cpp#L2800
while the other is stuck here:
https://github.com/apache/mesos/blob/7f04cf886fc2ed59414bf0056a2f351959a2d1f8/3rdparty/libprocess/src/process.cpp#L3231

It's not clear to me why the process references remain >0 for the `HttpProcess`.

- Greg Mann


On March 30, 2017, 1:20 a.m., Joseph Wu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58059/
> ---
> 
> (Updated March 30, 2017, 1:20 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Greg Mann.
> 
> 
> Bugs: MESOS-6919
> https://issues.apache.org/jira/browse/MESOS-6919
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> HttpProxy actors are spawned to manage incoming HTTP connections.
> These actors are themselves garbage collected, meaning it is unsafe
> to refer to an HttpProxy by pointer (which is what is currently done).
> 
> During libprocess finalization, it is possible for an incoming
> connection to spawn an HttpProxy, whose pointer is then deleted by
> finalization.  This leads to a potential segfault when cleaning up
> the incoming connection, as the SocketManager will dereference
> any related HttpProxy actors by pointer.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/process.cpp 
> f6ee24e2db43d63d91222549efee85421bbf9bf3 
> 
> 
> Diff: https://reviews.apache.org/r/58059/diff/1/
> 
> 
> Testing
> ---
> 
> With the additional test here: https://reviews.apache.org/r/58056/
> 
> make check
> 
> 3rdparty/libprocess/src/tests/libprocess-tests 
> --gtest_filter="*RapidReconnect*" --gtest_repeat=1000
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>



Re: Review Request 58059: Changed libprocess SocketManager to refer to HttpProxy by PID.

2017-03-29 Thread Mesos Reviewbot

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



Patch looks great!

Reviews applied: [58056, 58057, 58058, 58059]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; 
./support/docker-build.sh

- Mesos Reviewbot


On March 29, 2017, 6:20 p.m., Joseph Wu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58059/
> ---
> 
> (Updated March 29, 2017, 6:20 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Greg Mann.
> 
> 
> Bugs: MESOS-6919
> https://issues.apache.org/jira/browse/MESOS-6919
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> HttpProxy actors are spawned to manage incoming HTTP connections.
> These actors are themselves garbage collected, meaning it is unsafe
> to refer to an HttpProxy by pointer (which is what is currently done).
> 
> During libprocess finalization, it is possible for an incoming
> connection to spawn an HttpProxy, whose pointer is then deleted by
> finalization.  This leads to a potential segfault when cleaning up
> the incoming connection, as the SocketManager will dereference
> any related HttpProxy actors by pointer.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/process.cpp 
> f6ee24e2db43d63d91222549efee85421bbf9bf3 
> 
> 
> Diff: https://reviews.apache.org/r/58059/diff/1/
> 
> 
> Testing
> ---
> 
> With the additional test here: https://reviews.apache.org/r/58056/
> 
> make check
> 
> 3rdparty/libprocess/src/tests/libprocess-tests 
> --gtest_filter="*RapidReconnect*" --gtest_repeat=1000
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>



Review Request 58059: Changed libprocess SocketManager to refer to HttpProxy by PID.

2017-03-29 Thread Joseph Wu

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

Review request for mesos, Benjamin Mahler and Greg Mann.


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


Repository: mesos


Description
---

HttpProxy actors are spawned to manage incoming HTTP connections.
These actors are themselves garbage collected, meaning it is unsafe
to refer to an HttpProxy by pointer (which is what is currently done).

During libprocess finalization, it is possible for an incoming
connection to spawn an HttpProxy, whose pointer is then deleted by
finalization.  This leads to a potential segfault when cleaning up
the incoming connection, as the SocketManager will dereference
any related HttpProxy actors by pointer.


Diffs
-

  3rdparty/libprocess/src/process.cpp f6ee24e2db43d63d91222549efee85421bbf9bf3 


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


Testing
---

With the additional test here: https://reviews.apache.org/r/58056/

make check

3rdparty/libprocess/src/tests/libprocess-tests 
--gtest_filter="*RapidReconnect*" --gtest_repeat=1000


Thanks,

Joseph Wu