Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-27 Thread Joris Van Remoortere

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

Ship it!


fixed inline.


3rdparty/libprocess/src/process.cpp (line 2166)


We can make the schedule function a lambda.



3rdparty/libprocess/src/process.cpp (line 2798)


new line


- Joris Van Remoortere


On Sept. 21, 2015, 3:53 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> ---
> 
> (Updated Sept. 21, 2015, 3:53 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3158
> https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/event_loop.hpp 
> 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp 
> ee7906470069b0391dde7cd685b1d4eb3a158c03 
>   3rdparty/libprocess/src/process.cpp 
> 4afa30569b4d235637b49a624602e6b199c32e0e 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> ---
> 
> After configuring with both "../configure" and "../configure 
> --enable-libevent --enable-ssl":
> 
> make check
> 
> 
> Also, to check for race conditions related to the initialization/shutdown of 
> libprocess, try something like:
> 
> for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
> --gtest_filter=ProcessTest.Spawn; done
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-21 Thread Greg Mann

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

(Updated Sept. 21, 2015, 3:53 p.m.)


Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
Remoortere, Joseph Wu, and Michael Park.


Changes
---

Rebase.


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


Repository: mesos


Description
---

Join threads in libprocess when shutting down.


Diffs (updated)
-

  3rdparty/libprocess/src/event_loop.hpp 
36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
  3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
  3rdparty/libprocess/src/libevent.cpp ee7906470069b0391dde7cd685b1d4eb3a158c03 
  3rdparty/libprocess/src/process.cpp 4afa30569b4d235637b49a624602e6b199c32e0e 

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


Testing
---

After configuring with both "../configure" and "../configure --enable-libevent 
--enable-ssl":

make check


Also, to check for race conditions related to the initialization/shutdown of 
libprocess, try something like:

for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
--gtest_filter=ProcessTest.Spawn; done


Thanks,

Greg Mann



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-21 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [37821]

All tests passed.

- Mesos ReviewBot


On Sept. 21, 2015, 3:53 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> ---
> 
> (Updated Sept. 21, 2015, 3:53 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3158
> https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/event_loop.hpp 
> 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp 
> ee7906470069b0391dde7cd685b1d4eb3a158c03 
>   3rdparty/libprocess/src/process.cpp 
> 4afa30569b4d235637b49a624602e6b199c32e0e 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> ---
> 
> After configuring with both "../configure" and "../configure 
> --enable-libevent --enable-ssl":
> 
> make check
> 
> 
> Also, to check for race conditions related to the initialization/shutdown of 
> libprocess, try something like:
> 
> for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
> --gtest_filter=ProcessTest.Spawn; done
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-13 Thread Greg Mann


> On Sept. 10, 2015, 8:20 a.m., Michael Park wrote:
> > I've made a few nit comments below but I have some higher-level questions.
> > 
> >   (1) In this patch, when the destructor of `ProcessManager` is invoked we 
> > immediately start to ignore messages. It's not obvious to me that this is 
> > necessary or desired. Could we just enqueue the `TerminateEvent` by calling 
> > `process::terminate(process, false)`, let it race against other messages 
> > that may be coming in, and ignore anything that arrives after 
> > `TerminateEvent`?
> >   (2) What are the implications of shutting down the event loop via 
> > `EventLoop::stop()`? This would be useful to know to learn about the 
> > required order between process termination, event loop shutdown, and thread 
> > pool joins.
> 
> Greg Mann wrote:
> Thanks for the review mpark!!
> 
> Regarding (2), `EventLoop::stop()` calls methods from libevent/libev that 
> terminate the event loop after all active callbacks have completed. This 
> means that we can have messages coming in from a socket after this call is 
> made.
> 
> Regarding (1), I was worried about messages coming in on sockets 
> preventing the queues from draining, but as I think Joris mentioned in our 
> previous discussion, if messages are coming in fast enough to prevent 
> draining, then they're coming in too fast for just about anything to happen, 
> so it's not worth worrying about. Further, it's possible that an existing 
> process needs to receive a socket message in order to terminate, so they 
> should be allowed. I think that we can do away with `draining_queue`.
> 
> Once the event loop is stopped, we won't have any new socket messages 
> coming in, but the question is if we still need a boolean check in 
> `ProcessManager::handle()` to make sure that any final callbacks on the event 
> loop don't attempt to queue up events. I think this would only be necessary 
> if it's possible for a socket message to spawn a new process directly, and 
> I'm not yet sure if that is the case? If the socket message attempts to queue 
> up an event on an existing process, the run queue will be empty, so it won't 
> be possible, but if it adds a process to the run queue, we have a problem. 
> I've removed the boolean check from `ProcessManager::handle()` for now.

So I see that new processes can be spawned and enqueued by socket messages, 
which means that at shutdown, new processes could get enqueued after the queue 
has been drained but before the process threads have exited. To avoid this, I 
added a check on `joining_threads` into `ProcessManager::enqueue()` and moved 
the `joining_threads.store(true)` to occur immediately following the queue 
draining.


- Greg


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


On Sept. 13, 2015, 11:01 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> ---
> 
> (Updated Sept. 13, 2015, 11:01 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3158
> https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/event_loop.hpp 
> 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp 
> ee7906470069b0391dde7cd685b1d4eb3a158c03 
>   3rdparty/libprocess/src/process.cpp 
> 4afa30569b4d235637b49a624602e6b199c32e0e 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> ---
> 
> After configuring with both "../configure" and "../configure 
> --enable-libevent --enable-ssl":
> 
> make check
> 
> 
> Also, to check for race conditions related to the initialization/shutdown of 
> libprocess, try something like:
> 
> for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
> --gtest_filter=ProcessTest.Spawn; done
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-13 Thread Greg Mann

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

(Updated Sept. 13, 2015, 11:01 p.m.)


Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
Remoortere, Joseph Wu, and Michael Park.


Changes
---

Added shutdown check in ProcessManager::enqueue().


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


Repository: mesos


Description
---

Join threads in libprocess when shutting down.


Diffs (updated)
-

  3rdparty/libprocess/src/event_loop.hpp 
36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
  3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
  3rdparty/libprocess/src/libevent.cpp ee7906470069b0391dde7cd685b1d4eb3a158c03 
  3rdparty/libprocess/src/process.cpp 4afa30569b4d235637b49a624602e6b199c32e0e 

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


Testing
---

After configuring with both "../configure" and "../configure --enable-libevent 
--enable-ssl":

make check


Also, to check for race conditions related to the initialization/shutdown of 
libprocess, try something like:

for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
--gtest_filter=ProcessTest.Spawn; done


Thanks,

Greg Mann



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-13 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [37821]

All tests passed.

- Mesos ReviewBot


On Sept. 13, 2015, 11:01 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> ---
> 
> (Updated Sept. 13, 2015, 11:01 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3158
> https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/event_loop.hpp 
> 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp 
> ee7906470069b0391dde7cd685b1d4eb3a158c03 
>   3rdparty/libprocess/src/process.cpp 
> 4afa30569b4d235637b49a624602e6b199c32e0e 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> ---
> 
> After configuring with both "../configure" and "../configure 
> --enable-libevent --enable-ssl":
> 
> make check
> 
> 
> Also, to check for race conditions related to the initialization/shutdown of 
> libprocess, try something like:
> 
> for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
> --gtest_filter=ProcessTest.Spawn; done
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-11 Thread Mesos ReviewBot

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


Bad patch!

Reviews applied: [37821]

Failed command: ./support/apply-review.sh -n -r 37821

Error:
 2015-09-11 06:58:24 URL:https://reviews.apache.org/r/37821/diff/raw/ 
[7915/7915] -> "37821.patch" [1]
error: patch failed: 3rdparty/libprocess/src/process.cpp:429
error: 3rdparty/libprocess/src/process.cpp: patch does not apply
Failed to apply patch

- Mesos ReviewBot


On Sept. 10, 2015, 9:25 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> ---
> 
> (Updated Sept. 10, 2015, 9:25 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3158
> https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/event_loop.hpp 
> 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp 
> ee7906470069b0391dde7cd685b1d4eb3a158c03 
>   3rdparty/libprocess/src/process.cpp 
> 0e5394acff16376809918d583d7aee582cc6da54 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> ---
> 
> After configuring with both "../configure" and "../configure 
> --enable-libevent --enable-ssl":
> 
> make check
> 
> 
> Also, to check for race conditions related to the initialization/shutdown of 
> libprocess, try something like:
> 
> for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
> --gtest_filter=ProcessTest.Spawn; done
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-11 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [37821]

All tests passed.

- Mesos ReviewBot


On Sept. 11, 2015, 2:26 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> ---
> 
> (Updated Sept. 11, 2015, 2:26 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3158
> https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/event_loop.hpp 
> 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp 
> ee7906470069b0391dde7cd685b1d4eb3a158c03 
>   3rdparty/libprocess/src/process.cpp 
> 4afa30569b4d235637b49a624602e6b199c32e0e 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> ---
> 
> After configuring with both "../configure" and "../configure 
> --enable-libevent --enable-ssl":
> 
> make check
> 
> 
> Also, to check for race conditions related to the initialization/shutdown of 
> libprocess, try something like:
> 
> for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
> --gtest_filter=ProcessTest.Spawn; done
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-11 Thread Greg Mann

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

(Updated Sept. 11, 2015, 2:26 p.m.)


Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
Remoortere, Joseph Wu, and Michael Park.


Changes
---

Rebase.


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


Repository: mesos


Description
---

Join threads in libprocess when shutting down.


Diffs (updated)
-

  3rdparty/libprocess/src/event_loop.hpp 
36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
  3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
  3rdparty/libprocess/src/libevent.cpp ee7906470069b0391dde7cd685b1d4eb3a158c03 
  3rdparty/libprocess/src/process.cpp 4afa30569b4d235637b49a624602e6b199c32e0e 

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


Testing
---

After configuring with both "../configure" and "../configure --enable-libevent 
--enable-ssl":

make check


Also, to check for race conditions related to the initialization/shutdown of 
libprocess, try something like:

for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
--gtest_filter=ProcessTest.Spawn; done


Thanks,

Greg Mann



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-10 Thread Michael Park

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


I've made a few nit comments below but I have some higher-level questions.

  (1) In this patch, when the destructor of `ProcessManager` is invoked we 
immediately start to ignore messages. It's not obvious to me that this is 
necessary or desired. Could we just enqueue the `TerminateEvent` by calling 
`process::terminate(process, false)`, let it race against other messages that 
may be coming in, and ignore anything that arrives after `TerminateEvent`?
  (2) What are the implications of shutting down the event loop via 
`EventLoop::stop()`? This would be useful to know to learn about the required 
order between process termination, event loop shutdown, and thread pool joins.


3rdparty/libprocess/src/libev.cpp (line 30)


Is there a reason why this was moved up? Seems like `async_shutdown` 
could've been added below this, at its original location?



3rdparty/libprocess/src/process.cpp (line 382)


The `const` here has no effect.



3rdparty/libprocess/src/process.cpp (lines 442 - 443)


This fits in 1 line.



3rdparty/libprocess/src/process.cpp (lines 2119 - 2121)


Could you explain why we want to start ignoring messages here?

Below, we do `process::terminate(process, false);` which purposely does not 
inject the `TerminateEvent` in order to allow the actor to process its queue.

This is great, but wouldn't we be dropping messages that were sent between  
`draining_queue.store(true);` and when the `TerminateEvent` actually gets 
enqueued at the back? Is the decision that this doesn't matter?



3rdparty/libprocess/src/process.cpp (line 2171)


`s/int/long/`?


- Michael Park


On Sept. 8, 2015, 5:54 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> ---
> 
> (Updated Sept. 8, 2015, 5:54 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3158
> https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/event_loop.hpp 
> 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp 
> ee7906470069b0391dde7cd685b1d4eb3a158c03 
>   3rdparty/libprocess/src/process.cpp 
> 0e5394acff16376809918d583d7aee582cc6da54 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> ---
> 
> After configuring with both "../configure" and "../configure 
> --enable-libevent --enable-ssl":
> 
> make check
> 
> 
> Also, to check for race conditions related to the initialization/shutdown of 
> libprocess, try something like:
> 
> for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
> --gtest_filter=ProcessTest.Spawn; done
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-10 Thread Greg Mann


> On Sept. 10, 2015, 8:20 a.m., Michael Park wrote:
> > I've made a few nit comments below but I have some higher-level questions.
> > 
> >   (1) In this patch, when the destructor of `ProcessManager` is invoked we 
> > immediately start to ignore messages. It's not obvious to me that this is 
> > necessary or desired. Could we just enqueue the `TerminateEvent` by calling 
> > `process::terminate(process, false)`, let it race against other messages 
> > that may be coming in, and ignore anything that arrives after 
> > `TerminateEvent`?
> >   (2) What are the implications of shutting down the event loop via 
> > `EventLoop::stop()`? This would be useful to know to learn about the 
> > required order between process termination, event loop shutdown, and thread 
> > pool joins.

Thanks for the review mpark!!

Regarding (2), `EventLoop::stop()` calls methods from libevent/libev that 
terminate the event loop after all active callbacks have completed. This means 
that we can have messages coming in from a socket after this call is made.

Regarding (1), I was worried about messages coming in on sockets preventing the 
queues from draining, but as I think Joris mentioned in our previous 
discussion, if messages are coming in fast enough to prevent draining, then 
they're coming in too fast for just about anything to happen, so it's not worth 
worrying about. Further, it's possible that an existing process needs to 
receive a socket message in order to terminate, so they should be allowed. I 
think that we can do away with `draining_queue`.

Once the event loop is stopped, we won't have any new socket messages coming 
in, but the question is if we still need a boolean check in 
`ProcessManager::handle()` to make sure that any final callbacks on the event 
loop don't attempt to queue up events. I think this would only be necessary if 
it's possible for a socket message to spawn a new process directly, and I'm not 
yet sure if that is the case? If the socket message attempts to queue up an 
event on an existing process, the run queue will be empty, so it won't be 
possible, but if it adds a process to the run queue, we have a problem. I've 
removed the boolean check from `ProcessManager::handle()` for now.


> On Sept. 10, 2015, 8:20 a.m., Michael Park wrote:
> > 3rdparty/libprocess/src/libev.cpp, line 30
> > 
> >
> > Is there a reason why this was moved up? Seems like `async_shutdown` 
> > could've been added below this, at its original location?

This was moved up because, strictly speaking, the `async_watcher` declaration 
doesn't match the comment below, which states that we will "Define the initial 
values for all of the declarations made in libev.hpp", so it seemed more 
appropriate to place before the comment. If this order is awkward the watcher 
declarations could be moved.


> On Sept. 10, 2015, 8:20 a.m., Michael Park wrote:
> > 3rdparty/libprocess/src/process.cpp, lines 2143-2145
> > 
> >
> > Could you explain why we want to start ignoring messages here?
> > 
> > Below, we do `process::terminate(process, false);` which purposely does 
> > not inject the `TerminateEvent` in order to allow the actor to process its 
> > queue.
> > 
> > This is great, but wouldn't we be dropping messages that were sent 
> > between  `draining_queue.store(true);` and when the `TerminateEvent` 
> > actually gets enqueued at the back? Is the decision that this doesn't 
> > matter?

See my first comment above.


- Greg


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


On Sept. 8, 2015, 5:54 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> ---
> 
> (Updated Sept. 8, 2015, 5:54 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-3158
> https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/event_loop.hpp 
> 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp 
> ee7906470069b0391dde7cd685b1d4eb3a158c03 
>   3rdparty/libprocess/src/process.cpp 
> 0e5394acff16376809918d583d7aee582cc6da54 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> ---
> 
> After configuring with both "../configure" and 

Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-10 Thread Greg Mann

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

(Updated Sept. 10, 2015, 9:25 p.m.)


Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
Remoortere, Joseph Wu, and Michael Park.


Changes
---

Addressed comments.


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


Repository: mesos


Description
---

Join threads in libprocess when shutting down.


Diffs (updated)
-

  3rdparty/libprocess/src/event_loop.hpp 
36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
  3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
  3rdparty/libprocess/src/libevent.cpp ee7906470069b0391dde7cd685b1d4eb3a158c03 
  3rdparty/libprocess/src/process.cpp 0e5394acff16376809918d583d7aee582cc6da54 

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


Testing
---

After configuring with both "../configure" and "../configure --enable-libevent 
--enable-ssl":

make check


Also, to check for race conditions related to the initialization/shutdown of 
libprocess, try something like:

for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
--gtest_filter=ProcessTest.Spawn; done


Thanks,

Greg Mann



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-04 Thread Greg Mann

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

(Updated Sept. 4, 2015, 2:23 p.m.)


Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and switched 
to 'mcypark'.


Changes
---

Rebase.


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


Repository: mesos


Description
---

Join threads in libprocess when shutting down.


Diffs (updated)
-

  3rdparty/libprocess/src/event_loop.hpp 
36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
  3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
  3rdparty/libprocess/src/libevent.cpp ee7906470069b0391dde7cd685b1d4eb3a158c03 
  3rdparty/libprocess/src/process.cpp 755187c8761137cb2bf2f7295b29a63f63c68bc6 

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


Testing
---

After configuring with both "../configure" and "../configure --enable-libevent 
--enable-ssl":

make check


Also, to check for race conditions related to the initialization/shutdown of 
libprocess, try something like:

for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
--gtest_filter=ProcessTest.Spawn; done


Thanks,

Greg Mann



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-04 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [37821]

All tests passed.

- Mesos ReviewBot


On Sept. 4, 2015, 2:23 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> ---
> 
> (Updated Sept. 4, 2015, 2:23 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and 
> switched to 'mcypark'.
> 
> 
> Bugs: MESOS-3158
> https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/event_loop.hpp 
> 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp 
> ee7906470069b0391dde7cd685b1d4eb3a158c03 
>   3rdparty/libprocess/src/process.cpp 
> 755187c8761137cb2bf2f7295b29a63f63c68bc6 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> ---
> 
> After configuring with both "../configure" and "../configure 
> --enable-libevent --enable-ssl":
> 
> make check
> 
> 
> Also, to check for race conditions related to the initialization/shutdown of 
> libprocess, try something like:
> 
> for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
> --gtest_filter=ProcessTest.Spawn; done
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-04 Thread Joseph Wu

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

Ship it!


Looks good.  Just a few little nits.


3rdparty/libprocess/src/event_loop.hpp (lines 45 - 46)


This fits in one line.



3rdparty/libprocess/src/process.cpp (line 436)


Missing period at the end.



3rdparty/libprocess/src/process.cpp (lines 442 - 443)


Fits on one line, but I think this should be fine (77 characters).



3rdparty/libprocess/src/process.cpp (lines 2144 - 2146)


Can you update this comment to note that the actual "popping" of the 
process is done in `ProcessManager::cleanup`, which can happen as a result of 
`Process::terminate`?



3rdparty/libprocess/src/process.cpp (line 2178)


I think you should tweak this to use backticks instead of single quotes, 
even if it's a copy-pasted comment.



3rdparty/libprocess/src/process.cpp (lines 2191 - 2192)


Also fits on one line (73 characters).



3rdparty/libprocess/src/process.cpp (lines 2193 - 2194)


Could you change the spacing to:
```
threads.emplace_back(
new std::thread(::schedule, std::cref(joining_threads)));
```

(I vaguely remember that this was the preference over vertically aligning 
arguments.)


- Joseph Wu


On Sept. 4, 2015, 11:13 a.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> ---
> 
> (Updated Sept. 4, 2015, 11:13 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and switched to 'mcypark'.
> 
> 
> Bugs: MESOS-3158
> https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/event_loop.hpp 
> 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp 
> ee7906470069b0391dde7cd685b1d4eb3a158c03 
>   3rdparty/libprocess/src/process.cpp 
> 755187c8761137cb2bf2f7295b29a63f63c68bc6 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> ---
> 
> After configuring with both "../configure" and "../configure 
> --enable-libevent --enable-ssl":
> 
> make check
> 
> 
> Also, to check for race conditions related to the initialization/shutdown of 
> libprocess, try something like:
> 
> for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
> --gtest_filter=ProcessTest.Spawn; done
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-04 Thread Greg Mann

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

(Updated Sept. 4, 2015, 9 p.m.)


Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
Remoortere, Joseph Wu, and switched to 'mcypark'.


Changes
---

Addressed comments.


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


Repository: mesos


Description
---

Join threads in libprocess when shutting down.


Diffs (updated)
-

  3rdparty/libprocess/src/event_loop.hpp 
36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
  3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
  3rdparty/libprocess/src/libevent.cpp ee7906470069b0391dde7cd685b1d4eb3a158c03 
  3rdparty/libprocess/src/process.cpp 0e5394acff16376809918d583d7aee582cc6da54 

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


Testing
---

After configuring with both "../configure" and "../configure --enable-libevent 
--enable-ssl":

make check


Also, to check for race conditions related to the initialization/shutdown of 
libprocess, try something like:

for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
--gtest_filter=ProcessTest.Spawn; done


Thanks,

Greg Mann



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-09-04 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [37821]

All tests passed.

- Mesos ReviewBot


On Sept. 4, 2015, 9 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37821/
> ---
> 
> (Updated Sept. 4, 2015, 9 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and switched to 'mcypark'.
> 
> 
> Bugs: MESOS-3158
> https://issues.apache.org/jira/browse/MESOS-3158
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Join threads in libprocess when shutting down.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/event_loop.hpp 
> 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
>   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
>   3rdparty/libprocess/src/libevent.cpp 
> ee7906470069b0391dde7cd685b1d4eb3a158c03 
>   3rdparty/libprocess/src/process.cpp 
> 0e5394acff16376809918d583d7aee582cc6da54 
> 
> Diff: https://reviews.apache.org/r/37821/diff/
> 
> 
> Testing
> ---
> 
> After configuring with both "../configure" and "../configure 
> --enable-libevent --enable-ssl":
> 
> make check
> 
> 
> Also, to check for race conditions related to the initialization/shutdown of 
> libprocess, try something like:
> 
> for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
> --gtest_filter=ProcessTest.Spawn; done
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-08-27 Thread Greg Mann

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

(Updated Aug. 27, 2015, 10:59 p.m.)


Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and switched 
to 'mcypark'.


Changes
---

Fixed race condition and moved thread initialization into ProcessManager.


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


Repository: mesos


Description
---

Join threads in libprocess when shutting down.


Diffs (updated)
-

  3rdparty/libprocess/src/event_loop.hpp 
36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
  3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
  3rdparty/libprocess/src/libevent.cpp d7c47fbd1dbdec1fc974840e6f3a1428a8f189d5 
  3rdparty/libprocess/src/process.cpp 755187c8761137cb2bf2f7295b29a63f63c68bc6 

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


Testing (updated)
---

After configuring with both ../configure and ../configure --enable-libevent 
--enable-ssl:

make check


Also, to check for race conditions related to the initialization/shutdown of 
libprocess, try something like:

for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
--gtest_filter=ProcessTest.Spawn; done


Thanks,

Greg Mann



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-08-27 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [37821]

All tests passed.

- Mesos ReviewBot


On Aug. 28, 2015, 1:34 a.m., Greg Mann wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/37821/
 ---
 
 (Updated Aug. 28, 2015, 1:34 a.m.)
 
 
 Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and 
 switched to 'mcypark'.
 
 
 Bugs: MESOS-3158
 https://issues.apache.org/jira/browse/MESOS-3158
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Join threads in libprocess when shutting down.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/event_loop.hpp 
 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
   3rdparty/libprocess/src/libevent.cpp 
 d7c47fbd1dbdec1fc974840e6f3a1428a8f189d5 
   3rdparty/libprocess/src/process.cpp 
 755187c8761137cb2bf2f7295b29a63f63c68bc6 
 
 Diff: https://reviews.apache.org/r/37821/diff/
 
 
 Testing
 ---
 
 After configuring with both ../configure and ../configure 
 --enable-libevent --enable-ssl:
 
 make check
 
 
 Also, to check for race conditions related to the initialization/shutdown of 
 libprocess, try something like:
 
 for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
 --gtest_filter=ProcessTest.Spawn; done
 
 
 Thanks,
 
 Greg Mann
 




Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-08-27 Thread Neil Conway

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



3rdparty/libprocess/src/process.cpp (line 2210)
https://reviews.apache.org/r/37821/#comment152273

Somewhat race-prone: we might see shutting_down.load() == false, proceed 
to deliver the inbound message, and yet the shutdown code can proceed 
concurrently. After a bit of poking I couldn't find a situation in which that 
would be problematic, but maybe worth exploring if there's a known data 
race/hang...


- Neil Conway


On Aug. 27, 2015, 4:28 a.m., Greg Mann wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/37821/
 ---
 
 (Updated Aug. 27, 2015, 4:28 a.m.)
 
 
 Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and 
 switched to 'mcypark'.
 
 
 Bugs: MESOS-3158
 https://issues.apache.org/jira/browse/MESOS-3158
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Join threads in libprocess when shutting down.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/event_loop.hpp 
 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
   3rdparty/libprocess/src/libevent.cpp 
 d7c47fbd1dbdec1fc974840e6f3a1428a8f189d5 
   3rdparty/libprocess/src/process.cpp 
 755187c8761137cb2bf2f7295b29a63f63c68bc6 
 
 Diff: https://reviews.apache.org/r/37821/diff/
 
 
 Testing
 ---
 
 After configuring with both ../configure and ../configure 
 --enable-libevent --enable-ssl:
 
 make check
 
 
 Thanks,
 
 Greg Mann
 




Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-08-27 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [37821]

All tests passed.

- Mesos ReviewBot


On Aug. 27, 2015, 4:28 a.m., Greg Mann wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/37821/
 ---
 
 (Updated Aug. 27, 2015, 4:28 a.m.)
 
 
 Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and 
 switched to 'mcypark'.
 
 
 Bugs: MESOS-3158
 https://issues.apache.org/jira/browse/MESOS-3158
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Join threads in libprocess when shutting down.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/event_loop.hpp 
 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
   3rdparty/libprocess/src/libevent.cpp 
 d7c47fbd1dbdec1fc974840e6f3a1428a8f189d5 
   3rdparty/libprocess/src/process.cpp 
 755187c8761137cb2bf2f7295b29a63f63c68bc6 
 
 Diff: https://reviews.apache.org/r/37821/diff/
 
 
 Testing
 ---
 
 After configuring with both ../configure and ../configure 
 --enable-libevent --enable-ssl:
 
 make check
 
 
 Thanks,
 
 Greg Mann
 




Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-08-27 Thread Greg Mann

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


Sorry folks, there seems to be some kind of data race here... after running:

make check

if I then run:

for n in {1..300}; do echo $n; 3rdparty/libprocess/tests; done

it will hang eventually, always right when the tests are exiting. I missed this 
previously because I was unaware that using the --gtest_repeat flag doesn't 
seem to trigger libprocess's process initialization/shutdown with each 
iteration. I'll have a look and try to figure out what's causing this.

- Greg Mann


On Aug. 27, 2015, 4:28 a.m., Greg Mann wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/37821/
 ---
 
 (Updated Aug. 27, 2015, 4:28 a.m.)
 
 
 Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and 
 switched to 'mcypark'.
 
 
 Bugs: MESOS-3158
 https://issues.apache.org/jira/browse/MESOS-3158
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Join threads in libprocess when shutting down.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/event_loop.hpp 
 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
   3rdparty/libprocess/src/libevent.cpp 
 d7c47fbd1dbdec1fc974840e6f3a1428a8f189d5 
   3rdparty/libprocess/src/process.cpp 
 755187c8761137cb2bf2f7295b29a63f63c68bc6 
 
 Diff: https://reviews.apache.org/r/37821/diff/
 
 
 Testing
 ---
 
 After configuring with both ../configure and ../configure 
 --enable-libevent --enable-ssl:
 
 make check
 
 
 Thanks,
 
 Greg Mann
 




Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-08-27 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [37821]

All tests passed.

- Mesos ReviewBot


On Aug. 27, 2015, 10:59 p.m., Greg Mann wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/37821/
 ---
 
 (Updated Aug. 27, 2015, 10:59 p.m.)
 
 
 Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and 
 switched to 'mcypark'.
 
 
 Bugs: MESOS-3158
 https://issues.apache.org/jira/browse/MESOS-3158
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Join threads in libprocess when shutting down.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/event_loop.hpp 
 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
   3rdparty/libprocess/src/libevent.cpp 
 d7c47fbd1dbdec1fc974840e6f3a1428a8f189d5 
   3rdparty/libprocess/src/process.cpp 
 755187c8761137cb2bf2f7295b29a63f63c68bc6 
 
 Diff: https://reviews.apache.org/r/37821/diff/
 
 
 Testing
 ---
 
 After configuring with both ../configure and ../configure 
 --enable-libevent --enable-ssl:
 
 make check
 
 
 Also, to check for race conditions related to the initialization/shutdown of 
 libprocess, try something like:
 
 for n in {1..1000}; do echo $n; 3rdparty/libprocess/tests 
 --gtest_filter=ProcessTest.Spawn; done
 
 
 Thanks,
 
 Greg Mann
 




Review Request 37821: Join threads in libprocess when shutting down.

2015-08-26 Thread Greg Mann

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

Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and switched 
to 'mcypark'.


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


Repository: mesos


Description
---

Join threads in libprocess when shutting down.


Diffs
-

  3rdparty/libprocess/src/event_loop.hpp 
36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
  3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
  3rdparty/libprocess/src/libevent.cpp d7c47fbd1dbdec1fc974840e6f3a1428a8f189d5 
  3rdparty/libprocess/src/process.cpp 755187c8761137cb2bf2f7295b29a63f63c68bc6 

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


Testing
---

After configuring with both ../configure and ../configure --enable-libevent 
--enable-ssl:

make check


Thanks,

Greg Mann



Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-08-26 Thread Mesos ReviewBot

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


Patch looks great!

Reviews applied: [37821]

All tests passed.

- Mesos ReviewBot


On Aug. 27, 2015, 12:14 a.m., Greg Mann wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/37821/
 ---
 
 (Updated Aug. 27, 2015, 12:14 a.m.)
 
 
 Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and 
 switched to 'mcypark'.
 
 
 Bugs: MESOS-3158
 https://issues.apache.org/jira/browse/MESOS-3158
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Join threads in libprocess when shutting down.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/event_loop.hpp 
 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
   3rdparty/libprocess/src/libevent.cpp 
 d7c47fbd1dbdec1fc974840e6f3a1428a8f189d5 
   3rdparty/libprocess/src/process.cpp 
 755187c8761137cb2bf2f7295b29a63f63c68bc6 
 
 Diff: https://reviews.apache.org/r/37821/diff/
 
 
 Testing
 ---
 
 After configuring with both ../configure and ../configure 
 --enable-libevent --enable-ssl:
 
 make check
 
 
 Thanks,
 
 Greg Mann
 




Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-08-26 Thread Greg Mann


 On Aug. 27, 2015, 2:12 a.m., Neil Conway wrote:
  3rdparty/libprocess/src/process.cpp, line 2213
  https://reviews.apache.org/r/37821/diff/1/?file=1055467#file1055467line2213
 
  This leaks request.

Thanks Neil! Comments addressed.


- Greg


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


On Aug. 27, 2015, 4:28 a.m., Greg Mann wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/37821/
 ---
 
 (Updated Aug. 27, 2015, 4:28 a.m.)
 
 
 Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and 
 switched to 'mcypark'.
 
 
 Bugs: MESOS-3158
 https://issues.apache.org/jira/browse/MESOS-3158
 
 
 Repository: mesos
 
 
 Description
 ---
 
 Join threads in libprocess when shutting down.
 
 
 Diffs
 -
 
   3rdparty/libprocess/src/event_loop.hpp 
 36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
   3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
   3rdparty/libprocess/src/libevent.cpp 
 d7c47fbd1dbdec1fc974840e6f3a1428a8f189d5 
   3rdparty/libprocess/src/process.cpp 
 755187c8761137cb2bf2f7295b29a63f63c68bc6 
 
 Diff: https://reviews.apache.org/r/37821/diff/
 
 
 Testing
 ---
 
 After configuring with both ../configure and ../configure 
 --enable-libevent --enable-ssl:
 
 make check
 
 
 Thanks,
 
 Greg Mann
 




Re: Review Request 37821: Join threads in libprocess when shutting down.

2015-08-26 Thread Greg Mann

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

(Updated Aug. 27, 2015, 4:28 a.m.)


Review request for mesos, Benjamin Hindman, Joris Van Remoortere, and switched 
to 'mcypark'.


Changes
---

Addressed comments.


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


Repository: mesos


Description
---

Join threads in libprocess when shutting down.


Diffs (updated)
-

  3rdparty/libprocess/src/event_loop.hpp 
36a4cd2b1ff59f6922173ad17115bf80cc3c8f30 
  3rdparty/libprocess/src/libev.cpp 97a2694f9b10bc61841443b21f4f96055493e840 
  3rdparty/libprocess/src/libevent.cpp d7c47fbd1dbdec1fc974840e6f3a1428a8f189d5 
  3rdparty/libprocess/src/process.cpp 755187c8761137cb2bf2f7295b29a63f63c68bc6 

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


Testing
---

After configuring with both ../configure and ../configure --enable-libevent 
--enable-ssl:

make check


Thanks,

Greg Mann