mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Mann <g...@mesosphere.io>
Subject Re: Review Request 58464: Fixed a potential deadlock in the 'CombinedAuthenticator'.
Date Mon, 17 Apr 2017 16:23:01 GMT

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

(Updated April 17, 2017, 4:23 p.m.)


Review request for mesos, Anand Mazumdar and Vinod Kone.


Repository: mesos


Description
-------

This patch fixes a bug in `CombinedAuthenticator.authenticate()`.
Previously, the function registered a callback on the results of
`Authenticator::authenticate()` calls, which would be executed in
the context of the individual authenticators' processes. Since this
callback captured a copy of the `Owned<Authenticator>` referring to
that authenticator itself, it was possible that during teardown the
authenticator could be destroyed from its own context, leading to
a deadlock.

This patch eliminates the capture of a reference to the
authenticator, instead simply capturing the authenticator's scheme.


Diffs (updated)
-----

  src/authentication/http/combined_authenticator.cpp 51ec8829cd3323f23389537d5fce4850ffcfc0e9



Diff: https://reviews.apache.org/r/58464/diff/2/

Changes: https://reviews.apache.org/r/58464/diff/1-2/


Testing
-------

`bin/mesos-tests.sh --gtest_filter="ExecutorAuthorizationTest.RunTaskGroup" --gtest_repeat=-1
--gtest_break_on_failure` was executed both before and after this patch to verify that it
eliminates the deadlock.


Thanks,

Greg Mann


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