This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PVR_K: RA_Alloc FAILED

Other Parts Discussed in Thread: 4460

Hi!

I currently running in problems when loading the Android 4.4 easter egg. It loads and crashes.
I own a custom 4460 board with 1GByte of RAM and 540SGX graphics.

A look into the logcat gives me the output below. Now I want to understand what this means.
Is no more the physically memory available at all or "only" some special memory (maybe I can tune some bit if I know what's the cause).

I putted some debug statements at the kernel driver and it confuses me some more ;) It shows me the following:

Inside the "MMU_Create", the function "RA_Create" is called with some "null" parameters, which causes the RA_Create function to use the default callback for memory allocation "_RequestAllocFail". This function is used in RA_Alloc: bResult =  pArena->pImportAlloc() which is intended to fail and causes the OutOfMemory exception.

Why the RA_Alloc uses this path at this point. Why it doesn't behave this way all the previous (successful) memory allocations?

D/libEGL  ( 2749): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
D/libEGL  ( 2749): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
D/libEGL  ( 2749): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
D/OpenGLRenderer( 2749): Enabling debug mode 0
I/cat     (  609): <6>[   99.693603] PVR_K: RA_Alloc FAILED  : arena=PDSPixelCodeData, size=0xd000(0xd000), alignment=0x0, offset=0x0
I/cat     (  609): <6>[   99.693756] PVR_K:
I/cat     (  609): <6>[   99.693756] Command Line of the current process with ID 2749 is com.android.systemui:sweetsweetdesserts
I/cat     (  609): <6>[   99.693939] PVR_K: Base Name of the current process with ID 2749 is com.android.systemui:sweetsweetdesserts
I/cat     (  609): <6>[   99.694000] PVR_K: Arena 'PDSPixelCodeData':
I/cat     (  609): <6>[   99.694122] PVR_K:   allocCB=bf1b2240 freeCB=  (null) handle=c9966840 quantum=4096
I/cat     (  609): <6>[   99.694183] PVR_K: span count        1
I/cat     (  609): <6>[   99.694274] PVR_K: live segment count    159
I/cat     (  609): <6>[   99.694335] PVR_K: free segment count    4294967295
I/cat     (  609): <6>[   99.694396] PVR_K: free resource count    0 (0x0)
I/cat     (  609): <6>[   99.694519] PVR_K: total allocs        159
I/cat     (  609): <6>[   99.694580] PVR_K: total failed allocs    0
I/cat     (  609): <6>[   99.694702] PVR_K: total frees        0
I/cat     (  609): <6>[   99.694763] PVR_K: import count        0
I/cat     (  609): <6>[   99.694824] PVR_K: export count        0
I/cat     (  609): <6>[   99.694885] PVR_K:   segment Chain:
I/cat     (  609): <6>[   99.695007] PVR_K:      base=0x0dc00000 size=00008192(0x00002000) type=live ref=  (null)
I/cat     (  609): <6>[   99.695068] PVR_K:      base=0x0dc02000 size=00004096(0x00001000) type=live ref=  (null)
I/cat     (  609): <6>[   99.695159] PVR_K:      base=0x0dc03000 size=00065536(0x00010000) type=live ref=  (null)
I/cat     (  609): <6>[   99.695281] PVR_K:      base=0x0dc13000 size=00053248(0x0000d000) type=live ref=  (null)
I/cat     (  609): <6>[   99.695343] PVR_K:      base=0x0dc20000 size=00053248(0x0000d000) type=live ref=  (null)
I/cat     (  609): <6>[   99.695434] PVR_K:      base=0x0dc2d000 size=00053248(0x0000d000) type=live ref=  (null)
I/cat     (  609): <6>[   99.695526] PVR_K:      base=0x0dc3a000 size=00053248(0x0000d000) type=live ref=  (null)
I/cat     (  609): <6>[   99.695648] PVR_K:      base=0x0dc47000 size=00053248(0x0000d000) type=live ref=  (null)
I/cat     (  609): <6>[   99.695709] PVR_K:      base=0x0dc54000 size=00053248(0x0000d000) type=live ref=  (null)
I/cat     (  609): <6>[   99.695831] PVR_K:      base=0x0dc61000 size=00053248(0x0000d000) type=live ref=  (null)
I/cat     (  609): <6>[   99.695953] PVR_K:      base=0x0dc6e000 size=00053248(0x0000d000) type=live ref=  (null)
I/cat     (  609): <6>[   99.696014] PVR_K:      base=0x0dc7b000 size=00053248(0x0000d000) type=live ref=  (null)
I/cat     (  609): <6>[   99.696105] PVR_K:      base=0x0dc88000 size=00053248(0x0000d000) type=live ref=  (null)

