-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49127/
-----------------------------------------------------------
Review request for mesos, Anand Mazumdar, Benjamin Mahler, Artem Harutyunyan,
and Joris Van Remoortere.
Bugs: MESOS-5691
https://issues.apache.org/jira/browse/MESOS-5691
Repository: mesos
Description
-------
When an SSL-enabled Mesos actor attempts to link, it will open an SSL
socket first. If this fails, and downgrading to non-SSL is enabled,
the Mesos actor will create a "Poll" socket instead.
In this code path, we explicitly avoid calling `SocketManager::close`
as "closing" a link will also trigger `ExitedEvents`. Instead, the
downgrade codepath tries to "swap" the `SocketManager`s state from the
old SSL socket, to the new Poll socket via `swap_implementing_socket`.
`swap_implementing_socket` leaks a `Socket` object, which is a
reference-counted wrapper for an FD. Besides the memory leak, leaking
the `Socket` means that the reference count for the old SSL socket
will always be above zero. And we only `close` the socket when the
reference count reaches zero.
Diffs
-----
3rdparty/libprocess/src/process.cpp 4a9b1ff51da5de000d4d788372bb0344907cb8d5
Diff: https://reviews.apache.org/r/49127/diff/
Testing
-------
Performed repro steps in MESOS-5691. Confirmed the absense of sockets in
`CLOSE_WAIT`.
Thanks,
Joseph Wu