2010-01-19 09:19:43     Problem with ffmpeg (page allocation failure)

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

2010-01-19 09:19:43     Problem with ffmpeg (page allocation failure)

Cedric Marin (FRANCE)

Message: 84755   

 

Hi everybody,

 

 

 

I work with a TCM-BF537 Bluetechnix module running uClinux 2008R1.5-RC3 plugged on the EVAL-BF5xx Bluetechnix evaluation board combined with the EXT-BF5xx-ETH external board to get the Ethernet PHY layer. Recently, we need to develop a video application consisting in capturing a video stream, compressing it in mpeg and saving it in a NAND flash. The video acquisition is based on a EXT-BF5xx-VIDEO external module which digitalizes the PAL stream format of a monochrome camera (using an ADV7183B video decoder) and sends it on the PPI port of the blackfin. We then decide to use ffmpeg for the video compression. We followed the instructions defined in   docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:v4l_blackfin_camera&s[]=video4linux to install video4linux and ffmpeg. After modifying the blackfin-cam driver (for enable the OE pin of the ADV), we notice that all seems to be ok. But, ffmpeg crash when we run the command : ffmpeg -f video4linux -s 720x576 -r 1 -an -i /dev/video0 /tmp/test.mjpeg by returning the following message :

 

 

 

ffmpeg: page allocation failure. order:9, mode:0x40d0

Hardware Trace:

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

    Source : <0x0012b558> { ___alloc_pages + 0x17c }

  1 Target : <0x0012b558> { ___alloc_pages + 0x17c }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Source : <0x00110230> { _tasklet_action + 0x7c }

12 Target : <0x0011022a> { _tasklet_action + 0x76 }

    Source : <0x00110206> { _tasklet_action + 0x52 }

13 Target : <0x00110204> { _tasklet_action + 0x50 }

    Source : <0x00119c3a> { ___rcu_process_callbacks + 0xb6 }

14 Target : <0x00119c34> { ___rcu_process_callbacks + 0xb0 }

    Source : <0x00119bca> { ___rcu_process_callbacks + 0x46 }

15 Target : <0x00119bc6> { ___rcu_process_callbacks + 0x42 }

    Source : <0x00119c62> { ___rcu_process_callbacks + 0xde }

Stack from 010ebe0c:

       015ab080 0012b55c 00000000 00000001 000040d0 015ab20c 00000009 000040d0

       010ea000 010ea000 00000000 0023223c 000240d0 00000000 00000000 010ea000

       010ea000 00000000 00000073 0012b622 00196000 00196000 010a4240 00000000

       04000021 00000000 00000000 0013115e 00196000 00232238 00131302 00000000

       00000001 0018ed44 04000021 00110204 01068320 00196fff 00000000 00000000

       00000000 00016760 0121ee9c 001028f0 00000000 00196000 013a8fe8 010ea000

 

Call Trace:

[<001028a8>] _sys_mmap2+0x0/0x80

[<00196000>] _phy_change+0x28/0x6c

[<00196000>] _phy_change+0x28/0x6c

 

Mem-info:

DMA per-cpu:

CPU    0: Hot: hi:    0, btch:   1 usd:   0   Cold: hi:    0, btch:   1 usd:   0

Active:0 inactive:15 dirty:0 writeback:1 unstable:0

free:1646 slab:356 mapped:0 pagetables:0 bounce:0

DMA free:6584kB min:596kB low:744kB high:892kB active:0kB inactive:60kB present:22352kB pages_scanned:56 all_unreclaimable? no

lowmem_reserve[]: 0 0

DMA: 50*4kB 44*8kB 35*16kB 15*32kB 14*64kB 12*128kB 2*256kB 0*512kB 0*1024kB 1*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 6584kB

5632 pages of RAM

1663 free pages

659 reserved pages

8 pages shared

0 pages swap cached

Allocation of length 1662976 from process 40 failed

DMA per-cpu:

CPU    0: Hot: hi:    0, btch:   1 usd:   0   Cold: hi:    0, btch:   1 usd:   0

Active:0 inactive:15 dirty:0 writeback:1 unstable:0

free:1646 slab:356 mapped:0 pagetables:0 bounce:0

DMA free:6584kB min:596kB low:744kB high:892kB active:0kB inactive:60kB present:22352kB pages_scanned:56 all_unreclaimable? no

lowmem_reserve[]: 0 0

DMA: 50*4kB 44*8kB 35*16kB 15*32kB 14*64kB 12*128kB 2*256kB 0*512kB 0*1024kB 1*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 6584kB

 

 

 

Now, we have several questions:

 

1- Is anybody has ever tried to run ffmpeg with a such hardware configuration (with the EXT-BF5xx-VIDEO) ? Is it normal that the driver video4linux was not totally adapted to this configuration ?

 

2- We suppose that this error is associated to a lack of memory. Is it right ? If yes, we want to replace the actual TCM-BF537 (with 32MB of RAM) by the CM-BF548 (with 64 MB of RAM), do you think it is sufficient ?

 

 

 

Thanks in advance.

 

 

 

Cedric

QuoteReplyEditDelete

 

 

2010-01-19 09:39:23     Problem with ffmpeg (page allocation failure)

Michael Hennerich (GERMANY)

Message: 84756    This error is due to low or fragmented memory.

On a board with 64MB SDRAM I had a similar application running over night without seeing low memory issues.

QuoteReplyEditDelete

 

 

2010-01-19 09:53:16     Re: Problem with ffmpeg (page allocation failure)

Cedric Marin (FRANCE)

Message: 84757   

 

Thanks for this quick response!

 

So, we will try with the CM-BF548 module...

Attachments

    Outcomes