From olivas@digiflux.org  Mon May 19 14:54:17 2003
Return-Path: <olivas@digiflux.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id F3D0D37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 May 2003 14:54:16 -0700 (PDT)
Received: from digiflux.org (43.Red-80-59-151.pooles.rima-tde.net [80.59.151.43])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 63B4F43F85
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 May 2003 14:54:14 -0700 (PDT)
	(envelope-from olivas@digiflux.org)
Received: from digiflux.org (localhost [127.0.0.1])
	by digiflux.org (8.12.9/8.12.9) with ESMTP id h4JLsCuB055090
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 May 2003 23:54:13 +0200 (CEST)
	(envelope-from olivas@digiflux.org)
Received: (from root@localhost)
	by digiflux.org (8.12.9/8.12.8/Submit) id h4JLsCtv055089;
	Mon, 19 May 2003 23:54:12 +0200 (CEST)
Message-Id: <200305192154.h4JLsCtv055089@digiflux.org>
Date: Mon, 19 May 2003 23:54:12 +0200 (CEST)
From: Stacy Olivas <olivas@digiflux.org>
Reply-To: Stacy Olivas <olivas@digiflux.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Kernel panics when mounting floppy on MFS filesystem
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         52445
>Category:       kern
>Synopsis:       [mfs] panic when mounting floppy on MFS filesystem
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 19 15:00:29 PDT 2003
>Closed-Date:    Fri Jan 14 13:53:46 UTC 2011
>Last-Modified:  Fri Jan 14 13:53:46 UTC 2011
>Originator:     Stacy Olivas
>Release:        FreeBSD 5.0-RELEASE-p7 i386
>Organization:
>Environment:
System: FreeBSD digiflux.org 5.0-RELEASE-p7 FreeBSD 5.0-RELEASE-p7 #4: Tue May 13 01:26:44 CEST 2003 olivas@digiflux.org:/usr/src/sys/i386/compile/Sentinel i386


	
>Description:
When building a kernel with an MD_ROOT_SIZE size => 8000 bytes (~7.8 megs), after 
the kernel has successfully loaded, if you subsequently try mounting a floppy 
disk (to a mount point on the MFS) (doesn't matter if it's fresh floppy or 
has some files on it) the kernel panics with the following message:

panic: isa_dmastart: bad bounce buffer

syncing disks, buffers remaining... panic: bwrite: buffer is not busy???

But, for an MFS that is 7000 (~6.8 megs) it works with out a hitch.

This behavior has been reproducable on two different systems with more than 
plenty of memort available.

--

dmesg output of kernel that panics (MD_ROOT_SIZE=8000)
(thank god dmesg is saved between warm boots):

Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 5.0-RELEASE-p7 #1: Fri May 16 15:18:39 CEST 2003
  
olivas@thos.digiflux.org:/usr/src/release/picobsd/warbsd/build_dir-warbsd/PICOBSD-warbsd
Preloaded elf kernel "/kernel" at 0xc0f86000.
Timecounter "i8254" frequency 1193182 Hz
Timecounter "TSC" frequency 360790606 Hz
CPU: AMD-K6(tm) 3D+ Processor (360.79-MHz 586-class CPU)
 Origin = "AuthenticAMD" Id = 0x591 Stepping = 1
 Features=0x8021bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,PGE,MMX>
 AMD Features=0xffffffff80000800<SYSCALL,3DNow!>
real memory = 167772160 (160 MB)
avail memory = 146579456 (139 MB)
Initializing GEOMetry subsystem
K6-family MTRR support enabled (2 registers)
  ACPI-0159: *** Error: AcpiLoadTables: Could not get RSDP, 
AE_NO_ACPI_TABLES
  ACPI-0213: *** Error: AcpiLoadTables: Could not load tables: 
AE_NO_ACPI_TABLES
ACPI: table load failed: AE_NO_ACPI_TABLES
npx0: <math processor> on motherboard
npx0: INT 16 interface
Using $PIR table, 4 entries at 0xc00fdf70
pcib0: <OPTi 82C700 host to PCI bridge> at pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
isab0: <PCI-ISA bridge> at device 1.0 on pci0
isa0: <ISA bus> on isab0
cbb0: <TI1131 PCI-CardBus Bridge> at device 10.0 on pci0
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
pci_cfgintr: 0:10 INTA routed to irq 11
cbb1: <TI1131 PCI-CardBus Bridge> at device 10.1 on pci0
cardbus1: <CardBus bus> on cbb1
pccard1: <16-bit PCCard bus> on cbb1
pci_cfgintr: 0:10 INTB routed to irq 11
pci0: <display, VGA> at device 18.0 (no driver attached)
ohci0: <OPTi 82C861 (FireLink) USB controller> mem 0xfecff000-0xfecfffff irq 
10 at device 19.0 on pci0
usb0: OHCI version 1.0, legacy support
usb0: <OPTi 82C861 (FireLink) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: OPTi OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
atapci0: <Generic PCI ATA controller> port 0xfcf0-0xfcff at device 20.0 on 
pci0
atapci0: Busmastering DMA not supported
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
orm0: <Option ROM> at iomem 0xc0000-0xcbfff on isa0
fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> at port 
0x3f7,0x3f0-0x3f5 irq 6 drq 2 on isa0
isa_dmainit(2, 1024) failed
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x64,0x60 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
unknown: <PNP0303> can't assign resources (port)
speaker0: <PC speaker> at port 0x61 on isa0
psmcpnp0: irq resource info is missing; assuming irq 12
unknown: <PNP0501> can't assign resources (port)
unknown: <PNP0700> can't assign resources (port)
Timecounters tick every 10.000 msec
ipfw2 initialized, divert enabled, rule-based forwarding enabled, default to 
accept, logging limited to 100 packets/entry by default
wi0: <WaveLAN/IEEE> at port 0x100-0x13f irq 11 function 0 config 1 on pccard0
wi0: 802.11 address: 00:90:d1:07:60:ee
wi0: using RF:PRISM2 MAC:HFA3841 CARD:HWB3163 rev.A
wi0: Intersil Firmware: Primary 0.03.00, Station 0.07.06
ad0: 19077MB <IBM-DJSA-220> [38760/16/63] at ata0-master BIOSPIO
acd0: CDROM <TOSHIBA CD-ROM XM-1902B> at ata1-master BIOSPIO
Mounting root from ufs:/dev/md0
<118>May 17 01:37:02 init: /etc/pwd.db: No such file or directory
<118>Enter full pathname of shell or RETURN for /bin/sh: 
<118># 
Waiting (max 60 seconds) for system process `vnlru' to stop...stopped
Waiting (max 60 seconds) for system process `bufdaemon' to stop...stopped
Waiting (max 60 seconds) for system process `syncer' to stop...stopped

syncing disks, buffers remaining... 
done
Uptime: 34s
Rebooting...

----------------

dmesg output of kernel that mounts a floppy disk with no problems 
(MD_ROOTSIZE=7000):

Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 5.0-RELEASE-p7 #2: Fri May 16 15:56:53 CEST 2003
  
olivas@thos.digiflux.org:/usr/src/release/picobsd/warbsd/build_dir-warbsd/PICOBSD-warbsd
Preloaded elf kernel "/kernel" at 0xc0e90000.
Timecounter "i8254" frequency 1193182 Hz
Timecounter "TSC" frequency 360790865 Hz
CPU: AMD-K6(tm) 3D+ Processor (360.79-MHz 586-class CPU)
 Origin = "AuthenticAMD" Id = 0x591 Stepping = 1
 Features=0x8021bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,PGE,MMX>
 AMD Features=0xffffffff80000800<SYSCALL,3DNow!>
real memory = 167772160 (160 MB)
avail memory = 147582976 (140 MB)
Initializing GEOMetry subsystem
K6-family MTRR support enabled (2 registers)
  ACPI-0159: *** Error: AcpiLoadTables: Could not get RSDP, 
AE_NO_ACPI_TABLES
  ACPI-0213: *** Error: AcpiLoadTables: Could not load tables: 
AE_NO_ACPI_TABLES
ACPI: table load failed: AE_NO_ACPI_TABLES
npx0: <math processor> on motherboard
npx0: INT 16 interface
Using $PIR table, 4 entries at 0xc00fdf70
pcib0: <OPTi 82C700 host to PCI bridge> at pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
isab0: <PCI-ISA bridge> at device 1.0 on pci0
isa0: <ISA bus> on isab0
cbb0: <TI1131 PCI-CardBus Bridge> at device 10.0 on pci0
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
pci_cfgintr: 0:10 INTA routed to irq 11
cbb1: <TI1131 PCI-CardBus Bridge> at device 10.1 on pci0
cardbus1: <CardBus bus> on cbb1
pccard1: <16-bit PCCard bus> on cbb1
pci_cfgintr: 0:10 INTB routed to irq 11
pci0: <display, VGA> at device 18.0 (no driver attached)
ohci0: <OPTi 82C861 (FireLink) USB controller> mem 0xfecff000-0xfecfffff irq 
10 at device 19.0 on pci0
usb0: OHCI version 1.0, legacy support
usb0: <OPTi 82C861 (FireLink) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: OPTi OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
atapci0: <Generic PCI ATA controller> port 0xfcf0-0xfcff at device 20.0 on 
pci0
atapci0: Busmastering DMA not supported
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
orm0: <Option ROM> at iomem 0xc0000-0xcbfff on isa0
pmtimer0 on isa0
fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> at port 
0x3f7,0x3f0-0x3f5 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x64,0x60 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
unknown: <PNP0303> can't assign resources (port)
speaker0: <PC speaker> at port 0x61 on isa0
psmcpnp0: irq resource info is missing; assuming irq 12
unknown: <PNP0501> can't assign resources (port)
unknown: <PNP0700> can't assign resources (port)
Timecounters tick every 10.000 msec
WARNING: apm_saver module requires apm enabled
ipfw2 initialized, divert enabled, rule-based forwarding enabled, default to 
accept, logging limited to 100 packets/entry by default
wi0: <WaveLAN/IEEE> at port 0x100-0x13f irq 11 function 0 config 1 on pccard0
wi0: 802.11 address: 00:90:d1:07:60:ee
wi0: using RF:PRISM2 MAC:HFA3841 CARD:HWB3163 rev.A
wi0: Intersil Firmware: Primary 0.03.00, Station 0.07.06
ad0: 19077MB <IBM-DJSA-220> [38760/16/63] at ata0-master BIOSPIO
acd0: CDROM <TOSHIBA CD-ROM XM-1902B> at ata1-master BIOSPIO
Mounting root from ufs:/dev/md0
<118>May 17 01:38:24 init: /etc/pwd.db: No such file or directory
<118>Enter full pathname of shell or RETURN for /bin/sh: 
<118># 
<118>

--------------

A diff of the two dmesg outputs:

diff dmesg2 dmesg1

dmesg1=kernel that panics
dmesg2=kernel that does not panic

4c4
< FreeBSD 5.0-RELEASE-p7 #1: Fri May 16 15:18:39 CEST 2003
---
> FreeBSD 5.0-RELEASE-p7 #2: Fri May 16 15:56:53 CEST 2003
6c6
< Preloaded elf kernel "/kernel" at 0xc0f86000.
---
> Preloaded elf kernel "/kernel" at 0xc0e90000.
8c8
< Timecounter "TSC" frequency 360790606 Hz
---
> Timecounter "TSC" frequency 360790865 Hz
14c14
< avail memory = 146579456 (139 MB)
---
> avail memory = 147582976 (140 MB)
46a47
> pmtimer0 on isa0
48d48
< isa_dmainit(2, 1024) failed
68a69
> WARNING: apm_saver module requires apm enabled
77c78
< <118>May 17 01:37:02 init: /etc/pwd.db: No such file or directory
---
> <118>May 17 01:38:24 init: /etc/pwd.db: No such file or directory
80,87c81
< Waiting (max 60 seconds) for system process `vnlru' to stop...stopped
< Waiting (max 60 seconds) for system process `bufdaemon' to stop...stopped
< Waiting (max 60 seconds) for system process `syncer' to stop...stopped
< 
< syncing disks, buffers remaining... 
< done
< Uptime: 34s
< Rebooting...
---
> <118>

As you can see, in the kernel that panics, isa_dmainit gives an error.

>How-To-Repeat:

Build a kernel using the config using the following config file.   Set the MD_ROOT_SIZE to
8000 or greater (build this using the picobsd build scripts).  Bootup the new system and
try to mount /dev/fd0 to a mount point on the MFS filesystem.  Note: Make sure you 
replace the PICOBSD.hints file with the GENERIC.hints file!

My current test kernel config file follows:

#
# $FreeBSD: src/release/picobsd/net/PICOBSD,v 1.14 2002/03/15 08:46:18 luigi 
Exp $
#
#Line starting with #PicoBSD contains PicoBSD build parameters
#marker    def_sz init  MFS_inodes   floppy_inodes
#PicoBSD    7000  init  4096      32768
options MD_ROOT_SIZE=7000   # same as def_sz

hints "PICOBSD.hints"
machinei386
#cpuI386_CPU
cpuI486_CPU
cpuI586_CPU
cpuI686_CPU
identWarBSD
maxusers0

optionsINET#InterNETworking
#optionsINET6
#optionsSOFTUPDATES
#optionsUFS_DIRHASH
#optionsUFS_ACL
optionsMSDOSFS
optionsMD_ROOT
optionsSYSVSHM
optionsSYSVMSG
optionsSYSVSEM
options_KPOSIX_PRIORITY_SCHEDULING
optionsKBD_INSTALL_CDEV
optionsFFS#Berkeley Fast Filesystem
optionsNFSCLIENT#Network Filesystem
optionsMD_ROOT#MFS as root
optionsMSDOSFS#MSDOS Filesystem
optionsNTFS
optionsCD9660#ISO 9660 Filesystem
optionsPSEUDOFS
optionsPROCFS
optionsCOMPAT_43#Compatible with BSD 4.3 [KEEP THIS!]
optionsCOMPAT_FREEBSD4
#options     COMPAT_OLDISA  #Use ISA shims and glue for old drivers

