[Bug 1831981] Re: aptdaemon frontend locking, locking fixes

Julian Andres Klode julian.klode at canonical.com
Fri Jun 7 10:36:11 UTC 2019


** Description changed:

  [Impact]
- aptdaemon needs to implement frontend locking to avoid it stumbling over clients that do implement it. We also change the locking order to lock in APT order, and the unlock order becomes the reverse of that so that the behavior is sane wrt other clients.
+ aptdaemon needs to implement frontend locking to avoid it hijacking dpkg status lock from clients that do implement frontend locking; and in order to be protected from apt clients that acquire the status lock (which they won't do if aptdaemon holds the frontend lock).
+ 
+ This also change the locking order to lock in APT order, and the unlock
+ order becomes the reverse of that so that the behavior is sane wrt other
+ clients, as it was somewhat broken.
  
  [Test case]
- N/A
+ Lock /var/lib/dpkg/lock-frontend and then try do so something with aptdaemon, it should not be possible until you release lock-frontend.
  
  [Regression potential]
  There may be other race conditions appearing now due to the order of (un)locking changing.

** Also affects: aptdaemon (Ubuntu Cosmic)
   Importance: Undecided
       Status: New

** Also affects: aptdaemon (Ubuntu Xenial)
   Importance: Undecided
       Status: New

** Also affects: aptdaemon (Ubuntu Eoan)
   Importance: Undecided
       Status: New

** Also affects: aptdaemon (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Also affects: aptdaemon (Ubuntu Disco)
   Importance: Undecided
       Status: New

** Changed in: aptdaemon (Ubuntu Xenial)
       Status: New => In Progress

** Changed in: aptdaemon (Ubuntu Xenial)
       Status: In Progress => Triaged

** Changed in: aptdaemon (Ubuntu Bionic)
       Status: New => Triaged

** Changed in: aptdaemon (Ubuntu Cosmic)
       Status: New => Triaged

** Changed in: aptdaemon (Ubuntu Disco)
       Status: New => Triaged

** Changed in: aptdaemon (Ubuntu Eoan)
       Status: New => In Progress

** Changed in: aptdaemon (Ubuntu Eoan)
   Importance: Undecided => High

** Changed in: aptdaemon (Ubuntu Disco)
   Importance: Undecided => High

** Changed in: aptdaemon (Ubuntu Cosmic)
   Importance: Undecided => High

** Changed in: aptdaemon (Ubuntu Bionic)
   Importance: Undecided => Critical

** Changed in: aptdaemon (Ubuntu Bionic)
   Importance: Critical => High

** Changed in: aptdaemon (Ubuntu Xenial)
   Importance: Undecided => High

** Changed in: aptdaemon (Ubuntu Xenial)
     Assignee: (unassigned) => Julian Andres Klode (juliank)

** Changed in: aptdaemon (Ubuntu Bionic)
     Assignee: (unassigned) => Julian Andres Klode (juliank)

** Changed in: aptdaemon (Ubuntu Cosmic)
     Assignee: (unassigned) => Julian Andres Klode (juliank)

** Changed in: aptdaemon (Ubuntu Disco)
     Assignee: (unassigned) => Julian Andres Klode (juliank)

** Changed in: aptdaemon (Ubuntu Eoan)
     Assignee: (unassigned) => Julian Andres Klode (juliank)

** Changed in: aptdaemon (Ubuntu Eoan)
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to aptdaemon in Ubuntu.
https://bugs.launchpad.net/bugs/1831981

Title:
  aptdaemon frontend locking, locking fixes

Status in aptdaemon package in Ubuntu:
  Fix Committed
Status in aptdaemon source package in Xenial:
  Triaged
Status in aptdaemon source package in Bionic:
  Triaged
Status in aptdaemon source package in Cosmic:
  Triaged
Status in aptdaemon source package in Disco:
  Triaged
Status in aptdaemon source package in Eoan:
  Fix Committed

Bug description:
  [Impact]
  aptdaemon needs to implement frontend locking to avoid it hijacking dpkg status lock from clients that do implement frontend locking; and in order to be protected from apt clients that acquire the status lock (which they won't do if aptdaemon holds the frontend lock).

  This also change the locking order to lock in APT order, and the
  unlock order becomes the reverse of that so that the behavior is sane
  wrt other clients, as it was somewhat broken.

  [Test case]
  Lock /var/lib/dpkg/lock-frontend and then try do so something with aptdaemon, it should not be possible until you release lock-frontend.

  [Regression potential]
  There may be other race conditions appearing now due to the order of (un)locking changing.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/aptdaemon/+bug/1831981/+subscriptions



More information about the foundations-bugs mailing list