OpenAFS Master Repository branch, openafs-devel-1_7_x, updated. openafs-devel-1_7_12-2-g57f04d7

Gerrit Code Review
Tue, 15 May 2012 05:15:47 -0700 (PDT)

The following commit has been merged in the openafs-devel-1_7_x branch:
commit 24f3348a6e1686d7d229afb5f59f9adb9c9c6edd
Author: Jeffrey Altman <>
Date:   Thu May 10 08:36:33 2012 -0400

    Windows: Avoid deadlock during "fs memdump"
    When the afs redirector is in use, it is possible that "fs memdump"
    could be executed while all of the pages in the Windows page cache
    are dirty with data that must be purged and flushed to \\afs. In
    such a situation it is not safe for afsd_service.exe to hold
    global locks such as buf_globalLock, cm_scacheLock, etc. while
    performing WriteFile() calls against %TEMP%\afsd_alloc.log if
    afsd_alloc.log was opened without the FILE_FLAG_NO_BUFFERING flag.
    Doing so can result in a deadlock as it can become impossible for
    the Windows page cache to purge data to complete the WriteFile()
    as all extent operations block waiting for the global lock to
    be cleared.
    The correct long term approach would be to use the FILE_FLAG_NO_BUFFERING
    flag when opening %TEMP%\afsd_alloc.log.  However, this requires that
    all writes to the file be performed using buffers that are consistent
    with the drive geometry.  Such an approach would be incompatible with
    the _CrtMemDumpAllObjectsSince() operation and would require a redesign
    of the current interfaces.  See
    for requirements when using non-buffered writes.
    The short term fix is to dump the contents without holding the
    global locks.  This can result in an inconsistent view of the world
    but will ensure that deadlocks are avoided.  This patchset makes
    such a change when the afs redirector is in use.
    Tested-by: BuildBot <>
    Reviewed-by: Jeffrey Altman <>
    Tested-by: Jeffrey Altman <>
    (cherry picked from commit c6782b86d77f8653d8dd4bc27d0cbcca5f13747f)
    Change-Id: I8480426dde949c2e5c733b511b5900c3b4cac172
    Tested-by: BuildBot <>
    Reviewed-by: Jeffrey Altman <>

 src/WINNT/afsd/cm_ioctl.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

OpenAFS Master Repository