2008-05-02 11:07:23     PPI Frame CAPTURE Driver and CGI

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

2008-05-02 11:07:23     PPI Frame CAPTURE Driver and CGI

Hadi Boulfelfel (FRANCE)

Message: 55370   

 

Hi every one,

 

i need help to debug this problem with the cgi server used with the PPIFCD Driver and fcd application. here's the Hardware trace, could you give me any idea please? can you just tell me where may come from, where i must look.

 

i'm using BF537 EZLITE

 

Thank you :

 

root:/> fcd.cgi: page allocation failure. order:10, mode:0x40d0

Hardware Trace:

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

     Source : <0x0002dc52> { ___alloc_pages + 0x17e }

   1 Target : <0x0002dc52> { ___alloc_pages + 0x17e }

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

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

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

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

     Source : <0xffa00d00> { __common_int_entry + 0xd8 }

   4 Target : <0xffa00c9e> { __common_int_entry + 0x76 }

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

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

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

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

     Source : <0xffa00c9a> { __common_int_entry + 0x72 }

   7 Target : <0xffa00c98> { __common_int_entry + 0x70 }

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

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

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

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

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

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

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

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

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

  12 Target : <0x0001461e> { _run_timer_softirq + 0x6e }

     Source : <0x00014678> { _run_timer_softirq + 0xc8 }

  13 Target : <0x00014662> { _run_timer_softirq + 0xb2 }

     Source : <0x0008ee2c> { _bfin_serial_rx_dma_timeout + 0x1bc }

  14 Target : <0x0008ee24> { _bfin_serial_rx_dma_timeout + 0x1b4 }

     Source : <0x00014512> { ___mod_timer + 0x76 }

  15 Target : <0x000144f6> { ___mod_timer + 0x5a }

     Source : <0x000142ba> { _internal_add_timer + 0x2a }

Stack from 00f41e18:

        037cca80 0002dc56 00000000 00000001 000040d0 037ccc0c 0000000a 000040d0

        00000000 001481b0 00000000 000240d0 00f40000 00000000 00000000 00000073

        0002dd26 00301000 00301000 030ac560 00000000 04000021 00000000 00000000

        00033a22 00301000 001481ac 00033b80 00000000 00000000 00000000 04000021

        00037caa 007dc5a0 00301fff 00f58d64 00000000 00000014 00632004 00f58c74

        00003a24 00000000 00301000 00f56fb0 00f40000 04000021 00000000 00000003

 

Call Trace:

[<000018d8>] _sys_execve+0x0/0x54

[<000039dc>] _sys_mmap2+0x0/0x80

[<0000fffe>] _do_exit+0x60e/0x760

[<00008000>] _l1sram_alloc+0x20/0x34

[<00060000>] _proc_get_sb+0x28/0x5c

 

Mem-info:

DMA per-cpu:

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

Active:1362 inactive:1304 dirty:0 writeback:0 unstable:0

free:9170 slab:382 mapped:0 pagetables:0 bounce:0

DMA free:36680kB min:952kB low:1188kB high:1428kB active:5448kB inactive:5216kB present:56896kB pages_scanned:11081 all_unreclaimable? no

lowmem_reserve[]: 0 0

DMA: 6*4kB 0*8kB 1*16kB 1*32kB 0*64kB 14*128kB 14*256kB 13*512kB 4*1024kB 10*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 36680kB

14335 pages of RAM

9204 free pages

495 reserved pages

0 pages shared

0 pages swap cached

Allocation of length 3149824 from process 208 failed

DMA per-cpu:

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

Active:1362 inactive:1304 dirty:0 writeback:0 unstable:0

free:9170 slab:382 mapped:0 pagetables:0 bounce:0

DMA free:36680kB min:952kB low:1188kB high:1428kB active:5448kB inactive:5216kB present:56896kB pages_scanned:11081 all_unreclaimable? no

lowmem_reserve[]: 0 0

DMA: 6*4kB 0*8kB 1*16kB 1*32kB 0*64kB 14*128kB 14*256kB 13*512kB 4*1024kB 10*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 36680kB

NULL pointer access (probably)

Defered Exception context

CURRENT PROCESS:

COMM=fcd.cgi PID=208

TEXT = 0x00f50040-0x00f55ec0        DATA = 0x00f55ec4-0x00f56f74

BSS = 0x00f56f74-0x00f571f4  USER-STACK = 0x00f58d60

 

return address: [0x00f5323e]; contents of:

0x00f53210:  0000  6000  05ad  0010  014b  3200  3219  3212

0x00f53220:  0e3a  1818  3401  56c1  4ff3  0300  1015  44d1

0x00f53230:  6ff9  601b  549a  3212  9c01  e0a2  1002 [c803]

0x00f53240:  1800  9201  9c01  9201  0c42  3298  1005  9073

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 00060027  IPEND: 0030  SYSCFG: 0006

  HWERRCAUSE: 0x18

  EXCAUSE   : 0x27

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

RETN: <0x00f42000> /* unknown address */

RETX: <0x00f5323e> [ fcd.cgi + 0x31fe ]

RETS: <0x00f504c4> [ fcd.cgi + 0x484 ]

PC  : <0x00f5323e> [ fcd.cgi + 0x31fe ]

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

ICPLB_FAULT_ADDR: <0x00f5323e> [ fcd.cgi + 0x31fe ]

 

