Date: Sat, 11 Dec 1999 11:42:45 -0800 (PST) From: mitja@ksop-cscp.si To: freebsd-gnats-submit@freebsd.org Subject: kern/15420: 3.3-RELEASE Kernel freeze Message-ID: <19991211194245.1614414D16@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 15420 >Category: kern >Synopsis: 3.3-RELEASE Kernel freeze >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Dec 11 11:50:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Mitja Horvat >Release: 3.3-RELEASE >Organization: >Environment: FreeBSD weha.nonet.si 3.3-RELEASE FreeBSD 3.3-RELEASE #7: Thu Dec 9 00:21:47 CET 1999 root@weha.nonet.si:/usr/src/sys/compile/WOW i386 >Description: Kernel freezes under heavy VM load. >How-To-Repeat: Spawn few programs that chew up all memory. The bug may not show up immediately, so run the programs few times. This script triggers the problem on two PCs I tested on: --------------------------------->8-------------------------------- #!/bin/sh cat << EOF > qq.c void main(void) { for(;;) memset(malloc(1000000), 0, 1000000); } EOF cc qq.c -o qq ./qq & ./qq & ./qq & ./qq & wait rm -f qq qq.c --------------------------------->8-------------------------------- >Fix: The following kernel patch fixes the problem for me, but since this is my first FreeBSD hacking attempt, I'm not sure if it's OK. --------------------------------->8-------------------------------- --- vm_pageout.c.orig Fri Dec 10 01:49:54 1999 +++ vm_pageout.c Fri Dec 10 01:54:22 1999 @@ -1136,8 +1136,8 @@ * make sure that we have swap space -- if we are low on memory and * swap -- then kill the biggest process. */ - if ((vm_swap_size == 0 || swap_pager_full) && - ((cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min)) { + if (vm_swap_size == 0 || swap_pager_full || + (cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min) { bigproc = NULL; bigsize = 0; for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) { --------------------------------->8-------------------------------- >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?19991211194245.1614414D16>