[Bug 224292] processes are hanging in state ufs / possible deadlock in file system

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Dec 12 19:30:46 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224292

Kirk McKusick <mckusick at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mckusick at FreeBSD.org

--- Comment #2 from Kirk McKusick <mckusick at FreeBSD.org> ---
It is possible that this patch will fix this problem:

r326657 | kib | 2017-12-07 01:05:34 -0800 (Thu, 07 Dec 2017) | 15 lines

Fix livelock in ufsdirhash_create().

When more than one thread enters ufsdirhash_create() for the same
directory and the inode dirhash is instantiated, but the dirhash' hash
is not, all of them lock the dirhash shared and then try to upgrade.
Since there are several threads owning the lock shared, upgrade fails
and the same attempt is repeated, ad infinitum.

To break the lockstep, lock the dirhash in exclusive mode after the
failed try-upgrade.

Reported and tested by: pho
Sponsored by:   Mellanox Technologies
MFC after:      1 week

It is also known that dirhash tuning as described by Wolfram Schneider above
significantly mitigates this problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list