OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_6-12-g6824d45

Gerrit Code Review
Thu, 20 Aug 2020 13:25:31 -0400

The following commit has been merged in the openafs-stable-1_8_x branch:
commit 6824d45c2ab83e52350c3f366e4cb6f1eb263088
Author: Kailas Zadbuke <>
Date:   Wed Jun 3 15:44:08 2020 +0530

    util: Handle serverLogMutex lock across forks
    If a process forks when another thread has serverLogMutex locked, the
    child process inherits the locked serverLogMutex. This causes a deadlock
    when code in the child process tries to lock serverLogMutex, since we
    can never unlock serverLogMutex because the locking thread no longer
    exists. This can happen in the salvageserver, since the salvageserver
    locks serverLogMutex in different threads, and forks to handle salvage
    To avoid this deadlock, we register handlers using pthread_atfork()
    so that the serverLogMutex will be held during the fork. The fork will
    be blocked until the worker thread releases the serverLogMutex. Hence the
    serverLogMutex will be held until the fork is complete and it will be
    released in the parent and child threads.
    Thanks to Yadavendra Yadav( for working with me
    on this issue.
    Reviewed-by: Benjamin Kaduk <>
    Tested-by: BuildBot <>
    (cherry picked from commit e44d6441c8786fdaaa1fad1b1ae77704c12f7d60)
    Change-Id: I09c04c0bd99b10433857ccdaeb4ee6a4cd50f768
    Tested-by: BuildBot <>
    Reviewed-by: Kailas Zadbuke <>
    Reviewed-by: Andrew Deason <>
    Reviewed-by: Cheyenne Wills <>
    Reviewed-by: Stephan Wiesand <>

 src/util/serverLog.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

OpenAFS Master Repository