Kenrel panic in bus_dmamem_alloc()

Sibananda Sahu sibananda.sahu at avagotech.com
Thu Mar 12 12:31:12 UTC 2015


Hi,



Recently I was working with the mrsas(4) driver and found that after
several operations when I unload and reload the driver the kernel was
entering into panic at the bus_dmamem_alloc() call.



I have attached the core.txt file.



Below is the Back trace info:



Unread portion of the kernel message buffer:

AVAGO MegaRAID SAS FreeBSD mrsas driver version: 06.708.09.00

mrsas0: <AVAGO Invader SAS Controller> port 0xfc00-0xfcff mem
0xdf2f0000-0xdf2fffff,0xdf300000-0xdf3fffff irq 32 at device 0.0 on pci5

mrsas0: Waiting for FW to come to ready state

mrsas0: FW now in Ready state

mrsas0: Using MSI-X with 4 number of vectors

mrsas0: FW supports <96> MSIX vector,Online CPU 4 Current MSIX <4>

mrsas0: Avago Debug: MAX sge 0x106 MAX chain frame size 0x1000

mrsas0: Allocating ver buf memory size 256

mrsas0: Allocating IO req memory 237824

mrsas0: Allocating chain frame memory 3796992





Fatal trap 9: general protection fault while in kernel mode

cpuid = 2; apic id = 32

instruction pointer          = 0x20:0xffffffff80ae16f3

stack pointer              = 0x28:0xfffffe01213d41d0

frame pointer            = 0x28:0xfffffe01213d4240

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                                = 1406 (kldload)



Error while mapping shared library sections:

./mrsas.ko: No such file or directory.

Reading symbols from /boot/kernel/ums.ko.symbols...done.

Loaded symbols for /boot/kernel/ums.ko.symbols

Reading symbols from /boot/kernel/uftdi.ko.symbols...done.

Loaded symbols for /boot/kernel/uftdi.ko.symbols

Reading symbols from /boot/kernel/ucom.ko.symbols...done.

Loaded symbols for /boot/kernel/ucom.ko.symbols

Error while reading shared library symbols:

./mrsas.ko: No such file or directory.

#0  doadump (textdump=0) at pcpu.h:219

219         pcpu.h: No such file or directory.

                in pcpu.h

(kgdb) #0  doadump (textdump=0) at pcpu.h:219

#1  0xffffffff8033f5ae in db_dump (dummy=<value optimized out>, dummy2=0,

    dummy3=0, dummy4=0x0) at /usr/src/sys/ddb/db_command.c:543

#2  0xffffffff8033f08d in db_command (cmd_table=<value optimized out>)

    at /usr/src/sys/ddb/db_command.c:449

#3  0xffffffff8033ee04 in db_command_loop ()

    at /usr/src/sys/ddb/db_command.c:502

#4  0xffffffff80341720 in db_trap (type=<value optimized out>, code=0)

    at /usr/src/sys/ddb/db_main.c:231

#5  0xffffffff808b9bc3 in kdb_trap (type=9, code=0, tf=<value optimized
out>)

    at /usr/src/sys/kern/subr_kdb.c:656

#6  0xffffffff80c4b442 in trap_fatal (frame=0xfffffe01213d4120,

    eva=<value optimized out>) at /usr/src/sys/amd64/amd64/trap.c:877

#7  0xffffffff80c4b0bf in trap (frame=<value optimized out>)

    at /usr/src/sys/amd64/amd64/trap.c:224

#8  0xffffffff80c32d02 in calltrap ()

    at /usr/src/sys/amd64/amd64/exception.S:232

#9  0xffffffff80ae16f3 in vm_reserv_alloc_contig
(object=0xffffffff8166d9c8,

    pindex=<value optimized out>, npages=<value optimized out>, low=0,

    high=18446735281027570048, alignment=<value optimized out>,

    boundary=<value optimized out>) at /usr/src/sys/vm/vm_reserv.c:252

#10 0xffffffff80ada2ee in vm_page_alloc_contig (object=0xffffffff8166d9c8,

    pindex=1183744, req=546, npages=927, low=0, high=4294967295,

    memattr=<value optimized out>) at /usr/src/sys/vm/vm_page.c:1741

#11 0xffffffff80acc153 in kmem_alloc_contig (vmem=0xffffffff8144bd80,

    size=3796992, flags=1, low=0, high=4294967295, alignment=4)

    at /usr/src/sys/vm/vm_kern.c:239

#12 0xffffffff80d454cd in bus_dmamem_alloc (dmat=0xfffff80099ba3480,

    vaddr=0xfffffe00019aa0b8, flags=<value optimized out>,

    mapp=0xfffffe00019aa0b0) at /usr/src/sys/x86/x86/busdma_machdep.c:551

#13 0xffffffff81a2500b in ?? ()

#14 0x0000000000000000 in ?? ()

Current language:  auto; currently minimal

(kgdb)





Can anybody suggest me what might have gone wrong so this disaster
happened???



Thanks,

Sibananda Sahu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: core.txt.3
Type: application/octet-stream
Size: 102243 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20150312/277b4251/attachment.obj>


More information about the freebsd-hackers mailing list