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.

MPEG4 decoder multiples instances running

Hello team,

For the past couple of months we have been analyzing an issue regarding multiple instances of mpeg4 decoder in L25 Inc 3.4 (Android: Froyo) , which are generating an MMU fault in the following scenarios:

- When inserting an SD card with samples and immediately start recording a clip. Thumbnails are being generated in the background, calling MPEG4 decoder, and after the recording session has finished, another MPEG4 decoder instance is called to generate the thumbnail of the video that has just been recorded.
- When recording quick and short clips (about 1 second long). Thumbnails are being generated in very short periods of time, hence the MPEG4 decoder is called constantly.

There has been a lot of verifying in different components but we are still unsure of the actual cause of this problem, therefore we'd like you to help us out here, since recently we found out a couple of issues that might be a bit similar to the one we are addressing (The FC version we are using is FC 1_10_4):

1. SDOCM00057720 Multiple Deletion Creation sequence of MPEG4 encoder results in failure in Framework Components resource allocation
2. SDOCM00058267 EDMA3 Resource Manager overshoots the maximum limit when multiple encoders are created and deleted
3. SDOCM00051059 RMAN has a negative array access (rman.c approx line# 195)
4. OMAPS00081737 - Race condition can happen in DSKT2_freeAlg
5. SDOCM00071854 DMAN3 for ARM/Linux segfaults in DMAN3_releaseChannels

6. OMAPS00079710 - DSKT2 should not try to deactivate an codec instance that does not provide algDeactivate() SDOCM00063763

But since these have been resolved for the latest version of FC, specific modifications might not be able to be implemented in our version due to dependencies.

SN team has also been working debugging this issue but so the only piece that they've found that makes the MMU fault appear is the DSKT2.
SN team disabled the DSKT2 and ran tests that threw the following results:

  1. NO_DSKT2 - We do not get any DSP MMU fault but we see a message “Sorry! The application OMAP3 Camera (process com.ti.omap3.android.camera) has stopped unexpectedly. Please try again.” on the display (this is due to a wrong setting in the parameters of the video that will be encoded next).
  2. DSKT2.txt - We get a DSP MMU fault and we see a message “Sorry! The application OMAP3 Camera (process com.ti.omap3.android.camera) has stopped unexpectedly. Please try again.” on the display.

The MMU fault we are observing is seen as something like this (SN team added traces for an easier tracking):

 Send ACK 2025f810

DSPTrace:Back to USN 2025f810
DSPTrace:SET status
Return from Control
Send ACK 2025f810
DSPTrace:Back to USN 2025f810
DSPTrace:STOP
Return from Control
DSPTrace:FLUSH 0
Return from Control
DSPTrace:FLUSH 1
Return from Control
DSPTrace:Entering MPEG4D: Create 20261fc8
DSPTrace:Exiting MPEG4D:Create 20261fc8
DSPTrace:Entering MPEG4D:Delete 2025f810
DSPTrace:Exiting MPEG4D:delete 2025f810
DSPTrace:SET Default
Return from Control
Send ACK 20261fc8
Back to USN 20261fc8
***** DSPMMU FAULT ***** IRQStatus 0x2
***** DSPMMU FAULT ***** fault_addr 0x2082c300
bridge_deh_notify: ********** DEVICE EXCEPTION **********
bridge_deh_notify: DSP_MMUFAULT,err_info = 0x0
bridge_deh_notify: DSP_MMUFAULT, High Address = 0x2082
bridge_deh_notify: DSP_MMUFAULT, Low Address = 0xc300
bridge_deh_notify: DSP_MMUFAULT, fault address = 0x2082c300
print_dsp_trace_buffer: DSP Trace Buffer Begin:
=======================
ering MPEG4D:Delete 2025f810
Exiting MPEG4D:delete 2025f810
Entering MPEG4D: Create 2025f810
Exiting MPEG4D:Create 2025f810
SET Default
Return from Control
Send ACK 2025f810
Back to USN 2025f810
SET status
Return from Control
Send ACK 2025f810
Back to USN 2025f810
STOP
Return from Control
FLUSH 0
Return from Control
FLUSH 1
Return from Control
Entering MPEG4D:Delete 2025f810
Exiting MPEG4D:delete 2025f810
Entering MPEG4E:Create 2025f810
Exiting MPEG4E:Create 2025f810
Calling Process from USN 
Calling Process from USN 
Calling Process from USN 
Entering  MPEG4E:Delete 2025f810
Exiting MPEG4E:delete 2025f810
Entering MPEG4D: Create 2025f810
Exiting MPEG4D:Create 2025f810
SET Default
Return from Control
Send ACK 2025f810
Back to USN 2025f810
Entering MPEG4D: Create 20261fc8
Exiting MPEG4D:Create 20261fc8
SET Default
Return from Control
Send ACK 20261fc8
Back to USN 20261fc8
SET status
Return from Control
Send ACK 2025f810
Back to USN 202

=======================
DSP Trace Buffer End:

Dynamically Loaded Modules:
---------------------------
mp4vdec_sn.o64P
    Section: 0x20006f80 
mp4vd_nodecode
    Section: 0x2005fc00 
mp4vd_noderom
    Section: 0x20064a80 
mp4vd_nodedata
conversions.o64P
    Section: 0x20003280 
conversions_nodecode
    Section: 0x20006e80 
.far
ringio.o64P
    Section: 0x20002a80 
ringio_code
usn.o64P
    Section: 0x20000000 
usn_nodecode
    Section: 0x20002980 
.const
dump_dsp_stack:No DSP MMU-Fault information available.

And one with more details

DSPTrace:Entering MPEG4D: Create 2025f818
DSPTrace:Exiting MPEG4D:Create 2025f818
DSPTrace:SET Default
Return from Control
DSPTrace:SET status
Return from Control
DSPTrace:Entering MPEG4D:Delete 2025f818
DSPTrace:Exiting MPEG4D:delete 2025f818
DSPTrace:Entering MPEG4D: Create 2025f818
***** DSPMMU FAULT ***** IRQStatus 0x2
***** DSPMMU FAULT ***** fault_addr 0x244eec00
bridge_deh_notify: ********** DEVICE EXCEPTION **********
bridge_deh_notify: DSP_MMUFAULT,err_info = 0x0
bridge_deh_notify: DSP_MMUFAULT, High Address = 0x244e
bridge_deh_notify: DSP_MMUFAULT, Low Address = 0xec00
bridge_deh_notify: DSP_MMUFAULT, fault address = 0x244eec00
print_dsp_trace_buffer: DSP Trace Buffer Begin:
=======================
te 2025f8a8
SET Default
Return from Control
SET status
Return from Control
Entering MPEG4D:Delete 2025f8a8
Exiting MPEG4D:delete 2025f8a8
Entering MPEG4D: Create 2025f8a8
Exiting MPEG4D:Create 2025f8a8
SET Default
Return from Control
SET status
Return from Control
STOP
Return from Control
FLUSH 0
Return from Control
FLUSH 1
Return from Control
Entering MPEG4D:Delete 2025f8a8
Exiting MPEG4D:delete 2025f8a8
Entering MPEG4D: Create 2025f8a8
Exiting MPEG4D:Create 2025f8a8
SET Default
Return from Control
SET status
Return from Control
Entering MPEG4D:Delete 2025f8a8
Exiting MPEG4D:delete 2025f8a8
Entering MPEG4D: Create 2025f8a8
Exiting MPEG4D:Create 2025f8a8
SET Default
Return from Control
SET status
Return from Control
Entering MPEG4D:Delete 2025f8a8
Exiting MPEG4D:delete 2025f8a8
Entering MPEG4D: Create 2025f8a8
Exiting MPEG4D:Create 2025f8a8
SET Default
Return from Control
SET status
Return from Control
STOP
Return from Control
FLUSH 0

=======================
DSP Trace Buffer End:

Dynamically Loaded Modules:
---------------------------
mp4vdec_sn.o64P
    Section: 0x20006e80 
mp4vd_nodecode
    Section: 0x2005fb00 
mp4vd_noderom
    Section: 0x20064980 
mp4vd_nodedata
conversions.o64P
    Section: 0x20003180 
conversions_nodecode
    Section: 0x20006d80 
.far
ringio.o64P
    Section: 0x20002980 
ringio_code
usn.o64P
    Section: 0x20000000 
usn_nodecode
    Section: 0x20002880 
.const

Aproximate Crash Position:
--------------------------
0x20240240 [Unable to match to a symbol.]

Execution Info:
---------------
Execution context 	Task
Task Handle		0x204aaa74
Stack Pointer		0x204a4f28
Stack Top		0x204a30e0
Stack Bottom		0x204a50e0
Stack Size		0x2000
Stack Size In Use	0x1b8

CPU Registers
---------------
A0 0x0
A1 0x0
A2 0x1
A3 0x24542cc8
A4 0x0        [Function Argument 1]
A5 0x0
A6 0x24539680 [Function Argument 3]
A7 0x0
A8 0x0        [Function Argument 5]
A9 0x0
A10 0x24539680
A11 0x24539680
A12 0x0
A13 0x2f680
A14 0x2025f818
A15 0x3c       [Frame Pointer]
A16 0x0
A17 0x24539680
A18 0x19
A19 0x1ef7f
A20 0x100
A21 0x2940
A22 0x7b4
A23 0x7b4
A24 0x1c0
A25 0x1c0
A26 0x0
A27 0x1
A28 0x20059144
A29 0xf80f
A30 0xc60
A31 0x20261dd4

B0 0x0
B1 0x1
B2 0x0
B3 0x202529d0 [Function Return Pointer:Unable to match to a symbol.]
B4 0x0        [Function Argument 2]
B5 0x0
B6 0x24542cc0 [Function Argument 4]
B7 0x2f68
B8 0x20261dc0 [Function Argument 6]
B9 0x2024fd44
B10 0x4
B11 0x2005be04
B12 0x0
B13 0x2022c378
B14 0x204a9890 [Data Page Pointer]
B15 0x204a4f28
B16 0x4
B17 0x1380
B18 0xa00
B19 0x0
B20 0xca80
B21 0x1880
B22 0x8
B23 0x2f680
B24 0x4
B25 0x4ff
B26 0x17c
B27 0x1c21064
B28 0x3
B29 0x1
B30 0x80
B31 0x1

EFR 0x0
IERR 0x30
ITSR 0x400f
NTSR 0x10000
IRP 0x20240240
NRP 0x0
AMR 0x0
SSR 0x0
ILC 0x2604
RILC 0x8
IER 0xa013
CSR 0x10020102

Stack:
------
[0] 0x0
[1] 0xf400
[2] 0x2005fa00
[3] 0x202379e8
[4] 0x2025c200
[5] 0x2025c200
[6] 0x0
[7] 0x20261dc0
[8] 0x3
[9] 0x11
[10] 0x21
[11] 0x21
[12] 0x20050001
[13] 0x5
[14] 0x2022b454
[15] 0x5
[16] 0x20261dc0
[17] 0x19
[18] 0x21
[19] 0x3
[20] 0x0
[21] 0x1
[22] 0x2005fa00
[23] 0x2005ba8c
[24] 0x2005fa00
[25] 0x2005fa00
[26] 0x2005ba8c
[27] 0x5
[28] 0x20065d34 ["_M4H3DEC_TI_IM4H3DEC" + 0x0]
[29] 0x0
[30] 0x204a4fd4
[31] 0x21
[32] 0x24537098
[33] 0x2025f818
[34] 0x19
[35] 0x1f4
[36] 0x20261dc0
[37] 0x19
[38] 0x0
[39] 0x8
[40] 0x24537098
[41] 0x2025f818
[42] 0x24537098
[43] 0x1c
[44] 0x90
[45] 0xb0
[46] 0x7530
[47] 0x3d0900
[48] 0x1
[49] 0x4
[50] 0x24537098
[51] 0x8000
[52] 0x2025c25c
[53] 0x200648b4
[54] 0x2025f818
[55] 0x24537210
[56] 0x2024e2e0
[57] 0x2023f900
[58] 0x2023222c
[59] 0x20232070
[60] 0x0
[61] 0x0
[62] 0x0
[63] 0x0
[64] 0x2025f818
[65] 0x0
[66] 0x0
[67] 0x0
[68] 0x2025c260
[69] 0x0
[70] 0x202404a8
[71] 0x204a5084
[72] 0x202519f0
[73] 0x2005bb90 ["_MP4VDSOCKET_TI_create" + 0x0]
[74] 0x1
[75] 0x2025c1ec
[76] 0x2025c23c
[77] 0x20261a30
[78] 0x2025c1f0
[79] 0x8000
[80] 0x2025c25c
[81] 0x2025c25c
[82] 0x2025c260
[83] 0x2025c1ec
[84] 0x2025f818
[85] 0x0
[86] 0x0
[87] 0xffffffff
[88] 0x0
[89] 0x2000
[90] 0x0
[91] 0x0
[92] 0x204a9174
[93] 0x10001
[94] 0x2025f9b0
[95] 0x2005bb90 ["_MP4VDSOCKET_TI_create" + 0x0]
[96] 0x10
[97] 0x21
[98] 0x2025c0c0
[99] 0x80
[100] 0x0
[101] 0x0
[102] 0x0
[103] 0x0
[104] 0x0
[105] 0x2025c1e0
[106] 0x2025c04c
[107] 0x0
[108] 0x20250d40
[109] 0x0
proc_load: Processor Loaded /system/lib/dsp/baseimage.dof
omap mailbox rev 4.0
proc_start: dsp in running state
DSPTrace:Entering MPEG4D: Create 2025f818
DSPTrace:Exiting MPEG4D:Create 2025f818
DSPTrace:SET Default
Return from Control
DSPTrace:SET status
Return from Control
DSPTrace:Entering MPEG4D:Delete 2025f818
DSPTrace:Exiting MPEG4D:delete 2025f818
DSPTrace:Entering MPEG4D: Create 2025f818
*
We are debugging this on Zoom 3 boards with 1.2 SOMs. Could you please share your thoughts on this? Do you need any more info? If so, please let us know.
Thank you.
Paulina Duran

  • Paulina, 

    Some notes regarding the CQ #s you have listed:-

    1. SDOCM00057720 Multiple Deletion Creation sequence of MPEG4 encoder results in failure in Framework Components resource allocation
    2. SDOCM00058267 EDMA3 Resource Manager overshoots the maximum limit when multiple encoders are created and deleted
    3. SDOCM00051059 RMAN has a negative array access (rman.c approx line# 195)

    The above 3 CQs are related to libraries that were created much after the 1_10_04 release, they do not have anything to do with the DMAN3 and ACPY3 libraries (which are the only libraries available and being used by your device) in the release you are using.

    5. SDOCM00071854 DMAN3 for ARM/Linux segfaults in DMAN3_releaseChannels

    This issue is related to usage of DMAN3 on an ARM device for managing resources. Per your usage, DMAN3 is being used by the DSP side of OMAP, and not the ARM-side. So this issue is also irrelevant.

    4. OMAPS00081737 - Race condition can happen in DSKT2_freeAlg
    6. OMAPS00079710 - DSKT2 should not try to deactivate an codec instance that does not provide algDeactivate() 

    I'm trying to obtain access to the right database to be able to access the above mentioned IRs. These are the only two that might be relevant. With respect to OMAPS00079710 , going solely by the one line description above, can you check for the codecs being created, if they all implement the IALG_Fxns:algActivate/algDeactivate APIs ?

    I'll try and find out more about OMAPS00081737