OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-475-g2e43c97

Gerrit Code Review gerrit@openafs.org
Fri, 15 May 2026 10:53:05 -0400


The following commit has been merged in the master branch:
commit 2e43c97ea1def896787a2dec7aea8f8297738733
Author: Michael Meffie <mmeffie@sinenomine.net>
Date:   Thu May 14 11:39:23 2026 -0400

    rx: Convert MakeDebugCall() counter to rx_atomic_t
    
    The static `counter` variable used within MakeDebugCall() is incremented
    under the `rx_debug_mutex` lock but is read outside the lock.
    MakeDebugCall() is not called from different threads in any OpenAFS
    code, so this is currently not an issue in our in-tree callers.
    
    In addition, `rx_debug_mutex` is not initialized in the `rxdebug`
    program, since that program does not call rx_Init(), which initializes
    all of the global rx locks.  This causes `rxdebug` to fail on some
    platforms since the sited commit. For example, on MacOS:
    
          $ rxdebug afs.example.com 7000 -version
          Trying 172.17.17.110 (port 7000):
          Thu Mar 12 21:34:13 2026 Assertion failed! file rx.c, line 7713.
          Abort trap: 6
    
    Fix these issues by replacing the lock with an atomic counter within
    MakeDebugCall()
    
    * Remove `rx_debug_mutex` and the related macros
    * Add `counter_atomic` atomic which is incremented and read
    * Change `counter` to a local variable which is set from the atomic
    
    Thanks to Mark Vitale for reporting the `rx_debug_mutex` issue on MacOS.
    Thanks to Andrew Deason for reporting the thread-safety issue and
    recommending the use of atomics for the fix.
    
    Fixes: 8eef1f6ca474 ("rxdebug: Build rxdebug and rxdumptrace as pthreaded programs").
    Change-Id: Icae04dee5b501bfa6ec5f17a35a9ceb2764c7200
    Reviewed-on: https://gerrit.openafs.org/16791
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Tested-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>

 src/rx/rx.c | 22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

-- 
OpenAFS Master Repository