# Support for bridging and bandwidth limiting
#optionsDUMMYNET
#optionsBRIDGE

#optionsINVARIANTS
#optionsINVARIANT_SUPPORT
#optionsWITNESS
#optionsWITNESS_SKIPSPIN

deviceisa
deviceeisa
devicepci
devicemca

device acpi

devicefdc
#optionsFDC_DEBUG

device ata
device     atadisk
device     atapicd
deviceatapifd
        
options     ATA_STATIC_ID      #Static device numbering

# atkbdc0 controls both the keyboard and the PS/2 mouse
deviceatkbdc
deviceatkbd
device psm
devicevga
devicesplash
deviceblank_saver
deviceagp
deviceapm
devicepmtimer

# syscons is the default console driver, resembling an SCO console
devicesc

devicenpx

devicesio

devicescbus
deviceda
deviceppbus
#deviceppc
devicelpt
#deviceplip
#deviceppi

deviceuhci
deviceohci
deviceusb
deviceugen
#deviceuhid
deviceukbd
#deviceulpt
deviceumass
#deviceums
#deviceaue
#devicecue
#devicekue


#PCCARD (PCMCIA) Support
devicecbb
devicepccard
devicecardbus

#oldcard pcmcia bus
#devicecard2
#devicepcic

#Serial ports
devicesio

# PCI Ethernet NICs.
device     de       # DEC/Intel DC21x4x (``Tulip'')
device     em       # Intel PRO/1000 adapter Gigabit Ethernet Card
device     txp       # 3Com 3cR990 (``Typhoon'')
device     vx       # 3Com 3c590, 3c595 (``Vortex'')

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device     miibus     # MII bus support
device     dc       # DEC/Intel 21143 and various workalikes
device     fxp       # Intel EtherExpress PRO/100B (82557, 82558)
device     pcn       # AMD Am79C97x PCI 10/100 (precedence over 
'lnc')
device     rl       # RealTek 8129/8139
device     sf       # Adaptec AIC-6915 (``Starfire'')
device     sis       # Silicon Integrated Systems SiS 900/SiS 7016
device     ste       # Sundance ST201 (D-Link DFE-550TX)
device     tl       # Texas Instruments ThunderLAN
device     tx       # SMC EtherPower II (83c170 ``EPIC'')
device     vr       # VIA Rhine, Rhine II
device     wb       # Winbond W89C840F
device     xl       # 3Com 3c90x (``Boomerang'', ``Cyclone'')
device     bge       # Broadcom BCM570xx Gigabit Ethernet

# ISA Ethernet NICs. pccard nics included.
device     cs       # Crystal Semiconductor CS89x0 NIC
# 'device ed' requires 'device miibus'
device     ed       # NE[12]000, SMC Ultra, 3c503, DS8390 cards
device     ex       # Intel EtherExpress Pro/10 and Pro/10+
#device     ep       # Etherlink III based cards
device     fe       # Fujitsu MB8696x based cards
device     lnc       # NE2100, NE32-VL Lance Ethernet cards
device     sn       # SMC's 9000 series of ethernet chips
device     xe       # Xircom pccard ethernet

# ISA devices that use the old ISA shims
#device     le

# Wireless NIC cards
device     an       # Aironet 4500/4800 802.11 wireless NICs.
device     awi       # BayStack 660 and others
device     wi       # WaveLAN/Intersil/Symbol 802.11 wireless 
NICs.
#device     wl       # Older non 802.11 Wavelan wireless NIC.

devicerandom
deviceloop
deviceether
device sl
devicetun
#devicevn
devicepty
devicemd
#devicegzip# Exec gzipped a.out's
devicebpf
devicespeaker
#devicegif
#devicefaith

optionsIPFIREWALL
optionsIPFIREWALL_VERBOSE
optionsIPFIREWALL_FORWARD
optionsIPFIREWALL_VERBOSE_LIMIT=100
optionsIPFIREWALL_DEFAULT_TO_ACCEPT
optionsIPDIVERT
#optionsIPFILTER
#optionsIPFILTER_LOG
#optionsIPSTEALTH
optionsRANDOM_IP_ID
#optionsACCEPT_FILTER_DATA
optionsPOWERFAIL_NMI

deviceapm_saver


>Fix:

	


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: jh 
State-Changed-When: Sun Dec 12 09:38:04 UTC 2010 
State-Changed-Why:  
Can you still reproduce this on a supported release? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52445 
State-Changed-From-To: feedback->closed 
State-Changed-By: jh 
State-Changed-When: Fri Jan 14 13:53:45 UTC 2011 
State-Changed-Why:  
Feedback timeout. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52445 
>Unformatted:
