Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.28.3, 1.0.0
-
Mesosphere Sprint 43
-
3
Description
There is a potential leak when using the version of link with RemoteConnection::RECONNECT. This was originally implemented to refresh links during master recovery.
The leak occurs here:
https://github.com/apache/mesos/blob/5e23edd513caec51ce3e94b3d785d714052525e8/3rdparty/libprocess/src/process.cpp#L1592-L1597
^ The comment here is not correct, as that is not the last reference to the existing socket.
At this point, the existing socket may be a perfectly valid link. Valid links will all have a reference inside a callback loop created here:
https://github.com/apache/mesos/blob/5e23edd513caec51ce3e94b3d785d714052525e8/3rdparty/libprocess/src/process.cpp#L1503-L1509
We need to stop the callback loop but prevent any resulting ExitedEvents from being sent due to stopping the callback loop. This means discarding the callback loop's future after we have called swap_implementing_socket.
Attachments
Issue Links
- is related to
-
MESOS-5740 Consider adding `relink` functionality to libprocess
- Resolved
- relates to
-
MESOS-6246 Libprocess links will not generate an ExitedEvent if the socket creation fails
- Resolved