Subject: port-hp300/9725: hp300 pmap panic
To: None <netbsd-bugs@netbsd.org>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: netbsd-bugs
Date: 04/05/2000 14:58:19
Date: Fri, 31 Mar 2000 00:10:48 -0700 (MST)
From: swp@alumni.rice.edu
Reply-To: swp@alumni.rice.edu
To: gnats-bugs@gnats.netbsd.org
Subject: hp300 pmap panic


>Number:         9725
>Category:       port-hp300
>Synopsis:       GNU autoconf mmap() test can crash 68040 based hp300
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-hp300-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 31 00:16:22 PST 2000
>Closed-Date:    
>Last-Modified:  
>Originator:     Steve Peurifoy
>Release:        1.4V (20000320)
>Organization:
>Environment:
System: NetBSD loop 1.4V NetBSD 1.4V (loop) #1: Fri Mar 24 18:33:34 MST 2000 root@loop:/usr/src/sys/arch/hp300/compile/loop hp300




>Description:
Running the "configure" script included with a number of packages will
crash a 68040 based hp300 with "panic: enter: out of address space".
This is a result of an mmap() test run by configure which attempts to
map pieces of memory scattered throughout the address space.  Doing
this exposes a limitation in the hp300 pmap regarding how second level
descriptor blocks are managed.
Other types of tasks can cause the same crash.  For example running
cmp(1) with very large (>200MB) files has induced this panic in my
system.
>How-To-Repeat:
The following program performs the relevant parts of the mmap() test
executed by the configure script included in "ffcall".  Running this
program will crash a 68040 based hp300 running NetBSD.


#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/mman.h>


int main()
  {


  int        i;
  caddr_t    addr;
  size_t     size = 4096;


  for (i = 1; i <= 64; i++)
    {
    addr = (caddr_t)(i << 24);
    if (mmap(addr, size, PROT_READ | PROT_WRITE,
             MAP_ANON | MAP_PRIVATE | MAP_FIXED, -1, 0) < 0)
      {
      exit(1);
      }
    }


  for (i = 1; i <= 64; i++)
    {
    addr = (caddr_t)(i << 24);
    *addr = 0;
    }


  exit(0);


  }


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