Looks like this was a file descriptor leak? Seems like we should have a bug to track this.
AFAICT it's not a bad leak since it only affects the fetcher, and the fetcher is short-lived? $ grep -R net::download 3rdparty src 3rdparty/libprocess/3rdparty/stout/README.md:A collection of utilities for working with the networking subsystem. Currently we provide `net::download` and `net::getHostname`. src/launcher/fetcher.cpp: // The net::download function only supports these protocols. src/launcher/fetcher.cpp: Try<int> code = net::download(sourceUri, destinationPath); On Fri, Apr 8, 2016 at 12:18 PM, <[email protected]> wrote: > Repository: mesos > Updated Branches: > refs/heads/master 5cfb1c6c0 -> 48292302a > > > Add curl_easy_cleanup when fopen is failed. > > When fopen is failed we should curl_easy_cleanup curl_handle and close > the fd. > > Review: https://reviews.apache.org/r/44254/ > > > Project: http://git-wip-us.apache.org/repos/asf/mesos/repo > Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/48292302 > Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/48292302 > Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/48292302 > > Branch: refs/heads/master > Commit: 48292302a29f17f38939727294b1e18e3ec51d99 > Parents: 5cfb1c6 > Author: Andy Pang <[email protected]> > Authored: Fri Apr 8 12:17:26 2016 -0700 > Committer: Vinod Kone <[email protected]> > Committed: Fri Apr 8 12:17:26 2016 -0700 > > ---------------------------------------------------------------------- > 3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp | 2 ++ > 1 file changed, 2 insertions(+) > ---------------------------------------------------------------------- > > > > http://git-wip-us.apache.org/repos/asf/mesos/blob/48292302/3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp > ---------------------------------------------------------------------- > diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp > b/3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp > index 3c80910..c3812c9 100644 > --- a/3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp > +++ b/3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp > @@ -156,6 +156,8 @@ inline Try<int> download(const std::string& url, const > std::string& path) > > FILE* file = fdopen(fd.get(), "w"); > if (file == NULL) { > + curl_easy_cleanup(curl); > + os::close(fd.get()); > return ErrnoError("Failed to open file handle of '" + path + "'"); > } > curl_easy_setopt(curl, CURLOPT_WRITEDATA, file); > >
