[#4237] crash when allocating large contiguous chunk of memory when memory is fragmented

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

[#4237] crash when allocating large contiguous chunk of memory when memory is fragmented

Submitted By: weihong zeng

Open Date

2008-07-14 00:06:12     Close Date

2008-07-15 02:43:47

Priority:

High     Assignee:

Nobody

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2008R1-RC8     Release:

Category:

uClinux-dist applications     Board:

EZKIT Lite

Processor:

BF548     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Rejected

Uboot version or rev.:

    Toolchain version or rev.:

bfin-uclinux-gcc (GCC) 4.1.2

App binary format:

N/A     

Summary: crash when allocating large contiguous chunk of memory when memory is fragmented

Details:

 

mdolphin_app: page allocation failure. order:7, mode:0x40d0

Hardware Trace:

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

     Source : <0x0002cad0> { ___alloc_pages + 0x180 }

   1 Target : <0x0002cad0> { ___alloc_pages + 0x180 }

     Source : <0x0000ce72> { _printk + 0x16 }

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

     Source : <0x0000cd24> { _vprintk + 0x1b8 }

   3 Target : <0x0000cd18> { _vprintk + 0x1ac }

     Source : <0xffa00c82> { __common_int_entry + 0xca }

   4 Target : <0xffa00c20> { __common_int_entry + 0x68 }

     Source : <0xffa00a60> { _return_from_int + 0x58 }

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

     Source : <0xffa00a36> { _return_from_int + 0x2e }

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

     Source : <0xffa00c1c> { __common_int_entry + 0x64 }

   7 Target : <0xffa00c1a> { __common_int_entry + 0x62 }

     Source : <0xffa003a0> { _asm_do_IRQ + 0x68 }

   8 Target : <0xffa00398> { _asm_do_IRQ + 0x60 }

     Source : <0x00010f62> { __local_bh_enable + 0x3e }

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

     Source : <0x0001106c> { ___do_softirq + 0x94 }

  10 Target : <0x00011064> { ___do_softirq + 0x8c }

     Source : <0x00011044> { ___do_softirq + 0x6c }

  11 Target : <0x00011038> { ___do_softirq + 0x60 }

     Source : <0x00013e40> { _run_timer_softirq + 0x84 }

  12 Target : <0x00013dd0> { _run_timer_softirq + 0x14 }

     Source : <0x0001eda8> { _hrtimer_run_queues + 0xc8 }

  13 Target : <0x0001ed82> { _hrtimer_run_queues + 0xa2 }

     Source : <0x0001eddc> { _hrtimer_run_queues + 0xfc }

  14 Target : <0x0001edca> { _hrtimer_run_queues + 0xea }

     Source : <0x0001ebac> { _hrtimer_wakeup + 0x1c }

  15 Target : <0x0001eba6> { _hrtimer_wakeup + 0x16 }

     Source : <0x00009e60> { _try_to_wake_up + 0x3c }

Stack from 02951e18:

        009b60e0 0002cad4 00000000 00000001 000040d0 009b626c 00000007 000040d0

        00000000 00202770 00000000 000240d0 02950000 00000000 00000000 00000073

        0002cba6 00052000 00052000 0164e780 00000000 04000021 00000000 00000000

        000326ee 00052000 0020276c 0003284c 00000001 00000000 008e71a0 04000021

        008e9398 0286ff40 00052fff 02951ea0 00000000 00011038 008e53e4 0109fb08

        00003a5c 00000000 00052000 006802ac 02950000 04000021 00000000 00000003

 

Call Trace:

[<00003a14>] _sys_mmap2+0x0/0x80

[<00008000>] _bfin_gpio_unmask_irq+0x2c/0x38

[<00060000>] _get_nr_threads+0x28/0x48

[<00008000>] _bfin_gpio_unmask_irq+0x2c/0x38

[<00052000>] ___block_prepare_write+0x24/0x504

[<00052000>] ___block_prepare_write+0x24/0x504

 

Mem-info:

DMA per-cpu:

CPU    0: Hot: hi:   18, btch:   3 usd:  17   Cold: hi:    6, btch:   1 usd:   0

Active:895 inactive:1020 dirty:0 writeback:0 unstable:0

free:2276 slab:741 mapped:0 pagetables:0 bounce:0

DMA free:9104kB min:968kB low:1208kB high:1452kB active:3580kB inactive:4080kB present:58928kB pages_scanned:7930 all_unreclo

lowmem_reserve[]: 0 0

DMA: 126*4kB 113*8kB 57*16kB 44*32kB 24*64kB 14*128kB 6*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB

14847 pages of RAM

2331 free pages

694 reserved pages

0 pages shared

0 pages swap cached

Allocation of length 335872 from process 404 failed

DMA per-cpu:

CPU    0: Hot: hi:   18, btch:   3 usd:  17   Cold: hi:    6, btch:   1 usd:   0

Active:895 inactive:1020 dirty:0 writeback:0 unstable:0

free:2276 slab:741 mapped:0 pagetables:0 bounce:0

DMA free:9104kB min:968kB low:1208kB high:1452kB active:3580kB inactive:4080kB present:58928kB pages_scanned:7930 all_unreclo

lowmem_reserve[]: 0 0

DMA: 126*4kB 113*8kB 57*16kB 44*32kB 24*64kB 14*128kB 6*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB

Out of memory

NULL pointer access (probably)

Defered Exception context

CURRENT PROCESS:

COMM=mdolphin_app PID=404

TEXT = 0x01800040-0x01b9f160        DATA = 0x01b9f164-0x01d49554

BSS = 0x01d49554-0x01d6ad44  USER-STACK = 0x01dbce44

 

return address: [0x018f9dd2]; contents of:

0x018f9db0:  b2fa  3220  9128  e30b  7c61  bbf0  a068  e30b

0x018f9dc0:  7c5d  bbe0  a0a8  e30b  7c59  bbd0  a0e8  e30b

0x018f9dd0:  7c55 [ace3] bbc0  e120  00ff  e121  00ff  ac59

0x018f9de0:  4f81  e182  ff00  bbb9  b0f0  63f8  4fc0  b130

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 00060027  IPEND: 0030  SYSCFG: 0006

  HWERRCAUSE: 0x18

  EXCAUSE   : 0x27

RETE: <0x00000000> /* Maybe null pointer? */

RETN: <0x02952000> [ mdolphin_app + 0x0 ]

RETX: <0x018f9dd2> [ mdolphin_app + 0xf9d92 ]

RETS: <0x018f9dd2> [ mdolphin_app + 0xf9d92 ]

PC  : <0x018f9dd2> [ mdolphin_app + 0xf9d92 ]

DCPLB_FAULT_ADDR: <0x0164fda4> /* unknown address */

ICPLB_FAULT_ADDR: <0x00003fdc> { _decode_address + 0xf0 }

 

PROCESSOR STATE:

R0 : 00000015    R1 : 00000015    R2 : 00280000    R3 : 00000000

R4 : 0109f6e4    R5 : 0109f68c    R6 : 0109f600    R7 : 00000002

P0 : 016aacf0    P1 : 0109f57c    P2 : 0109f58c    P3 : 033ba284

P4 : 00000000    P5 : 0109f600    FP : 0109f5c8    SP : 02951f24

LB0: 01b4af51    LT0: 01b4af50    LC0: 00000000

LB1: 01955d23    LT1: 01955d22    LC1: 00000000

B0 : 0109fa2c    L0 : 00000000    M0 : 01660004    I0 : 0109f530

B1 : 0000000c    L1 : 00000000    M1 : 00000d73    I1 : 0000000c

B2 : 006691fb    L2 : 00000000    M2 : 00008000    I2 : 00000001

B3 : 00000d73    L3 : 00000000    M3 : 006691c3    I3 : 00000000

A0.w: 00000000   A0.x: 00000000   A1.w: 00000000   A1.x: 00000000

USP : 0109f598  ASTAT: 02003025

 

Hardware Trace:

   0 Target : <0x000048c0> { _trap_c + 0x0 }

     Source : <0xffa006fc> { _exception_to_level5 + 0xb4 }

   1 Target : <0xffa00648> { _exception_to_level5 + 0x0 }

     Source : <0xffa005a0> { _ex_trap_c + 0x5c }

   2 Target : <0xffa00544> { _ex_trap_c + 0x0 }

     Source : <0xffa0079c> { _trap + 0x28 }

   3 Target : <0xffa00774> { _trap + 0x0 }

     Source : <0x01a696b6> [ mdolphin_app + 0x269676 ]

   4 Target : <0x01a696b0> [ mdolphin_app + 0x269670 ]

     Source : <0x01a696d4> [ mdolphin_app + 0x269694 ]

   5 Target : <0x01a696b8> [ mdolphin_app + 0x269678 ]

     Source : <0x01a69698> [ mdolphin_app + 0x269658 ]

   6 Target : <0x01a6968a> [ mdolphin_app + 0x26964a ]

     Source : <0x01a6cbd2> [ mdolphin_app + 0x26cb92 ]

   7 Target : <0x01a6cbb2> [ mdolphin_app + 0x26cb72 ]

     Source : <0x01a6cb7a> [ mdolphin_app + 0x26cb3a ]

   8 Target : <0x01a6cb5c> [ mdolphin_app + 0x26cb1c ]

     Source : <0x01a69686> [ mdolphin_app + 0x269646 ]

   9 Target : <0x01a69678> [ mdolphin_app + 0x269638 ]

     Source : <0x018f9dce> [ mdolphin_app + 0xf9d8e ]

  10 Target : <0x018f9dca> [ mdolphin_app + 0xf9d8a ]

     Source : <0x01a696b6> [ mdolphin_app + 0x269676 ]

  11 Target : <0x01a696b0> [ mdolphin_app + 0x269670 ]

     Source : <0x01a696d4> [ mdolphin_app + 0x269694 ]

  12 Target : <0x01a696b8> [ mdolphin_app + 0x269678 ]

     Source : <0x01a69698> [ mdolphin_app + 0x269658 ]

  13 Target : <0x01a6968a> [ mdolphin_app + 0x26964a ]

     Source : <0x01a6cbd2> [ mdolphin_app + 0x26cb92 ]

  14 Target : <0x01a6cbb2> [ mdolphin_app + 0x26cb72 ]

     Source : <0x01a6cb7a> [ mdolphin_app + 0x26cb3a ]

  15 Target : <0x01a6cb5c> [ mdolphin_app + 0x26cb1c ]

     Source : <0x01a69686> [ mdolphin_app + 0x269646 ]

Stack from 02951f04:

        ffffe000 ffa00700 001fc570 001fc570 001fc564 00000004 0109fc20 01b46fbc

        018f9dd2 00000030 00060027 00000000 02952000 018f9dd2 018f9dd2 018f9dd2

        00000015 02003025 01955d23 01b4af51 01955d22 01b4af50 00000000 00000000

        00000000 00000000 00000000 00000000 00000d73 006691fb 0000000c 0109fa2c

        00000000 00000000 00000000 00000000 006691c3 00008000 00000d73 01660004

        00000000 00000001 0000000c 0109f530 0109f598 0109f5c8 0109f600 00000000

 

Call Trace:

 

 

Follow-ups

 

--- Yi Li                                                    2008-07-14 05:07:46

This is not a bug.

 

When you program malloc() a block of memory and the memory is not enough,

kernel will return this error.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes