NetBSD Problem Report #7859
Received: (qmail 15800 invoked from network); 26 Jun 1999 21:17:06 -0000
Message-Id: <199906262117.OAA13248@vaxzilla>
Date: Sat, 26 Jun 1999 14:17:03 -0700 (PDT)
From: bdc@world.std.com
Reply-To: bdc@world.std.com
To: gnats-bugs@gnats.netbsd.org
Subject: VAX port doesn't handle "out of memory" state correctly.
X-Send-Pr-Version: 3.95
>Number: 7859
>Category: port-vax
>Synopsis: VAX port doesn't handle "out of memory" state correctly.
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: port-vax-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 26 14:20:01 +0000 1999
>Closed-Date: Sun Aug 01 13:55:08 +0000 1999
>Last-Modified: Sun Aug 01 13:55:48 +0000 1999
>Originator: Brian Chase
>Release: NetBSD-1.4
>Organization:
>Environment:
VAXstation 3100/M76 w/16MB RAM, NetBSD/vax 1.4
System: NetBSD vaxzilla 1.4 NetBSD 1.4 (BVAX) #0: Sun Jun 13 16:11:43 PDT 1999 root@futplex:/usr/src/sys/arch/vax/compile/BVAX vax
>Description:
The above system was setup with no swap space in order to help
isolate some suspected swapping problems which result in machine
hangs. I discovered that although UVM catches and kills memory
hungry processes when the system runs out of memory, it doesn't
handle this condition gracefully. As soon as UVM reports killing
the process, the system hangs.
>How-To-Repeat:
Example code to generate the problem follows:
---
#include <stdio.h>
#include <stdlib.h>
int main()
{
int count = 1;
int delta = 1024*1024;
void *fooptr;
unsigned char *ptr;
int i;
while (1) {
printf("allocating: %dMB\n", count);
fooptr = malloc((size_t)delta*count);
printf("writing to: %dMB\n", count);
ptr = (unsigned char *)fooptr;
for (i = 0 ; i < delta*count ; i++ ) {
*ptr++ = (unsigned char)0xff;
}
printf("deallocate: %dMB\n", count);
free(fooptr);
count++;
}
exit(0);
}
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: ragge
State-Changed-When: Sun Aug 1 06:55:08 PDT 1999
State-Changed-Why:
See PR#7858.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.