Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Nov 1998 11:23:14 +0100 (MET)
From:      Michael Class <michaelc@bbn.hp.com>
To:        current@FreeBSD.ORG
Subject:   SMP-System panics after recent ffs_alloc changes
Message-ID:  <Pine.BSF.4.05.9811141122300.432-100000@pc-micha.mc.hp.com>

next in thread | raw e-mail | index | archive | help
Hello,

the recent changes in vfs_cluster.c, buf.h and ffs_alloc.c cause a
panic on my SMP-System.

This is the commitlog of the changes:

dg          1998/11/12 17:01:45 PST
  
  Modified files:
    sys/kern             vfs_cluster.c
    sys/sys              buf.h
    sys/ufs/ffs          ffs_alloc.c
  Log:
  Restored the "reallocblks" code to its former glory. What this does is
  basically do a on-the-fly defragmentation of the FFS filesystem, changing
  file block allocations to make them contiguous. Thanks to Kirk McKusick
  for providing hints on what needed to be done to get this working.
  
  Revision  Changes    Path
  1.72      +4 -15     src/sys/kern/vfs_cluster.c 
  1.61      +15 -1     src/sys/sys/buf.h
  1.54      +4 -14     src/sys/ufs/ffs/ffs_alloc.c

Backing out these changes solves the problem.

The panic is"ffs_blkfree: bad size"

mp_lock=01000001; cpuid=1; lapic_id=01000000

This is the Stacktrace:

#9  0xf014b8ab in panic (fmt=0xf02340b1 "ffs_blkfree: bad size")
    at ../../kern/kern_shutdown.c:428
#10 0xf01cd75a in ffs_blkfree (ip=0xf0b94600, bno=231, size=8192)
    at ../../ufs/ffs/ffs_alloc.c:1300
#11 0xf01cc0b4 in ffs_reallocblks (ap=0xf6573e14)
    at ../../ufs/ffs/ffs_alloc.c:523
#12 0xf01692df in cluster_write (bp=0xf34eb208, filesize=3842048)
    at vnode_if.h:1035
#13 0xf01d2ee7 in ffs_write (ap=0xf6573eec)
    at ../../ufs/ufs/ufs_readwrite.c:368
#14 0xf0172be7 in vn_write (fp=0xf0b87600, uio=0xf6573f30, cred=0xf0ba9600)
    at vnode_if.h:331
#15 0xf0153b0a in write (p=0xf64f1a80, uap=0xf6573f84)
    at ../../kern/sys_generic.c:270
#16 0xf01fd53b in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = 134701056, 
      tf_esi = 134600264, tf_ebp = -272642528, tf_isp = -162054188, 
      tf_ebx = 671950492, tf_edx = 134600264, tf_ecx = 0, tf_eax = 4, 
      tf_trapno = 7, tf_err = 2, tf_eip = 671702536, tf_cs = 31, 
      tf_eflags = 518, tf_esp = -272642552, tf_ss = 39})
    at ../../i386/i386/trap.c:1031
#17 0xf01ed02c in Xint0x80_syscall ()


The panic is reproducable with a make -j4 world. I do have a dump!
The System is a Gigabyte SMP-MB 2x 350Mhz P-II, 128MB-RAM.

Here is the output of dmesg:

Copyright (c) 1992-1998 FreeBSD Inc.
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California. All rights reserved.
FreeBSD 3.0-CURRENT #0: Fri Nov 13 15:29:46 MET 1998
    michaelc@pc-micha.mc.hp.com:/usr/src/sys/compile/MCSMP
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium II (quarter-micron) (686-class CPU)
  Origin = "GenuineIntel"  Id = 0x652  Stepping=2
  Features=0x183fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,<b24>>
