From owner-freebsd-questions Tue Aug 10 0:55: 8 1999 Delivered-To: freebsd-questions@freebsd.org Received: from sani-c.vrn.ru (sani-c.vrn.ru [195.98.74.81]) by hub.freebsd.org (Postfix) with ESMTP id 1B8E314C22 for ; Tue, 10 Aug 1999 00:54:37 -0700 (PDT) (envelope-from root@sani-c.vrn.ru) Received: from localhost (root@localhost) by sani-c.vrn.ru (8.9.3/8.9.3) with ESMTP id LAA00228 for ; Tue, 10 Aug 1999 11:52:33 +0400 (MSD) Date: Tue, 10 Aug 1999 11:52:33 +0400 (MSD) From: Charlie ROOT To: freebsd-questions@FreeBSD.ORG Subject: System hang when mmap() large files In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG My FreeBSD 3.1-STABLE hangs when this small program running: #include #include #include #include #include main() { int fd; int i; int len=1024*1024*10; /*ie 10Mbytes*/ caddr_t addr; char ttt[80]; for (i=0;;i++) { sprintf (ttt,"%d",i); fd=open(ttt,O_CREAT|O_RDWR,0666); if (fd<0) { printf("open error %ld\n",errno); exit(1); } lseek(fd,len-1,SEEK_SET); write(fd,"",1); addr=mmap(0,len,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0); if (addr==MAP_FAILED) { printf("mmap error %ld",errno); exit(1); } close(fd); memset(addr,'x',len); } } uname -a on my machine shows: FreeBSD oleg.sani-c.vrn.ru 3.1-STABLE FreeBSD 3.1-STABLE #2: Fri Apr 23 13:31:08 MSD 1999 root@oleg.sani-c.vrn.ru:/usr/src/sys/compile/KERNEL-CURRENT i386 Is this a known bug ? I'm very sorry, but I can't cvsup now, so if this bug has been fixed already, please don't beat me, OK ? ;-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message