[#3882] copy file function cp, after few times consume all memory

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

[#3882] copy file function cp, after few times consume all memory

Submitted By: Jiri Beranek

Open Date

2008-02-02 06:11:16     Close Date

2008-03-17 18:51:35

Priority:

Medium High     Assignee:

Nobody

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

svn Revision: 6166

Category:

Kernel Functions     Board:

STAMP

Processor:

BF537     Silicon Revision:

0.2

Is this bug repeatable?:

Yes     Resolution:

Rejected

Uboot version or rev.:

svn Revision: 1134     Toolchain version or rev.:

svn Revision: 2170

App binary format:

N/A     

Summary: copy file function cp, after few times consume all memory

Details:

 

This happen, if I mount mmc card by SPI_MMC driver or by USB-MASS STORAGE.

Copy large data block...

 

root:/> usb 1-1.3: reset high speed USB device using isp1761 and address 3     

scsi 0:0:0:0: Direct-Access     OTi      CF CARD Reader   2.00 PQ: 0 ANSI: 0 CCS

sd 0:0:0:0: [sda] Attached SCSI removable disk                                 

scsi 0:0:0:1: Direct-Access     OTi      SM CARD Reader   2.00 PQ: 0 ANSI: 0 CCS

sd 0:0:0:1: [sdb] Attached SCSI removable disk                                 

scsi 0:0:0:2: Direct-Access     OTi      SD CARD Reader   2.00 PQ: 0 ANSI: 0 CCS

sd 0:0:0:2: [sdc] 1950720 512-byte hardware sectors (999 MB)                   

sd 0:0:0:2: [sdc] Write Protect is off                                         

sd 0:0:0:2: [sdc] Assuming drive cache: write through                          

sd 0:0:0:2: [sdc] 1950720 512-byte hardware sectors (999 MB)                   

sd 0:0:0:2: [sdc] Write Protect is off                                         

sd 0:0:0:2: [sdc] Assuming drive cache: write through                          

sdc: sdc1 sdc2                                                                

sd 0:0:0:2: [sdc] Attached SCSI removable disk                                 

scsi 0:0:0:3: Direct-Access     OTi      MS CARD Reader   2.00 PQ: 0 ANSI: 0 CCS

sd 0:0:0:3: [sdd] Attached SCSI removable disk                                 

                                                                               

root:/> mount /dev/sdc2 /mnt

 

root:/> cp -a /mnt/home/ /mnt/testdir/ &                                       

282                                                                            

root:/> free                                                                   

              total         used         free       shared      buffers        

  Mem:        54972        17916        37056            0           72        

root:/> free                                                                   

              total         used         free       shared      buffers        

  Mem:        54972        28504        26468            0          208        

root:/> free                                                                   

              total         used         free       shared      buffers        

  Mem:        54972        33280        21692            0          216        

root:/> free                                                                   

              total         used         free       shared      buffers        

  Mem:        54972        37812        17160            0          288        

root:/> free                                                                   

              total         used         free       shared      buffers        

  Mem:        54972        39576        15396            0          312        

root:/> free                                                                   

              total         used         free       shared      buffers        

  Mem:        54972        44840        10132            0          456        

root:/> free                                                                   

              total         used         free       shared      buffers        

  Mem:        54972        51432         3540            0          456        

root:/> free                                                                   

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

Hardware Trace:                                                                

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

     Source : <0x0002e3e2> { ___alloc_pages + 0x176 }                          

   1 Target : <0x0002e3e2> { ___alloc_pages + 0x176 }                          

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

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

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

   3 Target : <0x0000db5c> { _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 : <0x00011da2> { __local_bh_enable + 0x3e }                        

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Stack from 01f1bd0c:                                                           

        00000001 0002e3e6 00000000 00000001 000040d0 0378aeac 00000007 000040d0

        00000000 001aea9c 00000000 000240d0 01f1a000 00000000 00000000 00000077

        0002e4b6 00067000 00067000 001f5300 00000000 00000002 00000000 00000000

        000040d0 000040d0 001aea98 000343a8 00000000 001f7600 00000006 00000002

        001f7600 03792ca0 00067fff 65657266 00000000 fffffffe 01f1bf24 00048e80

        0005f732 00000005 00001a70 001f7600 01f1a000 00066464 00000000 00013000

                                                                               

Call Trace:                                                                    

[<0001ffa5>] _ktime_divns+0xc9/0xd0                                            

[<00002978>] _do_rt_sigreturn+0x57c/0x854                                      

[<0000a5e0>] _show_state_filter+0x134/0x154                                    

[<00005963>] _peripheral_free+0x53/0x94                                        

[<00067000>] _sysfs_delete_inode+0x14/0x48                                     

[<00066464>] _rescan_partitions+0x1b4/0x1d8                                    

[<0005be80>] _sys_epoll_ctl+0x84/0x330                                         

[<00003ef3>] _decode_address+0xcf/0x1e4                                        

[<0003b03a>] _search_binary_handler+0x82/0x1c4                                 

[<0003c41e>] _do_execve+0x1b2/0x1f0                                            

[<001c0650>] _inflate_fixed+0xec/0x138                                         

[<001c05ec>] _inflate_fixed+0x88/0x138                                         

[<00017b74>] _sys_rt_sigaction+0x0/0x84                                        

[<00001906>] _sys_execve+0x2e/0x54                                             

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

[<001c0650>] _inflate_fixed+0xec/0x138                                         

[<001c0650>] _inflate_fixed+0xec/0x138                                         

[<001c05ec>] _inflate_fixed+0x88/0x138                                         

[<001c05ec>] _inflate_fixed+0x88/0x138                                         

[<001c05ec>] _inflate_fixed+0x88/0x138                                         

[<00008000>] _dma_disable_irq+0x14/0x6c                                        

[<00002000>] _get_sclk+0x4/0x58                                                

[<001c05a4>] _inflate_fixed+0x40/0x138                                         

[<001c0650>] _inflate_fixed+0xec/0x138                                         

[<001c0641>] _inflate_fixed+0xdd/0x138                                         

[<001c063c>] _inflate_fixed+0xd8/0x138                                         

[<001c05ec>] _inflate_fixed+0x88/0x138                                         

[<001c05ec>] _inflate_fixed+0x88/0x138                                         

[<001c0650>] _inflate_fixed+0xec/0x138                                         

                                                                               

Mem-info:                                                                      

DMA per-cpu:                                                                   

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

Active:379 inactive:11438 dirty:80 writeback:801 unstable:0                    

free:511 slab:729 mapped:0 pagetables:0 bounce:0                              

DMA free:2044kB min:952kB low:1188kB high:1428kB active:1516kB inactive:45752kBo

lowmem_reserve[]: 0 0                                                          

DMA: 5*4kB 5*8kB 6*16kB 3*32kB 8*64kB 4*128kB 1*256kB 1*512kB 0*1024kB 0*2048kBB

14335 pages of RAM                                                             

544 free pages                                                                 

592 reserved pages                                                             

5114 pages shared                                                              

0 pages swap cached                                                            

Allocation of length 421888 from process 290 failed                            

DMA per-cpu:                                                                   

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

Active:379 inactive:11438 dirty:80 writeback:801 unstable:0                    

free:511 slab:729 mapped:0 pagetables:0 bounce:0                              

DMA free:2044kB min:952kB low:1188kB high:1428kB active:1516kB inactive:45752kBo

lowmem_reserve[]: 0 0                                                          

DMA: 5*4kB 5*8kB 6*16kB 3*32kB 8*64kB 4*128kB 1*256kB 1*512kB 0*1024kB 0*2048kBB

Unable to allocate RAM for process text/data, errno 12                         

Undefined instruction                                                          

- May be used to emulate instructions that are not defined for                

   a particular processor implementation.                                      

Deferred Exception context                                                     

CURRENT PROCESS:                                                               

COMM=free PID=290                                                              

TEXT = 0x00000000-0x00000000  DATA = 0x00000000-0x00000000                     

BSS = 0x00000000-0x00000000   USER-STACK = 0x00000000                          

                                                                               

return address: [0x0074de58]; contents of:                                     

0x0074de30:  dca0  0074  2380  0072  dca8  0074  509c  0072                    

0x0074de40:  dcb0  0074  22a0  0072  dcb8  0074  3edc  0072                    

0x0074de50:  0000  0000  0000  0000 [dcc0] 0074  dccc  0074                    

0x0074de60:  0000  0000  dcd4  0074  dcdc  0074  dcf0  0074                    

                                                                               

SEQUENCER STATUS:               Not tainted                                    

SEQSTAT: 00002021  IPEND: 0030  SYSCFG: 0006                                  

  HWERRCAUSE: 0x0                                                              

  EXCAUSE   : 0x21                                                             

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

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

RETX: <0x0074de58> [ sh + 0x4de58 ]                                           

RETS: <0x0074de50> [ sh + 0x4de50 ]                                           

PC  : <0x0074de58> [ sh + 0x4de58 ]                                           

DCPLB_FAULT_ADDR: <0x00766bcc> [ sh + 0x66bcc ]                                

ICPLB_FAULT_ADDR: <0x0074de58> [ sh + 0x4de58 ]                                

                                                                               

PROCESSOR STATE:                                                               

R0 : 00000000    R1 : 00000004    R2 : 001c05ec    R3 : 00000003              

R4 : 00008a3b    R5 : 00719bc8    R6 : 00000000    R7 : 00766fb8              

P0 : 0000000b    P1 : 0075cf20    P2 : 0075bdb0    P3 : 00000122              

P4 : 00766fa8    P5 : 001c0650    FP : 00766fa4    SP : 01f1bf24              

LB0: 0070c7cf    LT0: 0070c7ce    LC0: 00000000                               

LB1: 00712759    LT1: 00712752    LC1: 00000000                               

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 001c05a4              

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 006ee004              

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

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

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

USP : 00766bd0  ASTAT: 02003025                                                

                                                                               

Hardware Trace:                                                                

   0 Target : <0x000047e0> { _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 : <0xffa0080c> { _trap + 0x28 }                                    

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

     Source : <0x0074de56> [ sh + 0x4de56 ]                                    

   4 Target : <0x0074de50> [ sh + 0x4de50 ]                                    

     Source : <0x0072305a> [ sh + 0x2305a ]                                    

   5 Target : <0x00723052> [ sh + 0x23052 ]                                    

     Source : <0x00723022> [ sh + 0x23022 ]                                    

   6 Target : <0x0072300c> [ sh + 0x2300c ]                                    

     Source : <0x00722f50> [ sh + 0x22f50 ]                                    

   7 Target : <0x00722f44> [ sh + 0x22f44 ]                                    

     Source : <0x00701f8c> [ sh + 0x1f8c ]                                     

   8 Target : <0x00701f86> [ sh + 0x1f86 ]                                     

     Source : <0x00701f9a> [ sh + 0x1f9a ]                                     

   9 Target : <0x00701f92> [ sh + 0x1f92 ]                                     

     Source : <0x007037bc> [ sh + 0x37bc ]                                     

  10 Target : <0x007037ac> [ sh + 0x37ac ]                                     

     Source : <0x00701f8e> [ sh + 0x1f8e ]                                     

  11 Target : <0x00701f8e> [ sh + 0x1f8e ]                                     

     Source : <0x00701f82> [ sh + 0x1f82 ]                                     

  12 Target : <0x00701f7a> [ sh + 0x1f7a ]                                     

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

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

     Source : <0xffa00ec4> { _evt_system_call + 0x64 }                         

  14 Target : <0xffa00ec4> { _evt_system_call + 0x64 }                         

     Source : <0xffa00994> { _system_call + 0xb8 }                             

  15 Target : <0xffa00990> { _system_call + 0xb4 }                             

     Source : <0xffa00980> { _system_call + 0xa4 }                             

Stack from 01f1bf04:                                                           

        ffffe000 ffa00770 001aafcc 001aafcc 001aafc8 00000003 00000001 00034cb4

        0074de58 00000030 00002021 00000000 01f1c000 0074de58 0074de58 0074de50

        00000000 02003025 00712759 0070c7cf 00712752 0070c7ce 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 006ee004 001c05a4 00766bd0 00766fa4 001c0650 00766fa8

                                                                               

Call Trace:                                                                    

[<00008a3b>] _blackfin_icache_dcache_flush_range+0x1f/0x2c                     

[<001c05ec>] _inflate_fixed+0x88/0x138                                         

                                                                               

Illegal instruction                                                            

root:/>

 

Follow-ups

 

--- Robin Getz                                               2008-02-04 12:06:58

This is well known, and expected behavior. Page cache fills up.

 

Try something like

 

echo 30 > proc/sys/vm/pagecache_ratio

 

-Robin

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes