2010-07-16 09:02:09     page allocation failure crash

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-07-16 09:02:09     page allocation failure crash

svs k (INDIA)

Message: 91345   

 

Hi All,

 

I m currently working in Blackfin BF533 custom board with 2009R1-RC7 toolchain, 2009R1-RC1 distribution.

I have few custom drivers. My custom board has 64MB SDRAM. Still i m getting page allocation failure when i

ran the application. This crash occured after i added a 4M buffer in my application.

 

Previously, when i was working with 2007R1, there was one option in the Kernel menuconfig

CONFIG_NP2. Is this option still available? If so, where to check this? i have attached my Kernel and user

.config  files for your reference. I have optimized kernel as far as possible. Still i m facing the same

problem.

Crash log:

 

Booting kernel from Legacy Image at 01200000 ...

   Image Name:   Linux Kernel and ext2

   Created:      2010-07-16  11:45:44 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3944981 Bytes =  3.8 MB

   Load Address: 00180000

   Entry Point:  0033a944

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 0033a944

Linux version 2.6.28.10-ADI-2009R1-svn0 (user1@Linuxteam) (gcc version 4.1.2 (ADI svn)) #1614 Fri Jul 16 17:14:50 IST 2010

console [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00180000-0x002ad870

  rodata    = 0x002ad870-0x0030c400

  bss       = 0x0030d000-0x0031e7e8

  data      = 0x0031e7e8-0x00332000

    stack   = 0x00330000-0x00332000

  init      = 0x00332000-0x0034d000

  available = 0x0034d000-0x03300000

  rootfs    = 0x03300000-0x03f00000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Boot Mode: 0

Blackfin support (C) 2004-2009 Analog Devices, Inc.

Compiled for ADSP-BF533 Rev 0.6

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 594 MHz core clock and 118 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-back)

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 12954

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=27000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

console handover: boot [early_BFuart0] -> real [ttyBF0]

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 48276k/65536k RAM, (108k init code, 1206k kernel code, 530k data, 1024k dma, 2104k reserved)

Calibrating delay loop... 1179.64 BogoMIPS (lpj=589824)

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (15 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 64 KB (52 KB free)

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin DMA Controller

request_dma() : BEGIN

DMA CHANNEL IS ALLOCATED

request_dma() : END

request_dma() : BEGIN

DMA CHANNEL IS ALLOCATED

request_dma() : END

ezkit_init(): registering device resources

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

NET: Registered protocol family 1

msgmni has been set to 94

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

i2c /dev entries driver

i2c-gpio i2c-gpio.0: using pins 0 (SDA) and 1 (SCL)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 21) is a BFIN-UART

brd: module loaded

Driver 'sd' needs updating - please use bus_type methods

uclinux[mtd]: RAM probe address=0x3300000 size=0xc00000

driver name map_ram <5>Creating 1 MTD partitions on "RAM":

0x00000000-0x00c00000 : "ROMfs"

mtd: Giving out device 0 to ROMfs

Generic platform RAM MTD, (c) 2004 Simtec Electronics

ezkit_gpio-addr-flash: probing 16-bit flash bus

driver name cfi_probe Number of erase regions: 2

Primary Vendor Command Set: 0003 (Intel/Sharp Standard)

Primary Algorithm Table at 0035

Alternative Vendor Command Set: 0000 (None)

No Alternate Algorithm Table

Vcc Minimum:  2.7 V

Vcc Maximum:  3.6 V

Vpp Minimum: 11.4 V

Vpp Maximum: 12.6 V

Typical byte/word write timeout: 16 µs

Maximum byte/word write timeout: 512 µs

Typical full buffer write timeout: 16 µs

Maximum full buffer write timeout: 512 µs

Typical block erase timeout: 1024 ms

Maximum block erase timeout: 8192 ms

Chip erase not supported

Device size: 0x400000 bytes (4 MiB)

Flash Device Interface description: 0x0001

  - x16-only asynchronous interface

Max. bytes in buffer write: 0x8

Number of Erase Block Regions: 2

  Erase Region #0: BlockSize 0x10000 bytes, 63 blocks

  Erase Region #1: BlockSize 0x2000 bytes, 8 blocks

ezkit_gpio-addr-flash: Found 1 x16 devices at 0x0 in 16-bit bank

Intel/Sharp Extended Query Table at 0x0035

Using buffer write method

cfi_cmdset_0001: Erase suspend on write enabled

probing complete

RedBoot partition parsing not available

ezkit_gpio-addr-flash: Using board partition definition

Creating 3 MTD partitions on "ezkit_gpio-addr-flash":

0x00000000-0x00010000 : "bootloader"

mtd: Giving out device 1 to bootloader

0x00010000-0x00300000 : "firmware"

mtd: Giving out device 2 to firmware

0x00300000-0x00400000 : "fs"

mtd: Giving out device 3 to fs

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@5

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

usbcore: registered new interface driver libusual

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Single Core  Loader Module enabled

 

#IR Remote Driver Init#

TCP cubic registered

NET: Registered protocol family 17

drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

mtdblock_open

ok

VFS: Mounted root (ext2 filesystem).

Freeing unused kernel memory: 108k freed

request_dma() : BEGIN

DMA CHANNEL IS ALLOCATED

request_dma() : END

request_dma() : BEGIN

DMA CHANNEL IS ALLOCATED

request_dma() : END

dma_alloc_init: dma_page @ 0x00348000 - 256 pages at 0x03f00000

hostname: not found

