Date: Sat, 11 Jul 1998 18:15:45 -0700 From: David Greenman <dg@root.com> To: Terry Lambert <tlambert@primenet.com> Cc: current@FreeBSD.ORG Subject: Re: Arrgh ! resubscribing again again again.... Message-ID: <199807120115.SAA28466@implode.root.com> In-Reply-To: Your message of "Sun, 12 Jul 1998 00:52:51 -0000." <199807120052.RAA15975@usr08.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>> >When no backing pages exist (becaues you've used them all up and are >> >out of swap space), the process requesting the page as a result of >> >the copy on write fault can not have its request satisfied. >> > >> >The result of an unsatified fault request is a SIGSEGV, or signal 11; >> >> Wrong. The result of running out of swap space is a SIGKILL, or signal 9. >> The bug that people are refering to seems to have been introduced around the >> time that John was messing with the VM map code, but might predate that to >> when he was messing with some of the swap pager algorithms. > >Hmmm. I was able to cause the problem (with SIGSEGV) by mapping a large >shared memory segment, and then traversing the pages to dirty them (one >byte per page). > >I see in the VM code where a SIGKILL could result, but it seems to me that >the page table entry exists, it just doesn't have pages to back it, and >when the page to back the entry fails allocation, you get SIGSEGV, since >it isn't mapped when you do the reference. > >Am I reading this code wrong? Yes, you are reading the code wrong. A SIGSEGV will only occur when there is no mapping. If this happend for you, then either there was no mapping (a programatic error), or there is a bug in the kernel. In fact, one of the VM system test programs that John and I used frequently is called "testswap", which does something similar to that suggested above; it never exited with SIGSEGV in the past. Source attached. -DG David Greenman Co-founder/Principal Architect, The FreeBSD Project #include <stdio.h> main() { int i; char *s; for(i=0;i<16000;i++) { s = malloc(0x1000); if( (i % 100) == 0) { printf("%d ",i*0x1000); fflush(stdout); } if( !s) { printf("no mem: %d\n", i*0x1000); exit(1); } /* memset(s,0,0x1000); */ *s = 0; } } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807120115.SAA28466>