[OpenAFS-devel] butc segmentation fault

Hans-Werner Paulsen hans@MPA-Garching.MPG.DE
Mon, 28 Apr 2008 17:18:24 +0200


Hello,
the pthread butc crashes with SIGSEGV, when I restore to a volume
which already exists. This does happen with OpenAFS 1.4.7pre4 on
i386_linux26.
Looking into the code I think butc is using the wrong function
Lp_GetRwIndex (at volser/vsprocs.c:4394). It uses the one in the
library lib/libvosadmin.a, but should use the function defined
in volser/lockprocs.c.
The following patch should solve this problem.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
--- ./src/tbutc/Makefile.in.orig        Mon Oct 24 21:06:37 2005
+++ ./src/tbutc/Makefile.in     Mon Apr 28 16:30:43 2008
@@ -24,7 +24,7 @@
 BUCOORDOBJS=3Dubik_db_if.o ../bucoord/volstub.o ../bucoord/dlq.o \
            status.o ../bucoord/bucoord_errs.o
=20
-VOLSEROBJS=3Dvsprocs.o vsutils.o
+VOLSEROBJS=3Dvsprocs.o vsutils.o lockprocs.o
 VOLSERLIBS=3D${TOP_LIBDIR}/libvosadmin.a ${TOP_LIBDIR}/libafsadminutil.a
=20
 LWPOBJS     =3Dlock.o
@@ -114,6 +114,9 @@
=20
 vsprocs.o: ${VOLSER}/vsprocs.c
        ${CC} ${CFLAGS} -c ${VOLSER}/vsprocs.c
+
+lockprocs.o: ${VOLSER}/lockprocs.c
+       ${CC} ${CFLAGS} -c ${VOLSER}/lockprocs.c
=20
 lock.o: ${LWP}/lock.c
        ${CC} ${CFLAGS} -c ${LWP}/lock.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D

HW
=20
--=20
Hans-Werner Paulsen		hans@MPA-Garching.MPG.DE
MPI f=FCr Astrophysik		Tel 089-30000-2602
Karl-Schwarzschild-Str. 1	Fax 089-30000-2235=09
D-85741 Garching