[Bug 1982219] Re: autofs: regression on focal->jammy upgrade: automount daemon hangs

Launchpad Bug Tracker 1982219 at bugs.launchpad.net
Tue Aug 2 17:41:49 UTC 2022


This bug was fixed in the package autofs - 5.1.8-1ubuntu3

---------------
autofs (5.1.8-1ubuntu3) kinetic; urgency=medium

  * d/p/autofs-5.1.8-ldap-kerberos-leads-to-automount-hang-p.patch: fix
    lock imbalance (LP: #1982219)

 -- Christian Ehrhardt <christian.ehrhardt at canonical.com>  Thu, 28 Jul
2022 07:27:10 +0200

** Changed in: autofs (Ubuntu Kinetic)
       Status: Fix Committed => Fix Released

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

Title:
  autofs: regression on focal->jammy upgrade: automount daemon hangs

Status in autofs package in Ubuntu:
  Fix Released
Status in autofs source package in Jammy:
  In Progress
Status in autofs source package in Kinetic:
  Fix Released

Bug description:
  [Impact]

   * There is a locking issue in v5.1.8 of autofs where unbalanced
     locking leads to a hang with certain operations.

   * Fix was proposed and acknowledged upstream (see below)
    
   * Backport that fix to releases with 5.1.8 (= Jammy and Kinetic)

  [Test Plan]

   * This needs a rather complex setup, but gladly the users/community
     is rather active and responsive on this. So we will describe the test, 
     but rely on them to verify the fix (pre-checked on PPA, 
     was good there).

   * Setup: Use automount with maps held in a Samba active directory
     (or elsewhere, but so they have to be fetched). Autofs then needs
     to be configured to use kerberos authentication  (that is what
     brings the cyrus-sasl code in) to connect using LDAP to retrieve
     the maps.
     Without the fix during the retrieval of the master map the daemon hangs 
     and makes no progress.
     -m = list information about the configured automounter maps, then exit
     -f = Run the daemon in the foreground and log to stderr
     Good: `automount -m -f` dumps the configured maps and the daemon
     starts correctly and manages the expect mounts correctly.
     
     Bad: `automount -m -f` hangs

  [Where problems could occur]

   * Of the many things autofs can do this code change is only
     in cyrus-sasl. So one can expect potential impact to be only
     in that functionality - others should see no change at all.
     Furthermore due to the nature of the change (locking) what
     you'd expect as regression would be hangs or uncontrolled
     concurrent access.

  [Other Info]
   
   * Upstream releases slowly and rarely, so the patch is
     acknowledged but not yet in git or a release. But that
     is as much as we can get for now.

  
  --- original report ---

  I use automount maps held in a Samba active directory.  Autofs is
  configured to use kerberos authentication to connect using LDAP to
  retrieve the maps.  During the retrieval of the master map the daemon
  hangs and makes no progress.

  # apt-cache policy autofs
  autofs:
    Installed: 5.1.8-1ubuntu1.1
    Candidate: 5.1.8-1ubuntu1.1
    Version table:
   *** 5.1.8-1ubuntu1.1 500
          500 http://gb.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
          100 /var/lib/dpkg/status
       5.1.8-1ubuntu1 500
          500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

  # lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 22.04 LTS
  Release:        22.04
  Codename:       jammy

  After adding some debugging I have traced this to an unbalanced
  pthread_mutex_lock/unlock which appears to have been introduced in
  d0d99cfc0737f34af326ba3f8f35f45625300576 autofs-5.1.6 - fix ldap sasl
  reconnect problem.  The attached patch which performs a
  pthread_mutex_unlock() in the alternate success path of
  sasl_do_kinit_ext_cc() resolves the problem for me.  I intend to post
  this to autofs at vger.kernel.org once my membership to the list is
  accepted.

  List post: https://marc.info/?l=autofs&m=165826158526742&w=2

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




More information about the foundations-bugs mailing list