mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <jos...@mesosphere.io>
Subject Review Request 57821: Added logic to check for discard in the server socket's loop.
Date Tue, 21 Mar 2017 21:40:40 GMT

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

Review request for mesos, Benjamin Mahler and Greg Mann.


Bugs: MESOS-6919
    https://issues.apache.org/jira/browse/MESOS-6919


Repository: mesos


Description
-------

This deals with a deadlock during libprocess finalization, which
appears as a result of implementing a discard handler on the
`process::Queue` class.  See: https://reviews.apache.org/r/57358/

The libprocess server socket's incoming connections are backed by
a `process::Queue`, which returns Future sockets backed by Promises.
Upon discarding the Future sockets in `process::finalize`, the
discard handlers for the Promises are executed immediately, and in the
same thread.  Because the server socket's `on_accept` loop has an
`.onAny` continuation, this continuation is also executed, leading
to a deadlock on the non-recursive `socket_mutex`.

This commit changes the `.onAny` continuation to stop when it encounters
a discard.  We only discard incoming connections when cleaning up the
socket.


Diffs
-----

  3rdparty/libprocess/src/process.cpp f6ee24e2db43d63d91222549efee85421bbf9bf3 


Diff: https://reviews.apache.org/r/57821/diff/1/


Testing
-------

Requires the next patch...


Thanks,

Joseph Wu


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