kern/94890: Fatal trap 18: integer divide fault while in kernel mode

Charlie & root at n11.bmstu.ru
Fri Mar 24 00:30:17 UTC 2006


>Number:         94890
>Category:       kern
>Synopsis:       Fatal trap 18: integer divide fault while in kernel mode
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 24 00:30:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Alexey Sopov <suntechnic at gmail.com>
>Release:        FreeBSD 6.0-RELEASE-p6 amd64
>Organization:
>Environment:
System: FreeBSD database.somehost 6.0-RELEASE-p6 FreeBSD 6.0-RELEASE-p6 #2: Thu Mar 23 23:59:49 MSK 2006 root at database.somehost:/usr/obj/usr/src/sys/database64 amd64

AMD64 + NForce3 based machine with installed samba-3.0.21b,1

FreeBSD 6.0-RELEASE-p6 #2: Thu Mar 23 23:59:49 MSK 2006
    root at database.somehost:/usr/obj/usr/src/sys/database64
MPTable: <TEMPLATE >
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) 64 Processor 3000+ (2009.79-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0xfc0  Stepping = 0
  Features=0x78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,
MMX,FXSR,SSE,SSE2>
  AMD Features=0xe0500800<SYSCALL,NX,MMX+,LM,3DNow+,3DNow>
real memory  = 536608768 (511 MB)
avail memory = 511111168 (487 MB)
ioapic0: Assuming intbase of 0
ioapic0 <Version 1.1> irqs 0-23 on motherboard
cpu0 on motherboard
pcib0: <Host to PCI bridge> pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
isab0: <PCI-ISA bridge> at device 1.0 on pci0
isa0: <ISA bus> on isab0
pci0: <serial bus, SMBus> at device 1.1 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xfebfd000-0xfebfdfff irq 9 at device 2.0 on pci0
ohci0: [GIANT-LOCKED]
usb0: OHCI version 1.0, legacy support
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
ohci1: <OHCI (generic) USB controller> mem 0xfebfe000-0xfebfefff irq 10 at device 2.1 on pci0
ohci1: [GIANT-LOCKED]
usb1: OHCI version 1.0, legacy support
usb1: <OHCI (generic) USB controller> on ohci1
usb1: USB revision 1.0
uhub1: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 4 ports with 4 removable, self powered
pci0: <bridge> at device 5.0 (no driver attached)
pci0: <multimedia, audio> at device 6.0 (no driver attached)
atapci0: <nVidia nForce3 Pro UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xff
af at device 8.0 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
atapci1: <nVidia nForce3 Pro SATA150 controller> port 0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73
,0xc800-0xc80f,0xc400-0xc47f irq 10 at device 10.0 on pci0
ata2: <ATA channel 0> on atapci1
ata3: <ATA channel 1> on atapci1
pcib1: <PCI-PCI bridge> at device 11.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
pcib2: <PCI-PCI bridge> at device 14.0 on pci0
pci2: <PCI bus> on pcib2
fxp0: <Intel 82559 Pro/100 Ethernet> port 0xbc00-0xbc3f mem 0xfeaff000-0xfeafffff,0xfe900000-0xfe9fff
ff irq 4 at device 7.0 on pci2
miibus0: <MII bus> on fxp0
inphy0: <i82555 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: Ethernet address: 00:90:27:a7:11:4b
orm0: <ISA Option ROMs> at iomem 0xc0000-0xcf7ff,0xcf800-0xd0fff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
uhid0: American Power Conversion Back-UPS 500 FW: 6.2.I USB FW: c1, rev 1.10/1.00, addr 2, iclass 3/0
Timecounter "TSC" frequency 2009790508 Hz quality 800
Timecounters tick every 0.976 msec
ad4: 157066MB <HDS722516VLSA80 V34OA63A> at ata2-master SATA150
ad6: 157066MB <HDS722516VLSA80 V34OA63A> at ata3-master SATA150
Trying to mount root from ufs:/dev/ad4s1a
WARNING: / was not properly dismounted
/: mount pending error: blocks 4 files 1
WARNING: /tmp was not properly dismounted
WARNING: /usr was not properly dismounted
WARNING: /var was not properly dismounted
WARNING: /video1 was not properly dismounted
WARNING: /video2 was not properly dismounted
fxp0: Microcode loaded, int_delay: 1000 usec  bundle_max: 6
fxp0: Microcode loaded, int_delay: 1000 usec  bundle_max: 6

=============Kernel config==============
machine         amd64
cpu             HAMMER
ident           database64


makeoptions    DEBUG=-g                #Build kernel with gdb(1) debug symbols
options  KDB
options         KDB_UNATTENDED
options  DDB
options  BREAK_TO_DEBUGGER

options         SCHED_4BSD              # 4BSD scheduler
options         INET                    # InterNETworking
options         FFS                     # Berkeley Fast Filesystem
options         SOFTUPDATES             # Enable FFS soft updates support
options         UFS_DIRHASH             # Improve performance on big directories
options         GEOM_GPT                # GUID Partition Tables.
options         COMPAT_IA32             # Compatible with i386 binaries
options         COMPAT_FREEBSD4         # Compatible with FreeBSD4
options         SCSI_DELAY=15000        # Delay (in ms) before probing SCSI
options         SYSVSHM                 # SYSV-style shared memory
options         SYSVMSG                 # SYSV-style message queues
options         SYSVSEM                 # SYSV-style semaphores
options         _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
                                        # output.  Adds ~128k to driver.
                                        # output.  Adds ~215k to driver.
options         ADAPTIVE_GIANT          # Giant mutex is adaptive.

device          atpic           # 8259A compatability
device          mptable

options         HZ=1024

device          isa
device          pci

device          ata
device          atadisk         # ATA disk drives
options         ATA_STATIC_ID   # Static device numbering

device          atkbdc          # AT keyboard controller
device          atkbd           # AT keyboard

device          vga             # VGA video card driver

device          splash          # Splash screen and screen saver support

device          sc


device          ppbus           # Parallel port bus (required)


device          miibus          # MII bus support
device          fxp             # Intel EtherExpress PRO/100B (82557, 82558)

device          loop            # Network loopback
device          mem             # Memory and kernel memory devices
device          io              # I/O device
device          random          # Entropy device
device          ether           # Ethernet support
device          pty             # Pseudo-ttys (telnet etc)

device          bpf             # Berkeley packet filter

device          ohci            # OHCI PCI->USB interface
device          usb             # USB Bus (required)
device          ugen            # Generic
device          uhid            # "Human Interface Devices"
================Kernel config=====================

database# pciconf -lv
hostb0 at pci0:0:0:        class=0x060000 card=0x813f1043 chip=0x00e110de rev=0xa1 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'nforce3 CPU to PCI Bridge'
    class    = bridge
    subclass = HOST-PCI
isab0 at pci0:1:0: class=0x060100 card=0x813f1043 chip=0x00e010de rev=0xa2 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'nForce3 CPU to ISA Bridge'
    class    = bridge
    subclass = PCI-ISA
none0 at pci0:1:1: class=0x0c0500 card=0x813f1043 chip=0x00e410de rev=0xa1 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'nForce PCI SMB Controller'
    class    = serial bus
    subclass = SMBus
ohci0 at pci0:2:0: class=0x0c0310 card=0x813f1043 chip=0x00e710de rev=0xa1 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'nForce OHCI USB Controller'
    class    = serial bus
    subclass = USB
ohci1 at pci0:2:1: class=0x0c0310 card=0x813f1043 chip=0x00e710de rev=0xa1 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'nForce OHCI USB Controller'
    class    = serial bus
    subclass = USB
none1 at pci0:5:0: class=0x068000 card=0x80a71043 chip=0x00df10de rev=0xa2 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'Network Bus Enumerator'
    class    = bridge
none2 at pci0:6:0: class=0x040100 card=0x812a1043 chip=0x00ea10de rev=0xa1 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'nForce AC'97 Audio Codec Interface'
    class    = multimedia
    subclass = audio
atapci0 at pci0:8:0:       class=0x01018a card=0x813f1043 chip=0x00e510de rev=0xa2 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'nForce ATA Controller'
    class    = mass storage
    subclass = ATA
atapci1 at pci0:10:0:      class=0x010185 card=0x813f1043 chip=0x00e310de rev=0xa2 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'nforce SATA Controller'
    class    = mass storage
    subclass = ATA
pcib1 at pci0:11:0:        class=0x060400 card=0x00000000 chip=0x00e210de rev=0xa2 hdr=0x01
    vendor   = 'NVIDIA Corporation'
    device   = 'nForce3 PCI to AGP Bridge'
    class    = bridge
    subclass = PCI-PCI
pcib2 at pci0:14:0:        class=0x060400 card=0x00000000 chip=0x00ed10de rev=0xa2 hdr=0x01
    vendor   = 'NVIDIA Corporation'
    device   = 'nForce PCI to PCI Bridge'
    class    = bridge
    subclass = PCI-PCI
hostb1 at pci0:24:0:       class=0x060000 card=0x00000000 chip=0x11001022 rev=0x00 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron HyperTransport Technology Configuration'
    class    = bridge
    subclass = HOST-PCI
hostb2 at pci0:24:1:       class=0x060000 card=0x00000000 chip=0x11011022 rev=0x00 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron Address Map'
    class    = bridge
    subclass = HOST-PCI
hostb3 at pci0:24:2:       class=0x060000 card=0x00000000 chip=0x11021022 rev=0x00 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron DRAM Controller'
    class    = bridge
    subclass = HOST-PCI
hostb4 at pci0:24:3:       class=0x060000 card=0x00000000 chip=0x11031022 rev=0x00 hdr=0x00
    vendor   = 'Advanced Micro Devices (AMD)'
    device   = 'Athlon 64 / Opteron Miscellaneous Control'
    class    = bridge
    subclass = HOST-PCI
none3 at pci1:0:0: class=0x030000 card=0x00000000 chip=0x018110de rev=0xc1 hdr=0x00
    vendor   = 'NVIDIA Corporation'
    device   = 'NV18B NVIDIA GeForce MX440 with AGP8X'
    class    = display
    subclass = VGA
fxp0 at pci2:7:0:  class=0x020000 card=0x000c8086 chip=0x12298086 rev=0x08 hdr=0x00
    vendor   = 'Intel Corporation'
    device   = '82550/1/7/8/9 EtherExpress PRO/100(B) Ethernet Adapter'
    class    = network
    subclass = ethernet


database# mount
/dev/ad4s1a on / (ufs, local, noatime, soft-updates)
devfs on /dev (devfs, local)
/dev/ad4s1d on /tmp (ufs, local, noatime, soft-updates)
/dev/ad4s1f on /usr (ufs, local, noatime, soft-updates)
/dev/ad4s1e on /var (ufs, local, noatime, soft-updates)
/dev/ad4s1g on /video1 (ufs, local, noatime, soft-updates)
/dev/ad6s1d on /video2 (ufs, local, noatime, soft-updates)

database# df -hl
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad4s1a    124M     69M     45M    61%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/ad4s1d    124M     90K    114M     0%    /tmp
/dev/ad4s1f    7.7G    2.8G    4.3G    39%    /usr
/dev/ad4s1e    124M     11M    103M    10%    /var
/dev/ad4s1g    143G     24K    132G     0%    /video1
/dev/ad6s1d    152G     16K    140G     0%    /video2

Section in smb.conf:
[Video]
   comment = Video Films
   path = /video1
   public = yes
   write list = noname


>Description:

It works just fine, until I try to connect to it from a Microsoft box
via samba and try to write to /video1 an *.avi file. It panics immediately.

Tried this on 5.5-PRERELEASE and on 6.0-RELEASE, the problem exists.

Fatal trap 18: integer divide fault while in kernel mode
instruction pointer     = 0x8:0xffffffff80270fdc
stack pointer           = 0x10:0xffffffff96613740
frame pointer           = 0x10:0xffffffff966137d0
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 601 (smbd)
Dumping 511 MB (2 chunks)
  chunk 0: 1MB (159 pages) ... ok
  chunk 1: 511MB (130752 pages) 495 479 463 447 431 415 399 383 367 351 335 319 303 287 271 255 239 2
23 207 191 175 159 143 127 111 95 79 63 47 31 15

# kgdb ./kernel.debug /var/crash/vmcore.2
[GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd".

Unread portion of the kernel message buffer:


#0  doadump () at pcpu.h:172
172             __asm __volatile("movq %%gs:0,%0" : "=r" (td));
(kgdb) where
#0  doadump () at pcpu.h:172
#1  0xffffffff80135231 in db_fncall (dummy1=0, dummy2=0, dummy3=0, dummy4=0x0)
    at /usr/src/sys/ddb/db_command.c:492
#2  0xffffffff80135675 in db_command_loop () at /usr/src/sys/ddb/db_command.c:350
#3  0xffffffff80137553 in db_trap (type=-1772014288, code=0) at /usr/src/sys/ddb/db_main.c:221
#4  0xffffffff801e054b in kdb_trap (type=18, code=0, tf=0xffffffff96613690)
    at /usr/src/sys/kern/subr_kdb.c:473
#5  0xffffffff802d064e in trap_fatal (frame=0xffffffff96613690, eva=0)
    at /usr/src/sys/amd64/amd64/trap.c:646
#6  0xffffffff802d0be1 in trap (frame=
      {tf_rdi = 0, tf_rsi = 0, tf_rdx = 4294967295, tf_rcx = 3078815744, tf_r8 = 64, tf_r9 = 50, tf_rax = 3078815744, tf_rbx = -2137489408, tf_rbp = -1772013616, tf_r10 = 95232, tf_r11 = 46979, tf_r12 = -1099502324736, tf_r13 = -1099130308736, tf_r14 = 95231, tf_r15 = -2137489408, tf_trapno = 18, tf_addr = 0, tf_flags = -1099098967040, tf_err = 0, tf_rip = -2144923684, tf_cs = 8, tf_rflags = 68231, tf_rsp = -1772013744, tf_ss = 16}) at /usr/src/sys/amd64/amd64/trap.c:467
#7  0xffffffff802bed1b in calltrap () at /usr/src/sys/amd64/amd64/exception.S:168
#8  0xffffffff80270fdc in ffs_valloc (pvp=0xffffff00149b4ba0, mode=16877, cred=0xffffffff,
    vpp=0xffffffff966137f8) at libkern.h:56