PROCESSOR STATE:

R0 : 00000000    R1 : 04364d42    R2 : 00000002    R3 : 00000003

R4 : 00000001    R5 : 00000436    R6 : 00000000    R7 : 00000000

P0 : 00000000    P1 : 0000010c    P2 : 00000002    P3 : 00f56810

P4 : 00632048    P5 : 00632408    FP : 00f58cc4    SP : 00f41f24

LB0: 00f5323f    LT0: 00f5323e    LC0: 0000010c

LB1: 03169d59    LT1: 03169d58    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 00f56814

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 00f58d64

B2 : 00000000    L2 : 00000000    M2 : 00000000    I2 : 00000000

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

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

USP : 00f58cb0  ASTAT: 02002020

 

Hardware Trace:

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

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

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

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

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

     Source : <0xffa00442> { _ex_workaround_261 + 0x22 }

   3 Target : <0xffa00420> { _ex_workaround_261 + 0x0 }

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

   4 Target : <0xffa007e4> { _trap + 0x0 }

     Source : <0xffa0055a> { _bfin_return_from_exception + 0xe }

   5 Target : <0xffa0054c> { _bfin_return_from_exception + 0x0 }

     Source : <0xffa00432> { _ex_workaround_261 + 0x12 }

   6 Target : <0xffa00420> { _ex_workaround_261 + 0x0 }

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

   7 Target : <0xffa007e4> { _trap + 0x0 }

     Source : <0x00f5323a> [ fcd.cgi + 0x31fa ]

   8 Target : <0x00f53218> [ fcd.cgi + 0x31d8 ]

     Source : <0x00f504c0> [ fcd.cgi + 0x480 ]

   9 Target : <0x00f504b4> [ fcd.cgi + 0x474 ]

     Source : <0x00f53788> [ fcd.cgi + 0x3748 ]

  10 Target : <0x00f53780> [ fcd.cgi + 0x3740 ]

     Source : <0x00f53804> [ fcd.cgi + 0x37c4 ]

  11 Target : <0x00f537fc> [ fcd.cgi + 0x37bc ]

     Source : <0x00f51d2c> [ fcd.cgi + 0x1cec ]

  12 Target : <0x00f51d1c> [ fcd.cgi + 0x1cdc ]

     Source : <0x00f537f8> [ fcd.cgi + 0x37b8 ]

  13 Target : <0x00f537f8> [ fcd.cgi + 0x37b8 ]

     Source : <0x00f537ba> [ fcd.cgi + 0x377a ]

  14 Target : <0x00f537b6> [ fcd.cgi + 0x3776 ]

     Source : <0x00f544ac> [ fcd.cgi + 0x446c ]

  15 Target : <0x00f544a4> [ fcd.cgi + 0x4464 ]

     Source : <0x00f544d0> [ fcd.cgi + 0x4490 ]

Stack from 00f41f04:

        00f56fb0 ffa00770 0014456c 0014456c 00144568 04000021 00000000 00182460

        00f5323e 00000030 00060027 00000000 00f42000 00f5323e 00f5323e 00f504c4

        00000000 02002020 03169d59 00f5323f 03169d58 00f5323e 00000000 0000010c

        00000310 00000000 00000310 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 00f58d64 00f56814 00f58cb0 00f58cc4 00632408 00632048

 

Call Trace:

 

TranslateQuoteReplyEditDelete

 

 

2008-05-02 21:25:48     Re: PPI Frame CAPTURE Driver and CGI

Mike Frysinger (UNITED STATES)

Message: 55387   

 

a page allocation failure means you're either out of memory or it's too fragmented to satisfy the request.  the order number tells you the size that was requested and that failed.

 

page * 2 ^ order

QuoteReplyEditDelete

 

 

2008-05-03 06:37:45     Re: PPI Frame CAPTURE Driver and CGI

Hadi Boulfelfel (FRANCE)

Message: 55411   

 

ok thank you Mike, i think it's because of fregmentation so I buffer a 3Mpixel frame each time i call the cgi server for capture and i free it after that. This error happens after about 6 to 10 successives frame captures.

 

can you take a look if you have time, on the "fcd.c file" and the "bfin_ppifcd.c" driver?

 

 

 

Thank you again.

TranslateQuoteReplyEditDelete

 

 

2008-05-03 06:47:34     Re: PPI Frame CAPTURE Driver and CGI

Mike Frysinger (UNITED STATES)

Message: 55412   

 

so you'll have to statically allocate the buffer and not free it

QuoteReplyEditDelete

 

 

2008-05-03 06:57:36     Re: PPI Frame CAPTURE Driver and CGI

Hadi Boulfelfel (FRANCE)

Message: 55414   

 

ok thank you again Mike, i'll try this.

TranslateQuoteReplyEditDelete

 

 

2008-05-11 06:57:36     Re: PPI Frame CAPTURE Driver and CGI

Hadi Boulfelfel (FRANCE)

Message: 55722   

 

Hello,

 

Just to add some thing about the allocation failure on the fcd application,  i did some tests and i find that the thttpd server used with that application caches each file donwloaded to the browser , so each time i donwload the frame the quantity of free memory decreases, but I could not find where to disable this feature in the server config, any idea please?

 

Thank you,

Attachments

    Outcomes