NetBSD Problem Report #17494

Received: (qmail 18945 invoked by uid 605); 6 Jul 2002 17:39:18 -0000
Message-Id: <20020706173916.12441.qmail@intrepid.warped.com>
Date: 6 Jul 2002 17:39:16 -0000
From: scotte@warped.com
Sender: gnats-bugs-owner@netbsd.org
Reply-To: scotte@warped.com
To: gnats-bugs@gnats.netbsd.org
Subject: Bootblocks print error regarding heap
X-Send-Pr-Version: 3.95

>Number:         17494
>Category:       port-i386
>Synopsis:       Accessing disk from bootloader causes system to hang
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 06 17:40:00 +0000 2002
>Closed-Date:    Sun Aug 22 17:52:39 +0000 2004
>Last-Modified:  Sun Aug 22 17:52:39 +0000 2004
>Originator:     Scott Ellis
>Release:        NetBSD 1.6A
>Organization:
   //////////////////////////////////////////////////////////////////////
  //    Scott Ellis     //             scotte@warped.com              //
 //////////////////////////////////////////////////////////////////////
// WARNING: This signature warps  time and space in its vicinity    //
>Environment:


System: NetBSD intrepid 1.6A NetBSD 1.6A (INTREPID) #0: Sun Jun 2 10:03:49 PDT 2002 scotte@intrepid:/misc/localsrc/netbsd/netbsd_cvs_src/src/sys/arch/i386/compile/INTREPID i386
Architecture: i386
Machine: i386
>Description:

After upgrading the bootblocks to what came with 1.6A (from 1.5ZA?..somewhere
around there), attempting to "ls" or "boot" from the bootblocks caused the
system to print an error regarding heap (sorry, the exact error has been lost,
but referenced something to the effect of "heap exceeded at 49152").
This also coincided with the replacement of a 4G disk with a 120G disk, so that
may be where the problem is.  Ramdonly editing the HEAP_LIMIT in the Makefile
solved the problem (I've no real idea WHY it fixed it, but it did!).

Disks look at follows:

# /dev/rwd0d:
type: ESDI
disk: WDC WD1200JB-75C
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 234375000
rpm: 7200
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

6 partitions:
#        size    offset     fstype  [fsize bsize cpg/sgs]
 a:   6144768         0     4.2BSD   8192 65536  4272   # (Cyl.    0 - 6095)
 b:    525168   6144768       swap                      # (Cyl. 6096 - 6616)
 d: 234375000         0     unused      0     0         # (Cyl.    0 - 232514*)
 e:   2048256   6669936     4.2BSD   4096  8192   181   # (Cyl. 6617 - 8648)
 f: 225656808   8718192     4.2BSD   8192 65536  4128   # (Cyl. 8649 - 232514*)

>How-To-Repeat:

Attempt to boot with 1.6A bootblocks on my system with a 120G disk.
>Fix:

[intrepid(2)]stand/biosboot> diff -u Makefile.orig Makefile
--- Makefile.orig       Sun May  5 11:47:13 2002
+++ Makefile    Sun May  5 11:48:02 2002
@@ -54,7 +54,8 @@
 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main

-SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x50000
+#SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x50000
+SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x100000
 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes     # Read compressed kernels
 SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no    # Netboot via TFTP, NFS

>Release-Note:
>Audit-Trail:

From: David Laight <david@l8s.co.uk>
To: netbsd-bugs@netbsd.org, gnats-bugs@gnats.netbsd.org
Cc:  
Subject: re: port-i386/17494: Accessing disk from bootloader causes system to hang
Date: Sun, 30 Nov 2003 21:26:03 +0000

 The problem here is that the standalone filesystem code uses 'block' sized
 buffers to access the disk.  With the filesystem:

 > #        size  offset   fstype [fsize bsize cpg/sgs]
 >  a:   6144768       0   4.2BSD   8192 65536  4272   # (Cyl.    0 - 6095)

 this required several 64k buffers - which there wasn't space for.

 The 'current' standalone filesystem code uses a single buffer, so has
 a smaller footprint.

 However the 'new' bootxx code also uses the standalone filesystem code and
 is constrained (without a lot of work) to the lowest 64k of memory - so
 doesn't stand a chance....  (it will work with 32k blocks).

 	David

 -- 
 David Laight: david@l8s.co.uk
State-Changed-From-To: open->closed 
State-Changed-By: dsl 
State-Changed-When: Sun Aug 22 17:50:55 UTC 2004 
State-Changed-Why:  
Duplicate of 20990 - which is more succinct 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.