Subject: kern/11127: fsck_lfs wants to allocate ridiculous amount of memory
To: None <gnats-bugs@gnats.netbsd.org>
From: None <fvdl@vaasje.org>
List: netbsd-bugs
Date: 10/04/2000 04:11:14
>Number:         11127
>Category:       kern
>Synopsis:       fsck_lfs wants to allocate ridiculous amount of memory
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 04 04:11:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Frank van der Linden
>Release:        1.5_ALPHA2
>Organization:
Disorg, Inc.
>Environment:
	
System: NetBSD gate 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (GATE) #1: Mon Sep 11 13:55:43 MEST 2000 fvdl@sushi:/work/trees/netbsd-1-5/sys/arch/i386/compile/GATE i386


>Description:
	With a 30G filesystem, using the following parameters:

  a: 60030369       63     4.4LFS     2048  8192    16   # (Cyl.    0*- 59553)

	..fsck_lfs wants to allocate a blockmap with:

		blockmap = (ino_t *)malloc(maxfsblock * sizeof(ino_t));

	But, maxfsblock == 60030369, so that obviously is too much to ask for,
	and the malloc() will fail.
>How-To-Repeat:
	Run fsck_lfs on a filesystem with the parameters as above, and see
	it abort.
>Fix:
	Disabling VERBOSE_BLOCKMAP makes it work again.
>Release-Note:
>Audit-Trail:
>Unformatted: