I have confirmation that the kernel in -proposed fixes the issue in

** Tags removed: verification-needed-xenial
** Tags added: verification-done-xenial

You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.

  fscache cookie refcount updated incorrectly during fscache object

Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Trusty:
  Fix Committed
Status in linux source package in Xenial:
  Fix Committed
Status in linux source package in Bionic:
  Fix Committed

Bug description:
  == SRU Justification ==

  Oops during heavy NFS + FSCache + Cachefiles use:

   kernel BUG at /build/linux-Y09MKI/linux-4.4.0/fs/fscache/internal.h:321!
   kernel BUG at /build/linux-Y09MKI/linux-4.4.0/fs/fscache/cookie.c:639!

   1)Two threads are trying to do operate on a cookie and two objects.
   2a)One thread tries to unmount the filesystem and in process goes over
     a huge list of objects marking them dead and deleting the objects.
     cookie->usage is also decremented in following path
         -> __fscache_relinquish_cookie
          ->BUG_ON(atomic_read(&cookie->usage) <= 0);

   2b)second thread tries to lookup an object for reading data in
      following path
        1) cachefiles_alloc_object
            -> fscache_object_init 
              -> assign cookie, but usage not bumped.
       2) fscache_attach_object -> fails in cant_attach_object because the 
          cookie's backing object or cookie's->parent object are going away
             -> cachefiles_put_object
                 ->BUG_ON(atomic_read(&cookie->usage) <= 0);
   Bump up the cookie usage in fscache_object_init,
   when it is first being assigned a cookie atomically such that the cookie
   is added and bumped up if its refcount is not zero.
   remove the assignment in the attach_object.

  A user has run ~100 hours of NFS stress tests and not seen this bug recur.

  [Regression Potential]
   - Limited to fscache/cachefiles.

To manage notifications about this bug go to:

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

Reply via email to