NetBSD Problem Report #3498
Received: (qmail-queue invoked from smtpd); 15 Apr 1997 20:51:52 -0000
Message-Id: <199704152047.PAA00413@par0163.urh.uiuc.edu>
Date: Tue, 15 Apr 1997 15:47:03 -0500 (CDT)
From: nimenees@par0163.urh.uiuc.edu
Reply-To: nimenees@par0163.urh.uiuc.edu
To: gnats-bugs@gnats.netbsd.org
Subject: kernel panic mounting diskette
X-Send-Pr-Version: 3.95
>Number: 3498
>Category: kern
>Synopsis: kernel panic mounting diskette
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Apr 15 14:05:01 +0000 1997
>Closed-Date: Fri Dec 04 11:25:34 +0000 1998
>Last-Modified: Fri Dec 04 11:26:44 +0000 1998
>Originator:
>Release:
>Organization:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->kern-bug-people
Responsible-Changed-By: mikel
Responsible-Changed-When: Thu Apr 17 00:21:24 1997
Responsible-Changed-Why:
State-Changed-From-To: open->closed
State-Changed-By: bouyer
State-Changed-When: Fri Dec 4 03:25:34 PST 1998
State-Changed-Why:
The sanity checks I added to ffs_mountfs() should fix this case too
>Unformatted:
Submitter-Id: net
Originator: Eric Haszlakiewicz
Organization: -
Confidential: no
Synopsis: Mounting certain floppy disks causes kernel panic.
Severity: non-critical
Priority: low
Category: kern
Class: sw-bug
Release: current
Environment:
intel Pentium, NetBSD-current(4/15)
System: NetBSD par0163.urh.uiuc.edu 1.2D NetBSD 1.2D (REALMS) #34: Tue Apr 15 14:40:35 CDT 1997 root@par0163.urh.uiuc.edu:/usr/src/sys/arch/i386/compile/REALMS i386
Description:
Mounting at least one type of diskette causes kernel to panic.
It crashes with the message:
panic: malloc: out of space in kmem_map
Continuing from the db prompt reboots the machine.
How-To-Repeat:
First 9567 bytes of disk: (minimum needed to reproduce)
0000000 f6f6 f6f6 f6f6 f6f6 f6f6 f6f6 f6f6 f6f6
*
0002400 0000 0000 0000 0000 0000 0000 0000 0000
*
0002520 0000 0000 0008 0000 0000 0000 ffff ffff
0002530 bfff 0040 0401 0000 0000 0000 0fff 0000
0002540 0000 0000 01ff 0000 0000 0000 0001 0000
0002550 0001 0000 0560 0000 0568 0000 1954 0001
000255f
Get this on to a floppy disk, then try
mount /dev/fd0a /mnt
or equivalent.
This is the minimum needed to reproduce, one byte less results
in an invalid superblock message, as does changing the beginning.
The stack trace below is from single user mode but it breaks/works
anytime.
Note: This also breaks FreeBSD, not sure about anything else.
Fix:
???
Here's the stack trace.
panic: malloc: out of space in kmem_map
Stopped at _Debugger+0x4: leave
db> trace
_Debugger(13,fadffcc4,f810caea,f810c90f,0) at _Debugger+0x4
_panic(f810c90f,0,200,f9ea3000,f8196390) at _panic+0x46
_malloc(f6f6f6f6,1c,0,f86ffa00,148) at _malloc+0x19a
_ffs_mountfs(f8704d80,f86ffc00,f8705f00,f86ffc00,0) at _ffs_mountfs+0x222
_ffs_mount(f86ffc00,f7bfdf8a,f7bfdeb4,fadffe88,f8705f00) at _ffs_mount+0x3b6
_sys_mount(f8705f00,fadfff88,fadfff80,f7bfdf8a,2) at _sys_mount+0x3b3
_syscall() at _syscall+0x154
--- syscall (number 21) ---
0x1f23:
db>
This is on a current kernel as of 4/15.
my config for this trace:
include "arch/i386/conf/std.i386"
options I586_CPU
options DUMMY_NOPS # speed hack; recommended
maxusers 16 # estimated number of users
options DDB # In kernel debugger
options KTRACE # Trace binaries
file-system FFS # UFS
file-system FDESC # /dev/fd
options FIFO # FIFOs; RECOMMENDED
options GATEWAY # packet forwarding
options INET # IP + ICMP + TCP + UDP
config netbsd root on ? type ?
options PCIVERBOSE # verbose PCI device messages
mainbus0 at root
isa0 at mainbus0
pci0 at mainbus0
pchb* at pci? dev ? function ? # PCI-Host bridges
pcib* at pci? dev ? function ? # PCI-ISA bridges
isa* at pcib? # ISA on PCI-ISA bridge
isa* at mainbus0 # all other ISA
npx0 at isa? port 0xf0 irq 13 # math coprocessor
vt0 at isa? port 0x60 irq 1 # enhanced multiple console device
fdc0 at isa? port 0x3f0 irq 6 drq 2 # standard PC floppy controllers
fd* at fdc? drive ?
wdc0 at isa? port 0x1f0 irq 14 # ST506, ESDI, and IDE controllers
wd* at wdc? drive ?
de* at pci? dev ? function ?
pseudo-device loop 1 # network loopback
(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.