The following (edited) message is from one of our senior
developers (Rich Silva - [EMAIL PROTECTED]).  He has been trying
to set up a cross site/shared source pool development environment
using AFS as the repository, and CVS and the AFS/NFS translator.
[Yes, yes, the NFS/AFS translator should be avoided, but there does
not seem to the an SVR4 AFS client, so we need to use it].

Anyway, he saw some, hmmmm, strange/unexplained behavior.  He is still
trying to figure out which piece of what, confuse whom first... but
this learned group may have some thoughts.....

------- Forwarded Message

edited for briefty....

    Simultaneous update test...

    For this test, I planned on using a script that updated a file 100
    times in a sandbox.  

    What I did do is set up a test on an SVR4.2 system (tncls00) through
    to an NFS/AFS client running on an RS/6K (Janus).  A session on
    another SVR4.2 system (Yellowfin) with /afs mounted from Janus and
    a second session on Yellowfin with /afs(_b) mounted from another
    RS/6K AFS/NFS client (Borchard).  These systems were all close (i.e.
    same ethernet) not geopgraphically distributed the way we >>must<<
    run this in the end.

    The results are as follows...

    The first run, I ran into some problems with the script,
        and it turns out I wasnt modifying the file... But...

        There was no file damage with 400 updates to
        the same file (I ran the test twice on one system).

        There were 37 detected lockfile collisions (waiting for
        lock file messages).

        There were (at least) 8 collisions that were not detected
        determined by noticing that there were messages about
        failing to remove locks... I assumed that this meant
        that one session created a lock, and another removed it...

    The second run (actually a misnomer, this took some 8 hours
        to fool around with and try to get something that
        might work right...)

        There were immediate problems with messages like
cvs update: [15:50:36] waiting for rich's lock in /afs/la.locus.com/tnc/tnc_comm 
on_source/tnc_common

UX:cat: ERROR: Write error (0/169 characters written): I/O error

        This happened almost immediately... I, in fact, didnt get the 
        third session started...

        I aborted all but one, hoping that the last would get 
        back in sync... But to no avail, I kept receiving
        the Write error messages.

        Worse yet, the source file ended up 0-length... Actually,
        looking around... One AFS-Client has a different idea
        of what is the status of a file...:

ls -l /afs*/la/tnc/tnc_common_source/tnc_common/test*
- -r--r--r--  1 rich 34400 Mar  4 15:58 
/afs/la/tnc/tnc_common_source/tnc_common/testfile.c,v
- -r--r--r--  1 rich     0 Mar  4 15:58 
/afs_b/la/tnc/tnc_common_source/tnc_common/testfile.c,v

(/afs is an nfs mount from janus, /afs_b is an nfs mount from
    borchard)

    If anyone wants to look at the test, -- see the end of this file.
    /afs/la.locus.com/tnc/tnc_common_source/cvs_test.sh

    In order to run it on multiple sites, I had to cvs add the file
    by hand, then remove the lines that create a local copy of
    the file (else the cvs update later would burp...)

    I'm still not convinced that the test is entirely valid, but
    I did see cvs try to merge a couple of files...  The test also
    is doing something we'd never see... hundreds of updates of
    a single file...


    Rich

 --- cut here --
#!/bin/sh

cat <<END_OF_HERE >testfile.c

#ident "@@(#)$Header$"

/* 
 * This is a q&d version of like.  I needed it on the RS/6000 and I
 * couldn't find the source I wrote long ago. 
 */

#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>

main(argc, argv)
        int argc;
        char *argv[];
{
        struct stat stat_buf1;
        struct stat stat_buf2;
        struct utimbuf  utb;
        if (argc != 3) {
                fprintf(stderr, "usage: '%s source_file dest_file'\n", *argv);
                exit(1);
        }

        if (stat(argv[1], &stat_buf1) < 0) {
                fprintf(stderr, "%s: can't stat '%s', errno=%d\n",
                        argv[0], argv[1], errno);
                exit(2);
        }

        if (stat(argv[2], &stat_buf2) < 0) {
                fprintf(stderr, "%s: can't stat '%s', errno=%d\n",
                        argv[0], argv[2], errno);
                exit(2);
        }

        utb.actime = stat_buf2.st_atime;        /* don't change atime */
        utb.modtime = stat_buf1.st_mtime;       /* copy mtime to new file */

        if (utime(argv[2], &utb) < 0) {
                fprintf(stderr, "%s: can't change times on '%s', errno=%d\n",
                        argv[0], argv[2], errno);
                exit(2);
        }
        exit(0);
}

END_OF_HERE

# cvs add testfile.c
# cvs commit -m "Committing testfile" -l testfile.c
for j in 0 1 2 3 4 5 6 7 8 9
do
for i in 0 1 2 3 4 5 6 7 8 9
do
        echo "Iteration - ${j}${i} -"
        ed - testfile.c <<END_OF_HERE
\$a
/* This is a test line. */
/* This is a test line. */
/* This is a test line. */
/* This is a test line. */
/* This is a test line. */
/* This is a test line. */
/* This is a test line. */
/* This is a test line. */

Reply via email to