** Branch linked: lp:~ci-train-bot/mir/mir-ubuntu-zesty-2369

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mir in Ubuntu.
https://bugs.launchpad.net/bugs/1653658

Title:
  Race between MirConnection::released() and
  MirConnection::~MirConnection() causes deadlocks, possible crashes and
  memory corruption

Status in Mir:
  Fix Committed
Status in mir package in Ubuntu:
  New

Bug description:
  Race between MirConnection::released() and
  MirConnection::~MirConnection() causes deadlocks, possible crashes and
  memory corruption.

  This is happening reliably only in one of my branches on krillin,
  where the thread calling released() is deadlocked trying to use
  internal locking primitives that another thread calling ~MirConnection
  is in the process of destructing.

  It appears this is a known problem already judging by this comment:

  MirConnection::~MirConnection() noexcept
  {
      // We don't die while if are pending callbacks (as they touch this).
      // But, if after 500ms we don't get a call, assume it won't happen.
      connect_wait_handle.wait_for_pending(std::chrono::milliseconds(500));

      std::lock_guard<decltype(mutex)> lock(mutex);
      surface_map.reset();

  Although that code only waits for connections and doesn't bother to
  wait for releases which are the problem here.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1653658/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to