[OpenAFS] AFS Client on IA 64

chas williams chas@locutus.cmf.nrl.navy.mil
Tue, 22 Apr 2003 11:10:59 -0400


In message <3EA5568C.4040500@northsailor.de>,Klaas Hagemann writes:
>Program received signal SIGSEGV, Segmentation fault.
>0x4000000000004100 in __libc_utmp_lock ()
>(gdb) where
>#0  0x4000000000004100 in __libc_utmp_lock ()
>#1  0x40000000000040d0 in __libc_utmp_lock ()

congradulations you found a bug!  i see the same problem on my ia64:

% fs mkm /afs/.cmf.nrl.navy.mil/users/chas/backup user.chas.backup
Segmentation fault

however, the following does work:

% cd /afs/cmf.nrl.navy.mil/users/chas/
% fs mkm backup user.chas.backup

i am not convinced that the trouble is in __libc_utmp_lock though.
running gdb on my copy of fs that has the debugging symbols says:

#0  0x4000000000004080 in Parent ()
(gdb) where
#0  0x4000000000004080 in Parent ()
#1  0x00000005 in ?? ()

and sure enough, the compiler reveals:

cc -O2 -I/scratch/chas/openafs-1.2.7/include -I/scratch/chas/openafs-1.2.7/src/config -I/scratch/chas/openafs-1.2.7/include -O2 -G0   -c -o fs.o fs.c
fs.c: In function `Parent':
fs.c:253: warning: assignment makes pointer from integer without a cast


/* return a static pointer to a buffer */
static char *Parent(apath)
    char *apath;
{
    char *tp;
    strcpy(tspace, apath);		/* line 253 */
    tp = strrchr(tspace, '/');
    if (tp) {
        *tp = 0;

so again, missing prototypes on the ia64 cause trouble.  its hard to
track all these down really.  anyway, here is a patch against the source
code to fix this problem:

--- openafs-1.2.7/src/venus/fs.c.orig	Tue Apr 22 11:09:29 2003
+++ openafs-1.2.7/src/venus/fs.c	Tue Apr 22 11:09:40 2003
@@ -43,6 +43,13 @@
 #include <strings.h>
 #include <afs/afsutil.h>
 #include <stdlib.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
 #include <assert.h>
 #include <afs/ptclient.h>
 
hopefully this could make it into the 1.2.9 release.