Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Oct 1999 06:14:58 -0700 (PDT)
From:      amobbs@allstor-sw.co.uk
To:        freebsd-gnats-submit@freebsd.org
Subject:   kern/14285: NFS client appears to lose data
Message-ID:  <19991012131458.4F78415B1E@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         14285
>Category:       kern
>Synopsis:       NFS client appears to lose data
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 12 06:20:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Mobbs
>Release:        3.3-RC
>Organization:
Allstor Software
>Environment:
FreeBSD symbiosis.software.plasmon 3.3-RC FreeBSD 3.3-RC #0: Tue Sep 14 11:39:37 BST 1999     root@symbiosis.software.plasmon:/usr/src/sys/compile/990820symbiosis  i386
>Description:
As far as I can tell, the following program will lose data on a
FreeBSD->FreeBSD NFS mount, but not on a
FreeBSD->{Solaris,Linux,AIX} or a {Solaris,Linux}->FreeBSD mount
(Notation is server->client)
All mounts are hard. NFS options are whatever the default on a given 
platform is.
Network is 100MBps switched ethernet.

The output file "testfile" loses occasional characters
OS versions:
Solaris 2.5.1 (sparc)
Linux 2.2.10 (i386)
FreeBSD 3.3-RC (client) (i386)
FreeBSD 3.2-R  (server) (i386)
AIX 4.2 (rs6000)

>How-To-Repeat:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <errno.h>
#include <sys/types.h>

main(void){

        int error=0,len,i;
        FILE *fp;
        pid_t mypid;
        char str[80];

        init_mutex(&mutex);

        srandom(time(NULL));

        mypid=getpid();

        sprintf(str,"Hello, I'm process %d.\n",mypid);
        len=strlen(str);

        if((fp=fopen("testfile","a+"))==NULL){
                fprintf(stderr,"Cannot open testfile failed %d\n",errno);
                exit(1);
        }

        for(;;){
                for(i=0;i<len;i++){
                        fputc(str[i],fp);
                        usleep((random()%1000)*100);
                        fflush(fp);
                }
        }
}

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991012131458.4F78415B1E>