real memory  = 134217728 (131072K bytes)
config> quit
avail memory = 127606784 (124616K bytes)
Programming 24 pins in IOAPIC #0
FreeBSD/SMP: Multiprocessor motherboard
 cpu0 (BSP): apic id:  0, version: 0x00040011, at 0xfee00000
 cpu1 (AP):  apic id:  1, version: 0x00040011, at 0xfee00000
 io0 (APIC): apic id:  2, version: 0x00170011, at 0xfec00000
Preloaded elf kernel "kernel" at 0xf02c1000.
Probing for devices on PCI bus 0:
chip0: <Intel 82443BX host to PCI bridge> rev 0x02 on pci0.0.0
chip1: <Intel 82443BX host to AGP bridge> rev 0x02 on pci0.1.0
chip2: <Intel 82371AB PCI to ISA bridge> rev 0x02 on pci0.7.0
chip3: <Intel 82371AB USB host controller> rev 0x01 int d irq 255 on pci0.7.2
chip4: <Intel 82371AB Power management controller> rev 0x02 on pci0.7.3
vga0: <Matrox MGA 2164W graphics accelerator> rev 0x00 int a irq 16 on pci0.8.0
ed1: <NE2000 PCI Ethernet (Winbond W89C940)> rev 0x39 int a irq 17 on pci0.9.0
ed1: address 90:00:30:00:52:54, type NE2000 (16 bit) 
ahc0: <Adaptec aic7895 Ultra SCSI adapter> rev 0x04 int a irq 16 on pci0.12.0
ahc0: aic7895 Wide Channel A, SCSI Id=7, 16/255 SCBs
ahc1: <Adaptec aic7895 Ultra SCSI adapter> rev 0x04 int b irq 16 on pci0.12.1
ahc1: Using left over BIOS settings
ahc1: aic7895 Wide Channel B, SCSI Id=7, 16/255 SCBs
Probing for devices on PCI bus 1:
Probing for PnP devices:
CSN 1 Vendor ID: CTL0048 [0x48008c0e] Serial 0x00044475 Comp ID: PNP0600 [0x0006d041]
pcm1 (SB16pnp <SB16 PnP> sn 0x00044475) at 0x220-0x22f irq 5 drq 1 flags 0x15 on isa
Probing for devices on the ISA bus:
sc0 at 0x60-0x6f irq 1 on motherboard
sc0: VGA color <16 virtual consoles, flags=0x0>
ed0 not found at 0x280
sio0 at 0x3f8-0x3ff irq 4 flags 0x10 on isa
sio0: type 16550A
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16550A
sio2 at 0x3e8-0x3ef irq 9 on isa
sio2: type 16550A
ppc: parallel port found at 0x378
ppc0 at 0x378 irq 7 on isa
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
nlpt0: <generic printer> on ppbus 0
nlpt0: Interrupt-driven port
psm0 at 0x60-0x64 irq 12 on motherboard
psm0: model Generic PS/2 mouse, device ID 0
fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
fdc0: FIFO enabled, 8 bytes threshold
fd0: 1.44MB 3.5in
npx0 on motherboard
npx0: INT 16 interface
APIC_IO: Testing 8254 interrupt delivery
APIC_IO: routing 8254 via pin 2
IP packet filtering initialized, divert enabled, rule-based forwarding disabled, default to accept, logging limited to 100 packets/entry
Waiting 10 seconds for SCSI devices to settle
SMP: AP CPU #1 Launched!
sa0 at ahc0 bus 0 target 4 lun 0
sa0: <HP C1533A A612> Removable Sequential Access SCSI2 device 
sa0: 10.0MB/s transfers (10.0MHz, offset 15)
da1 at ahc1 bus 0 target 1 lun 0
da1: <Quantum XP34300W L915> Fixed Direct Access SCSI2 device 
da1: 20.0MB/s transfers (10.0MHz, offset 8, 16bit), Tagged Queueing Enabled
da1: 4101MB (8399520 512 byte sectors: 64H 32S/T 4101C)
da0 at ahc1 bus 0 target 0 lun 0
da0: <MICROP 3391WS X502> Fixed Direct Access SCSI2 device 
da0: 40.0MB/s transfers (20.0MHz, offset 8, 16bit), Tagged Queueing Enabled
da0: 8681MB (17780058 512 byte sectors: 64H 32S/T 8681C)
cd0 at ahc0 bus 0 target 5 lun 0
cd0: <TOSHIBA CD-ROM XM-3701TA 3615> Removable CD-ROM SCSI2 device 
cd0: 4.901MB/s transfers (4.901MHz, offset 15)
cd0: cd present [328222 x 2048 byte records]
changing root device to da0s2a


And the output of mptable:

===============================================================================

MPTable, version 2.0.15

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

MP Floating Pointer Structure:

  location:                     BIOS
  physical address:             0x000f5a60
  signature:                    '_MP_'
  length:                       16 bytes
  version:                      1.1
  checksum:                     0x80
  mode:                         Virtual Wire

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

MP Config Table Header:

  physical address:             0x000f1400
  signature:                    'PCMP'
  base table length:            300
  version:                      1.1
  checksum:                     0xf9
  OEM ID:                       'OEM00000'
  Product ID:                   'PROD00000000'
  OEM table pointer:            0x00000000
  OEM table size:               0
  entry count:                  29
  local APIC address:           0xfee00000
  extended table length:        0
  extended table checksum:      0

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

MP Config Base Table Entries:

--
Processors:     APIC ID Version State           Family  Model   Step    Flags
                 0       0x11    BSP, usable     6       5       2       0xfbff
                 1       0x11    AP, usable      6       5       2       0xfbff
--
Bus:            Bus ID  Type
                 0       PCI   
                 1       PCI   
                 2       ISA   
--
I/O APICs:      APIC ID Version State           Address
                 2       0x11    usable          0xfec00000
--
I/O Ints:       Type    Polarity    Trigger     Bus ID   IRQ    APIC ID PIN#
                ExtINT   conforms    conforms        2     0          2    0
                INT      conforms    conforms        2     1          2    1
                INT      conforms    conforms        2     0          2    2
                INT      conforms    conforms        2     3          2    3
                INT      conforms    conforms        2     4          2    4
                INT      conforms    conforms        2     5          2    5
                INT      conforms    conforms        2     6          2    6
                INT      conforms    conforms        2     7          2    7
                INT     active-hi        edge        2     8          2    8
                INT      conforms    conforms        2     9          2    9
                INT      conforms    conforms        2    10          2   10
                INT      conforms    conforms        2    11          2   11
                INT      conforms    conforms        2    12          2   12
                INT      conforms    conforms        2    13          2   13
                INT      conforms    conforms        2    14          2   14
                INT      conforms    conforms        2    15          2   15
                INT     active-lo       level        0   8:A          2   16
                INT     active-lo       level        0   9:A          2   17
                INT     active-lo       level        0  12:A          2   16
                INT     active-lo       level        0  12:B          2   16
                SMI     active-lo        edge        2     0          2   23
--
Local Ints:     Type    Polarity    Trigger     Bus ID   IRQ    APIC ID PIN#
                ExtINT   conforms    conforms        0   0:A        255    0
                NMI      conforms    conforms        0   0:A        255    1

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

# SMP kernel config file options:


# Required:
options         SMP                     # Symmetric MultiProcessor Kernel
options         APIC_IO                 # Symmetric (APIC) I/O

# Optional (built-in defaults will work in most cases):
#options                NCPU=2                  # number of CPUs
#options                NBUS=3                  # number of busses
#options                NAPIC=1                 # number of IO APICs
#options                NINTR=24                # number of INTs

===============================================================================

In this case I was not using softupdates. The panic appears with and without
async mounts of the filesystems.

Michael





-------------------------------------------------------------------------
        michael class, viktor-renner str. 39, 72074 tuebingen, frg
                    E-Mail: michael_class@gmx.net
         Phone: +49 7031 14-3707 (work) +49 7071 81950 (private)
-------------------------------------------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9811141122300.432-100000>