Re: Review Request 55355: Fixed an FD leak in the IO switchboard.

2017-01-09 Thread Jie Yu

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


Ship it!




LGTM!

- Jie Yu


On Jan. 10, 2017, 12:02 a.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55355/
> ---
> 
> (Updated Jan. 10, 2017, 12:02 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Hindman, Benjamin 
> Mahler, Jie Yu, Joseph Wu, and Kevin Klues.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Previously, the IO switchboard could leak file descriptors
> because it held a reference to its server socket within the
> socket's accept loop. This patch explicitly discards the
> future containing this reference to eliminate the leak.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/io/switchboard.cpp 
> 67c51678e87389ab08a81fe4832cffd3d83bdae9 
> 
> Diff: https://reviews.apache.org/r/55355/diff/
> 
> 
> Testing
> ---
> 
> Run:
> `bin/mesos-tests.sh --gtest_repeat=-1 
> --gtest_filter="IOSwitchboardServerTest.AttachInput"`
> 
> and then simultaneously execute `sudo lsof -p PID_of_test_process | wc -l` 
> repeatedly to ensure that the number of open FDs is not increasing.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 55355: Fixed an FD leak in the IO switchboard.

2017-01-09 Thread Greg Mann

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

(Updated Jan. 10, 2017, 12:02 a.m.)


Review request for mesos, Benjamin Bannier, Benjamin Hindman, Benjamin Mahler, 
Jie Yu, Joseph Wu, and Kevin Klues.


Repository: mesos


Description
---

Previously, the IO switchboard could leak file descriptors
because it held a reference to its server socket within the
socket's accept loop. This patch explicitly discards the
future containing this reference to eliminate the leak.


Diffs (updated)
-

  src/slave/containerizer/mesos/io/switchboard.cpp 
67c51678e87389ab08a81fe4832cffd3d83bdae9 

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


Testing
---

Run:
`bin/mesos-tests.sh --gtest_repeat=-1 
--gtest_filter="IOSwitchboardServerTest.AttachInput"`

and then simultaneously execute `sudo lsof -p PID_of_test_process | wc -l` 
repeatedly to ensure that the number of open FDs is not increasing.


Thanks,

Greg Mann



Re: Review Request 55355: Fixed an FD leak in the IO switchboard.

2017-01-09 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [55355]

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 Jan. 9, 2017, 10:55 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55355/
> ---
> 
> (Updated Jan. 9, 2017, 10:55 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Hindman, Benjamin 
> Mahler, Jie Yu, Joseph Wu, and Kevin Klues.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Previously, the IO switchboard could leak file descriptors
> because it held a reference to its server socket within the
> socket's accept loop. This patch explicitly discards the
> future containing this reference to eliminate the leak.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/io/switchboard.cpp 
> 67c51678e87389ab08a81fe4832cffd3d83bdae9 
> 
> Diff: https://reviews.apache.org/r/55355/diff/
> 
> 
> Testing
> ---
> 
> Run:
> `bin/mesos-tests.sh --gtest_repeat=-1 
> --gtest_filter="IOSwitchboardServerTest.AttachInput"`
> 
> and then simultaneously execute `sudo lsof -p PID_of_test_process | wc -l` 
> repeatedly to ensure that the number of open FDs is not increasing.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 55355: Fixed an FD leak in the IO switchboard.

2017-01-09 Thread Kevin Klues

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



I'd run this change my @jie.


src/slave/containerizer/mesos/io/switchboard.cpp (line 993)


Can you move this declaration just below the `inputConnected` declaration?

It seems to group better there for me.



src/slave/containerizer/mesos/io/switchboard.cpp (line 1265)


It's probably worth mentioning here why we grab a reference to the accept 
(i.e. so that we can discard it in `finalize()` so that they FD associated with 
the socket doesn't get leaked).


- Kevin Klues


On Jan. 9, 2017, 8:35 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55355/
> ---
> 
> (Updated Jan. 9, 2017, 8:35 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Hindman, Benjamin 
> Mahler, Joseph Wu, and Kevin Klues.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Previously, the IO switchboard could leak file descriptors
> because it held a reference to its server socket within the
> socket's accept loop. This patch explicitly discards the
> future containing this reference to eliminate the leak.
> 
> 
> Diffs
> -
> 
>   src/slave/containerizer/mesos/io/switchboard.cpp 
> 67c51678e87389ab08a81fe4832cffd3d83bdae9 
> 
> Diff: https://reviews.apache.org/r/55355/diff/
> 
> 
> Testing
> ---
> 
> Run:
> `bin/mesos-tests.sh --gtest_repeat=-1 
> --gtest_filter="IOSwitchboardServerTest.AttachInput"`
> 
> and then simultaneously execute `sudo lsof -p PID_of_test_process | wc -l` 
> repeatedly to ensure that the number of open FDs is not increasing.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Review Request 55355: Fixed an FD leak in the IO switchboard.

2017-01-09 Thread Greg Mann

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

Review request for mesos, Benjamin Bannier, Benjamin Hindman, Benjamin Mahler, 
Joseph Wu, and Kevin Klues.


Repository: mesos


Description
---

Previously, the IO switchboard could leak file descriptors
because it held a reference to its server socket within the
socket's accept loop. This patch explicitly discards the
future containing this reference to eliminate the leak.


Diffs
-

  src/slave/containerizer/mesos/io/switchboard.cpp 
67c51678e87389ab08a81fe4832cffd3d83bdae9 

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


Testing
---

Run:
`bin/mesos-tests.sh --gtest_repeat=-1 
--gtest_filter="IOSwitchboardServerTest.AttachInput"`

and then simultaneously execute `sudo lsof -p PID_of_test_process | wc -l` 
repeatedly to ensure that the number of open FDs is not increasing.


Thanks,

Greg Mann



Re: Review Request 55355: Fixed an FD leak in the IO switchboard.

2017-01-09 Thread Greg Mann

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

(Updated Jan. 9, 2017, 8:35 p.m.)


Review request for mesos, Benjamin Bannier, Benjamin Hindman, Benjamin Mahler, 
Joseph Wu, and Kevin Klues.


Repository: mesos


Description
---

Previously, the IO switchboard could leak file descriptors
because it held a reference to its server socket within the
socket's accept loop. This patch explicitly discards the
future containing this reference to eliminate the leak.


Diffs
-

  src/slave/containerizer/mesos/io/switchboard.cpp 
67c51678e87389ab08a81fe4832cffd3d83bdae9 

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


Testing
---

Run:
`bin/mesos-tests.sh --gtest_repeat=-1 
--gtest_filter="IOSwitchboardServerTest.AttachInput"`

and then simultaneously execute `sudo lsof -p PID_of_test_process | wc -l` 
repeatedly to ensure that the number of open FDs is not increasing.


Thanks,

Greg Mann