]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-tbutc-uses-not-thread-safe-status-20020725
authorRainer Toebbicke <rtb@pclella.cern.ch>
Fri, 26 Jul 2002 06:00:27 +0000 (06:00 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 26 Jul 2002 06:00:27 +0000 (06:00 +0000)
"The multithreaded butc (src/tbutc/butc) includes bucoord/status.o, which is
compiled together with the other bucoord stuff without MT_CFLAGS and hence
without AFS_PTHREAD_ENV defined. Alas, it uses ObtainWriteLock and other
macros out of lock.h which *are* sensitive to AFS_PTHREAD_ENV. Consequently,
butc can hang trying to acquire the statusQueueLock when dumping volumes, in
particular if 'backup status' commands are issued frequently.

A proper fix would probably be to push some of those macros out of lock.h and
make them subroutines in lock.c.

A quick fix is ensuring status.c gets recompiled in tbutc/Makefile.in"

(cherry picked from commit fd2cb884e24b5bf48392db4222ee10125014a3ee)

src/tbutc/Makefile.in

index 338ce9c901fa724ec10114f326e4a70dd9a556eb..5f155afc7e54f0ac583e624938d2ef3ca3a00c8a 100644 (file)
@@ -45,7 +45,7 @@ BUCOORD = ../bucoord
 VOLSER  = ../volser
 
 BUCOORDOBJS=ubik_db_if.o ${BUCOORD}/volstub.o ${BUCOORD}/dlq.o \
-           ${BUCOORD}/status.o ${BUCOORD}/bucoord_errs.o
+           status.o ${BUCOORD}/bucoord_errs.o
 
 VOLSERLIBOBJ=${VOLSER}/volint.cs.o  vsprocs.o              ${VOLSER}/vsutils.o \
             ${VOLSER}/lockprocs.o  ${VOLSER}/volint.xdr.o ${VOLSER}/volerr.o \
@@ -138,6 +138,9 @@ butc_xbsa.o: ${BUTC}/butc_xbsa.c ${BUTC}/butc_xbsa.h ${BUTCINCLS}
 ubik_db_if.o: ${BUCOORD}/ubik_db_if.c
        ${CC} ${CFLAGS} -c ${BUCOORD}/ubik_db_if.c
 
+status.o: ${BUCOORD}/status.c
+       ${CC} ${CFLAGS} -c ${BUCOORD}/status.c
+
 vsprocs.o: ${VOLSER}/vsprocs.c
        ${CC} ${CFLAGS} -c ${VOLSER}/vsprocs.c