...

I/cat     (  609): <6>[   99.719299] PVR_K:(Error): MMU_Alloc: RA_Alloc of VMArena failed [0, ]
I/cat     (  609): <6>[   99.719421] PVR_K:(Error): MMU_Alloc: Alloc of DevVAddr failed from heap PDSPixelCodeData ID117440518 [0, ]
I/cat     (  609): <6>[   99.719543] PVR_K:(Error): DevMemoryAlloc ERROR MMU_Alloc [0, ]
I/cat     (  609): <6>[   99.719604] PVR_K:(Error): BM_ImportMemory: DevMemoryAlloc(0xd000) failed [0, ]
I/cat     (  609): <6>[   99.719757] PVR_K: RA_Alloc FAILED  : arena=PDSPixelCodeData BS, size=0xc800(0xc800), alignment=0x20, offset=0x0
I/cat     (  609): <6>[   99.719879] PVR_K:
I/cat     (  609): <6>[   99.719879] Command Line of the current process with ID 2749 is com.android.systemui:sweetsweetdesserts
I/cat     (  609): <6>[   99.720062] PVR_K: Base Name of the current process with ID 2749 is com.android.systemui:sweetsweetdesserts
I/cat     (  609): <6>[   99.720153] PVR_K: Arena 'PDSPixelCodeData BS':
I/cat     (  609): <6>[   99.720214] PVR_K:   allocCB=bf1a482c freeCB=bf1a3d0c handle=c9966300 quantum=4096
I/cat     (  609): <6>[   99.720336] PVR_K: span count        159
I/cat     (  609): <6>[   99.720397] PVR_K: live segment count    159
I/cat     (  609): <6>[   99.720458] PVR_K: free segment count    160
I/cat     (  609): <6>[   99.720581] PVR_K: free resource count    356864 (0x57200)
I/cat     (  609): <6>[   99.720642] PVR_K: total allocs        159
I/cat     (  609): <6>[   99.721527] PVR_K: total failed allocs    0
I/cat     (  609): <6>[   99.721588] PVR_K: total frees        0
I/cat     (  609): <6>[   99.721649] PVR_K: import count        159
I/cat     (  609): <6>[   99.721801] PVR_K: export count        0
I/cat     (  609): <6>[   99.722839] PVR_K:   segment Chain:
I/cat     (  609): <6>[   99.722930] PVR_K:          base=0x0dc00000 size=00008192(0x00002000) type=span ref=  (null)
I/cat     (  609): <6>[   99.723022] PVR_K:      base=0x0dc00000 size=00006144(0x00001800) type=live ref=c6f7aba0
I/cat     (  609): <6>[   99.723114] PVR_K:      c6f7aba0: mapping type hm_env, mapping count=1, size=00008192(0x00002000), flags=0x0000020d, align=0x1000
I/cat     (  609): <6>[   99.723236] PVR_K:      base=0x0dc01800 size=00002048(0x00000800) type=free ref=c6f7aba0
I/cat     (  609): <6>[   99.723327] PVR_K:      c6f7aba0: mapping type hm_env, mapping count=1, size=00008192(0x00002000), flags=0x0000020d, align=0x1000
I/cat     (  609): <6>[   99.723449] PVR_K:          base=0x0dc02000 size=00000000(0x00000000) type=span ref=  (null)
I/cat     (  609): <6>[   99.723571] PVR_K:          base=0x0dc02000 size=00004096(0x00001000) type=span ref=  (null)
I/cat     (  609): <6>[   99.723693] PVR_K:      base=0x0dc02000 size=00001536(0x00000600) type=live ref=c6f7a6c0
I/cat     (  609): <6>[   99.723754] PVR_K:      c6f7a6c0: mapping type hm_env, mapping count=1, size=00004096(0x00001000), flags=0x0000020d, align=0x1000
I/cat     (  609): <6>[   99.723876] PVR_K:      base=0x0dc02600 size=00002560(0x00000a00) type=free ref=c6f7a6c0
I/cat     (  609): <6>[   99.723999] PVR_K:      c6f7a6c0: mapping type hm_env, mapping count=1, size=00004096(0x00001000), flags=0x0000020d, align=0x1000
I/cat     (  609): <6>[   99.724121] PVR_K:          base=0x0dc03000 size=00000000(0x00000000) type=span ref=  (null)
I/cat     (  609): <6>[   99.724212] PVR_K:          base=0x0dc03000 size=00065536(0x00010000) type=span ref=  (null)
I/cat     (  609): <6>[   99.724273] PVR_K:      base=0x0dc03000 size=00020480(0x00005000) type=free ref=d048d420
I/cat     (  609): <6>[   99.724395] PVR_K:      d048d420: mapping type hm_env, mapping count=1, size=00065536(0x00010000), flags=0x00000201, align=0x8000
I/cat     (  609): <6>[   99.724700] PVR_K:      base=0x0dc08000 size=00032768(0x00008000) type=live ref=d048d420
I/cat     (  609): <6>[   99.724822] PVR_K:      d048d420: mapping type hm_env, mapping count=1, size=00065536(0x00010000), flags=0x00000201, align=0x8000
I/cat     (  609): <6>[   99.724945] PVR_K:      base=0x0dc10000 size=00012288(0x00003000) type=free ref=d048d420
I/cat     (  609): <6>[   99.725067] PVR_K:      d048d420: mapping type hm_env, mapping count=1, size=00065536(0x00010000), flags=0x00000201, align=0x8000
I/cat     (  609): <6>[   99.725189] PVR_K:          base=0x0dc13000 size=00000000(0x00000000) type=span ref=  (null)
I/cat     (  609): <6>[   99.725250] PVR_K:          base=0x0dc13000 size=00053248(0x0000d000) type=span ref=  (null)
I/cat     (  609): <6>[   99.725555] PVR_K:      base=0x0dc13000 size=00051200(0x0000c800) type=live ref=d04e8a80
I/cat     (  609): <6>[   99.725646] PVR_K:      d04e8a80: mapping type hm_env, mapping count=1, size=00053248(0x0000d000), flags=0x00000201, align=0x0020
I/cat     (  609): <6>[   99.725769] PVR_K:      base=0x0dc1f800 size=00002048(0x00000800) type=free ref=d04e8a80
I/cat     (  609): <6>[   99.725860] PVR_K:      d04e8a80: mapping type hm_env, mapping count=1, size=00053248(0x0000d000), flags=0x00000201, align=0x0020
I/cat     (  609): <6>[   99.725952] PVR_K:          base=0x0dc20000 size=00000000(0x00000000) type=span ref=  (null)
I/cat     (  609): <6>[   99.726196] PVR_K:          base=0x0dc20000 size=00053248(0x0000d000) type=span ref=  (null)
....

Many thanks!

  • Hi Hans,

    what version of the DDK are you using?

    The problem perhaps  is do to asynchronous allocation of RA_Alloc when the memory is still in use by something, which causes the fault. 

    Regards,

    Boyko

  • Thanks for your reply!

    I tried the DDK 1.9@2291151 and also the revision 1.9@2166536 with the same results.

    I enabled some debugging output and created a logfile which is attached to this post, which contains some snippets of the following sections:

    • Kernel boot log
    • PVR Drivers starts
    • SGX application starts
    • SGX RA_Alloc failed

    1452.Detailled_log.zip

    Note that I added a dump_stack() on each RA_Alloc to get some more logging information and to see what's going on. I can add some more, please let me know which debugging statements I should enable.

    Looking forward to squash this issue!

    Regards,
    H.Mueller