[: not found

[: not found

[: not found

[: not found

[: not found

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88   G    /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            -   blackfin.uclinux.org/

\    YP"    `| 8P  `.          -   docs.blackfin.uclinux.org/

/     \.___.d|    .'           -   www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    -   www.analog.com/blackfin

 

Have a lot of fun...

start running application

smsc911x: Driver version 2007-07-13.

eth0: SMSC911x MAC Address: 00:19:52:4e:4b:1c

Vendor ID : Original Value = 0x5d, Received Value = 0x0

Error in Reset1(). Keypad.c

Reset success in Reset1(). Keypad.c

Keypad Module enabled. Keypad.c

LCD Driver Initialised

 

adav803 register major 246

r8a66597_hcd r8a66597_hcd: USB Host Controller

r8a66597_hcd r8a66597_hcd: new USB bus registered, assigned bus number 1

r8a66597_hcd r8a66597_hcd: irq 44, io base 0x20300000

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 2 ports detected

usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: USB Host Controller

usb usb1: Manufacturer: Linux 2.6.28.10-ADI-2009R1-svn0 r8a66597_hcd

usb usb1: SerialNumber: r8a66597_hcd

init: Booting to single user mode

 

 

BusyBox v1.13.4 (2010-07-16 15:51:17 IST) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> ifconfig eth0 172.16.15.47

eth0: SMSC911x/921x identified at 0x20200000, IRQ: 43

eth0: link down

root:/> tftp -g -r My_Appl 172.16.6.156

./My_Appl  &eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

root:/> chmod 777 My_Appl

root:/> ./My_Appl &

216

root:/> My_Appl: page allocation failure. order:13, mode:0x40d0

Hardware Trace:

   0 Target : <0x00183afc> { _dump_stack + 0x0 }

     Source : <0x001b2426> { ___alloc_pages_internal + 0x1b2 } CALL pcrel

   1 Target : <0x001b2426> { ___alloc_pages_internal + 0x1b2 }

     Source : <0x0018f3f6> { _printk + 0x16 } RTS

   2 Target : <0x0018f3f2> { _printk + 0x12 }

     Source : <0x0018fc0e> { _vprintk + 0x132 } RTS

   3 Target : <0x0018fc02> { _vprintk + 0x126 }

     Source : <0xffa00bec> { __common_int_entry + 0xcc } RTI

   4 Target : <0xffa00b8a> { __common_int_entry + 0x6a }

     Source : <0xffa009d8> { _return_from_int + 0x58 } RTS

   5 Target : <0xffa009d8> { _return_from_int + 0x58 }

     Source : <0xffa009ae> { _return_from_int + 0x2e } IF !CC JUMP

   6 Target : <0xffa00980> { _return_from_int + 0x0 }

     Source : <0xffa00b86> { __common_int_entry + 0x66 } CALL pcrel

   7 Target : <0xffa00b84> { __common_int_entry + 0x64 }

     Source : <0xffa00346> { _asm_do_IRQ + 0x62 } RTS

   8 Target : <0xffa0033e> { _asm_do_IRQ + 0x5a }

     Source : <0x0019314c> { __local_bh_enable + 0x40 } RTS

   9 Target : <0x0019310c> { __local_bh_enable + 0x0 }

     Source : <0x00193234> { ___do_softirq + 0x9c } JUMP.L

  10 Target : <0x0019322c> { ___do_softirq + 0x94 }

     Source : <0x00193210> { ___do_softirq + 0x78 } IF !CC JUMP

  11 Target : <0x001931f2> { ___do_softirq + 0x5a }

     Source : <0x001ad0f8> { _rcu_process_callbacks + 0x30 } RTS

  12 Target : <0x001ad0f4> { _rcu_process_callbacks + 0x2c }

     Source : <0x001ad02c> { ___rcu_process_callbacks + 0x15c } RTS

  13 Target : <0x001ad026> { ___rcu_process_callbacks + 0x156 }

     Source : <0x001acf90> { ___rcu_process_callbacks + 0xc0 } IF !CC JUMP

  14 Target : <0x001acf8a> { ___rcu_process_callbacks + 0xba }

     Source : <0x001ad042> { ___rcu_process_callbacks + 0x172 } IF CC JUMP

  15 Target : <0x001ad03e> { ___rcu_process_callbacks + 0x16e }

     Source : <0x001acf7c> { ___rcu_process_callbacks + 0xac } IF !CC JUMP

Stack info:

SP: [0x00427c40] <0x00427c40> /* kernel dynamic memory */

FP: (0x00427cc0)

Memory from 0x00427c40 to 00428000

00427c40:[00000112]<001b242a> 032ddc20  00000112  000040d0  032dde08  0000000d  000040d0

00427c60: 00000001  00000042  00426000  00426000  00000000  000240d0  00426000  00000010

00427c80: 00000000  00000112  00000000  00000000  01425000 <001b2552> 0042e8c0  01424994

00427ca0: 00000003  ffffffda  00000000  00001802  0000018a <001b9c82> 0042e8c0  00000004

00427cc0:(00000000)<001b9edc> 04000000  00000000  00000bc8  00000003  0000ffff  00000000

00427ce0: 01425993  00001873 <ffa02024> 031f6d20  0325b1e0  00000000  00000000  00345b14

00427d00:<001de952> 0045df40  00000003  00427e08  00000fff  00000000  00000bc8  00000003

00427d20:<001c129c><001c13c4> 00426000  00000003  00001802  0000018a  00001802  00000000

00427d40: 032832e0  00000000  00000000  032832f0  6f696461  0042e900  00427e64 <001dedca>

00427d60: 00426000  00422e00  00323bdc  00020000  0000008c  0000003f  00000000  0000ffff

00427d80: 0042e8c0  00345ae0  002e4998  00000000  0095d000  0042e940  031f6d60  00000006

00427da0: 00000000  0000000c  031a4002  464c457f  00010101  00000000  00000000  006a0003

00427dc0: 00000001  00001160  00000034  00007440  10000002  00200034  00280004  000e000f

00427de0: 03212520  00000000  00000000  00000000  00000000  00000000  00020000  00000000

00427e00: 00000000  80000010  464c457f  00010101  00000000  00000000  006a0002  00000001

00427e20: 00033fc0  00000034  0023ada0  10000002  00200034  00280007  001b001c  0045dee0

00427e40: 032832e0  00a00000  00000000  00000000  00000000  00020000  00000000  00000000

00427e60: 80000050  ffffffc0 <001c0bb6> 00323ea4  00422e00  00323bdc  fffffff8  00000000

00427e80: 0000003f  00427f24  0319f8cc  00427f24  00422e00  00000000  00426000  00426000

00427ea0: 0319f8cc <001c1e16> 00422e00  0000000b  03131940  00000000  031a4000  004604e4

00427ec0: 004604d0  004604e4  0042e740  00000000  00000000 <0018054a> 0018051c  031a4000

00427ee0: 004604d0  004604e4  00460494  0319fee8  00000000  00000000  00427f24 <ffa0084c>

00427f00: 00000000  ffffe000  03132380  03124776  00345c60  00312418  00000003  00460494

00427f20: 03132380  0304c6ee  00008000  00000000  00000000  00428000  0304c6ee  0304c6ee

00427f40:<0314be5a><ffa00ea4> 02003025  0306ef53  0305f7cf  0306ef4c  0305f7ce  00000000

00427f60: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

00427f80: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

00427fa0: 00000000  00000000  00000000  03131940  00460460  0319f8c0  0319f8cc  0312dd98

00427fc0: 03165d90  03131940  03124784  0304c6e4  0000000b  00000000  004604d0  03132380

00427fe0: 00460494  00000003  004604e4  004604d0  03124776  03124776  0000000b  00000006

00428000: 032f8160

Return addresses in stack:

    address : <0x001b242a> { ___alloc_pages_internal + 0x1b6 }

    address : <0x001b2552> { ___get_free_pages + 0x1e }

    address : <0x001b9c82> { _do_mmap_pgoff + 0x30e }

   frame  1 : <0x001b9edc> { _do_mmap_pgoff + 0x568 }

    address : <0xffa02024> { __cond_resched + 0x34 }

    address : <0x001de952> { _elf_fdpic_map_file + 0x582 }

    address : <0x001c129c> { _flush_old_exec + 0x354 }

    address : <0x001c13c4> { _flush_old_exec + 0x47c }

    address : <0x001dedca> { _load_elf_fdpic_binary + 0x2d2 }

    address : <0x001c0bb6> { _search_binary_handler + 0x82 }

    address : <0x001c1e16> { _do_execve + 0x15a }

    address : <0x0018054a> { _sys_execve + 0x2e }

    address : <0xffa0084c> { _system_call + 0x68 }

    address : <0x0314be5a> [ /bin/busybox + 0xbe5a ]

    address : <0xffa00ea4> { _evt_system_call + 0x64 }

Mem-Info:

DMA per-cpu:

CPU    0: hi:   18, btch:   3 usd:   0

Active_anon:0 active_file:8 inactive_anon:0

inactive_file:5 dirty:0 writeback:0 unstable:0

free:10667 slab:534 mapped:0 pagetables:0 bounce:0

DMA free:42668kB min:4096kB low:5120kB high:6144kB active_anon:0kB inactive_anon:0kB active_file:32kB inactive_file:20kB present:51816kB pages_scanned:0 all_unreclaimable? no

lowmem_reserve[]: 0 0 0

DMA: 67*4kB 54*8kB 39*16kB 24*32kB 14*64kB 12*128kB 3*256kB 1*512kB 0*1024kB 0*2048kB 1*4096kB 0*8192kB 2*16384kB 0*32768kB = 42668kB

13 total pagecache pages

13056 pages RAM

960 pages reserved

17 pages shared

1401 pages non-shared

Allocation of length 21123072 from process 216 failed

DMA per-cpu:

CPU    0: hi:   18, btch:   3 usd:   0

Active_anon:0 active_file:8 inactive_anon:0

inactive_file:5 dirty:0 writeback:0 unstable:0

free:10667 slab:534 mapped:0 pagetables:0 bounce:0

DMA free:42668kB min:4096kB low:5120kB high:6144kB active_anon:0kB inactive_anon:0kB active_file:32kB inactive_file:20kB present:51816kB pages_scanned:0 all_unreclaimable? no

lowmem_reserve[]: 0 0 0

DMA: 67*4kB 54*8kB 39*16kB 24*32kB 14*64kB 12*128kB 3*256kB 1*512kB 0*1024kB 0*2048kB 1*4096kB 0*8192kB 2*16384kB 0*32768kB = 42668kB

13 total pagecache pages

Unable to load executable

 

 

 

 

Kindly provide your suggestions.

 

kernel_config

user_config

QuoteReplyEditDelete

 

 

2010-07-16 11:33:12     Re: page allocation failure crash

Mike Frysinger (UNITED STATES)

Message: 91351   

 

this is expected behavior.  you cannot allocate large contiguous buffers.  use malloc() to dynamically allocate things in smaller chunks.

Attachments

Outcomes