mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <>
Subject Review Request 65183: Fixed a libprocess finalization deadlock due to Queue discard support.
Date Tue, 16 Jan 2018 21:41:57 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for mesos and Benjamin Hindman.

Repository: mesos


Once discard support for Queue::get was introduced, this makes it
possible for the finalization logic in libprocess to try to acquire
the `socket_mutex` recursively:

  (1) process::finalize acquires socket_mutex, and discards __s__.
  (2) The get from LibeventSSLSocket::accept_queue gets discarded.
  (3) This then executes the process.cpp logic in on_accept, which
      will always re-aquire the `socket_mutex`, even though the
      accepted socket came out as discarded.

The fix applied here is to also stop the accept loop when the socket
was discarded. This avoids acquiring the `socket_mutex` in the
discarded case.

Also, this avoids logging a failure message in the discarded case,
and instead consistently logs when the accept loop is stopped.

Also, wrote a comment within `LibeventSSLSocket::accept` that
explains a potential issue due to MESOS-8448.


  3rdparty/libprocess/src/libevent_ssl_socket.cpp 1c95ebabfefd07aaeb053b965ab8e4550dfccaef

  3rdparty/libprocess/src/process.cpp 2126c272a69bfa53b4b3cbbb1a55a3f81a5da8ad 



make check


Benjamin Mahler

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message