*BSD News Article 92130


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.nacamar.de!fu-berlin.de!news.coli.uni-sb.de!news.dfki.uni-sb.de!news.phil.uni-sb.de!not-for-mail
From: D. Rock <rock@wurzelausix.CS.Uni-SB.DE>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: 2.2.1-RELEASE: panic at floppy access
Date: 26 Mar 1997 17:56:30 GMT
Organization: Universität des Saarlandes
Lines: 147
Message-ID: <5hbo0e$kto$1@pf1.phil.uni-sb.de>
NNTP-Posting-Host: vodix.cs.uni-sb.de
X-Newsreader: TIN [UNIX 1.3 unoff BETA 970222; i86pc SunOS 5.5.1]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:37875

When accessing the floppy drive on this 2.2.1-RELEASE system
(maybe not really "RELEASE": Today fetched the latest sources
via cvsup, tag=RELENG_2_2), the system occasionally crashes.

The error is fairly easy reproductable by first accessing the
drive without a disk inserted, insert disk, do again:
% mdir
... I/O error
[slide in disk]
% mdir
panic: general protection fault

I've searched the mailing lists and found some references from
other people having the same problem, but no fix.

I wasn't able to reproduce this bug on another machine
(also running 2.2-RELEASE). This machine has a "NEC 72065B",
while the other one (which is crashing) has a "NEC 765"

I have saved the kernel crash dump and found the offending
command in kern_malloc.c:
192:            freep->next = savedlist;
193:            if (kbp->kb_last == NULL)
194:                    kbp->kb_last = (caddr_t)freep;
195:    }
196:    va = kbp->kb_next;
kbp->kb_next = 0xffffffff;
197:    kbp->kb_next = ((struct freelist *)va)->next;
                                           ^^ va now out of bounds
198:#ifdef DIAGNOSTIC
199:    freep = (struct freelist *)va;
200:    savedtype = (unsigned)freep->type < M_LAST ?

If someone is interested I can give him the complete crash dump
and additional information.

Thanks,

Daniel

---------
Following the usual boring stuff:

#0  boot (howto=256) at ../../kern/kern_shutdown.c:243
#1  0xf010bd72 in panic (fmt=0xf01832a5 "general protection fault")
    at ../../kern/kern_shutdown.c:367
#2  0xf0183df6 in trap_fatal (frame=0xefbffd2c) at ../../i386/i386/trap.c:742
#3  0xf01836a6 in trap (frame={tf_es = 16, tf_ds = 16, tf_edi = 11, 
      tf_esi = -266590092, tf_ebp = -272630384, tf_isp = -272630444, 
      tf_ebx = -266671708, tf_edx = 58368, tf_ecx = -1, tf_eax = 2048, 
      tf_trapno = 9, tf_err = -258867200, tf_eip = -267351791, 
      tf_cs = -266928120, tf_eflags = 66182, tf_esp = 2048, 
      tf_ss = -2147483648}) at ../../i386/i386/trap.c:440
#4  0xf0108911 in malloc (size=2048, type=82, flags=0)
    at ../../kern/kern_malloc.c:196
#5  0xf0126292 in allocbuf (bp=0xf2acddc4, size=2048)
    at ../../kern/vfs_bio.c:1322
#6  0xf01260a8 in getblk (vp=0xf0af8580, blkno=4, size=2048, slpflag=0, 
    slptimeo=0) at ../../kern/vfs_bio.c:1219
#7  0xf0124bcc in breadn (vp=0xf0af8580, blkno=4, size=2048, 
    rablkno=0xefbffea4, rabsize=0xefbffea0, cnt=1, cred=0x0, bpp=0xefbffe9c)
    at ../../kern/vfs_bio.c:257
#8  0xf0131e15 in spec_read (ap=0xefbffee8)
    at ../../miscfs/specfs/spec_vnops.c:284
#9  0xf016cbe9 in ufsspec_read (ap=0xefbffee8)
    at ../../ufs/ufs/ufs_vnops.c:1882
#10 0xf012eb41 in vn_read (fp=0xf0b5a140, uio=0xefbfff34, cred=0xf0b51780)
    at vnode_if.h:255
#11 0xf0112c17 in read (p=0xf0ad0e00, uap=0xefbfff94, retval=0xefbfff84)
    at ../../kern/sys_generic.c:116
#12 0xf018408f in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = 94336, 
      tf_esi = 512, tf_ebp = 0, tf_isp = -272629788, tf_ebx = 512, 
      tf_edx = 94336, tf_ecx = 76604, tf_eax = 3, tf_trapno = 12, tf_err = 7, 
      tf_eip = 134706529, tf_cs = 31, tf_eflags = 582, tf_esp = -272645072, 
      tf_ss = 39}) at ../../i386/i386/trap.c:890

Output of dmesg:
FreeBSD 2.2.1-RELEASE #1: Wed Mar 26 18:01:01 MET 1997
    root@lunix:/export/usr/src/sys/compile/ROCK
CPU: i486DX (486-class CPU)
real memory  = 16777216 (16384K bytes)
avail memory = 14974976 (14624K bytes)
Probing for devices on the ISA bus:
sc0 at 0x60-0x6f irq 1 on motherboard
sc0: VGA color <16 virtual consoles, flags=0x0>
ed0 at 0x300-0x31f irq 5 maddr 0xca000 msize 8192 on isa
ed0: address 00:00:c0:de:49:25, type WD8003EP (8 bit) 
lpt0 at 0x378-0x37f irq 7 on isa
lpt0: Interrupt-driven port
lp0: TCP/IP capable interface
sio0 at 0x3f8-0x3ff irq 4 on isa
sio0: type 16450
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16450
pca0 on motherboard
pca0: PC speaker audio driver
wdc0 at 0x1f0-0x1f7 irq 14 flags 0x80ff on isa
wdc0: unit 0 (wd0): <QUANTUM LP240A GM240A01X>, 32-bit, multi-block-8
wd0: 234MB (479349 sectors), 723 cyls, 13 heads, 51 S/T, 512 B/S
fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
fdc0: NEC 765
fd0: 1.44MB 3.5in
fd1: 1.2MB 5.25in
npx0 on motherboard
npx0: INT 16 interface
WARNING: / was not properly dismounted.

My configuration file:
machine         "i386"
cpu             "I486_CPU"
ident           ROCK
maxusers        16
config          kernel  root on wd0
options         "COMPAT_43"
options         SYSVSHM
options         SYSVSEM
options         SYSVMSG
options         KTRACE                  #kernel tracing
options         UCONSOLE
options         USERCONFIG              #boot -c editor
options         VISUAL_USERCONFIG       #visual boot -c editor
options         INET                    #Internet communications protocols
pseudo-device   ether                   #Generic Ethernet
pseudo-device   loop                    #Network loopback device
options         MROUTING                # Multicast routing
options         FFS                     #Fast filesystem
options         NFS                     #Network File System
options         NFS_NOSERVER            #Disable the NFS-server code.
options         PROCFS                  #Process filesystem
pseudo-device   pty     32      #Pseudo ttys - can go as high as 256
pseudo-device   speaker         #Play IBM BASIC-style noises out your speaker
pseudo-device   log             #Kernel syslog interface (/dev/klog)
controller      isa0
options         "AUTO_EOI_1"
device          sc0     at isa? port "IO_KBD" tty irq 1 vector scintr
device          npx0    at isa? port "IO_NPX" iosiz 0x0 flags 0x0 irq 13 vector npxintr
controller      wdc0    at isa? port "IO_WD1" bio irq 14 flags 0x80ff vector wdintr
disk            wd0     at wdc0 drive 0
controller      fdc0    at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
disk            fd0     at fdc0 drive 0
disk            fd1     at fdc0 drive 1
device          lpt0    at isa? port? tty irq 7 vector lptintr
device          sio0    at isa? port "IO_COM1" tty irq 4 vector siointr
device          sio1    at isa? port "IO_COM2" tty irq 3 vector siointr
device          ed0     at isa? port 0x300 net irq ? iomem 0xca000 vector edintr
device          pca0    at isa? port IO_TIMER1 tty