#9  0xffffffff80295511 in ufs_mkdir (ap=0xffffffff966139a0) at /usr/src/sys/ufs/ufs/ufs_vnops.c:1333
#10 0xffffffff802f5fb5 in VOP_MKDIR_APV (vop=0xb7830000, a=0xffffffff966139a0) at vnode_if.c:1251
#11 0xffffffff80233ac3 in kern_mkdir (td=0xffffff00155fc720, path=0x0, segflg=4, mode=493)
    at vnode_if.h:653
#12 0xffffffff802d14b8 in syscall (frame=
      {tf_rdi = 140737488344208, tf_rsi = 493, tf_rdx = 8276224, tf_rcx = 493, tf_r8 = 1, tf_r9 = 1, tf_rax = 136, tf_rbx = 493, tf_rbp = 8499280, tf_r10 = 8218080, tf_r11 = 34371197600, tf_r12 = 140737488344208, tf_r13 = 493, tf_r14 = 0, tf_r15 = 8499280, tf_trapno = 22, tf_addr = 0, tf_flags = 12, tf_err = 2, tf_rip = 34374561596, tf_cs = 43, tf_rflags = 582, tf_rsp = 140737488342584, tf_ss = 35})
    at /usr/src/sys/amd64/amd64/trap.c:787
#13 0xffffffff802beeb8 in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:270
#14 0x0000000800e22f3c in ?? ()
Previous frame inner to this frame (corrupt stack?)
(kgdb) up 8
#8  0xffffffff80270fdc in ffs_valloc (pvp=0xffffff00149b4ba0, mode=16877, cred=0xffffffff,
    vpp=0xffffffff966137f8) at libkern.h:56
56      static __inline u_int min(u_int a, u_int b) { return (a < b ? a : b); }


database# nm /boot/kernel/kernel | grep ffffffff80270
ffffffff80270820 T ffs_freefile
ffffffff80270c30 T ffs_valloc
ffffffff80270bf0 T ffs_vfree

>How-To-Repeat:
Try to map a shared smb volume and to write some large files.

>Fix:
Don't know
	


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list