2011-04-03 13:01:29     CPLB miss in Application

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

2011-04-03 13:01:29     CPLB miss in Application

Usama Shakeel (PAKISTAN)

Message: 99553   






I am unable to understand the reason for the following error. Because when I declare one more Variable in my code it crashes most probably what I can think of is that allcated memory is being already being used by some pointer after reading the following link






Kindly let me know is it related to DEBUG_BFIN_NO_KERN_HWTRACE, as mentioned in the following thread.










Data access CPLB miss

<5> - Used by the MMU to signal a CPLB miss on a data access.

Deferred Exception context


COMM=finalapp PID=183  CPU=0

TEXT = 0x02a80040-0x02a8e020        DATA = 0x02a8e040-0x02a90a28

BSS = 0x02a90a28-0x02a99a00  USER-STACK = 0x02aa5f7c


return address: [0x02a868bc]; contents of:

0x02a86890:  0810  0144  0145  cc04  2a09  9003  0000  cc04

0x02a868a0:  6a28  9004  0000  1817  0811  0605  4f10  3420

0x02a868b0:  67fa  320a  4f1a  3622  e0a2  1006 [c803] 1800

0x02a868c0:  9003  9e03  c803  1800  9004  9f84  3422  e13c


ADSP-BF532-0.5(Detected 0.6) 400(MHz CCLK) 66(MHz SCLK) (mpu off)

Linux version (usama@usama-desktop) (gcc version 4.3.5 (ADI-2010R1-RC4) ) #20 Sun Apr 3 12:41:50 PKT 2011


SEQUENCER STATUS:               Not tainted

SEQSTAT: 00060026  IPEND: 0008  IMASK: ffff  SYSCFG: 0006

  EXCAUSE   : 0x26

  physical IVG3 asserted : <0xffa08760> { _trap + 0x0 }

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

RETN: <0x007a8000> /* kernel dynamic memory */

RETX: <0x00000480> /* Maybe fixed code section */

RETS: <0x02a8282a> [ finalapp + 0x27ea ]

PC  : <0x02a868bc> [ finalapp + 0x687c ]

DCPLB_FAULT_ADDR: <0x1584d314> /* unconnected memory */

ICPLB_FAULT_ADDR: <0x02a868bc> [ finalapp + 0x687c ]


R0 : 1544ba0c    R1 : 02a89742    R2 : 2a897418    R3 : 26e978d5

R4 : 40238831    R5 : 05512e83    R6 : 00386a18    R7 : 02a89742

P0 : 00a01914    P1 : 05512e83    P2 : 02a932a0    P3 : 02aa5f80

P4 : 00000000    P5 : 02b07ffc    FP : 02aa5744    SP : 007a7f24

LB0: 02a868c5    LT0: 02a868bc    LC0: 05512e82

LB1: 02a8c30b    LT1: 02a8c2d4    LC1: 00000000

B0 : 00401904    L0 : 2a897418    M0 : 1544ba0c    I0 : 1584d314

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 00000001

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

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 0000001a

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

USP : 02aa570c  ASTAT: 02003044





2011-04-03 18:45:47     Re: CPLB miss in Application


Message: 99555   


CPLB miss could means a lot of different things. Here are the several repeatable cases that I have seen with this type of error:


case 1: In my last encounter w/ CPLB miss, app causes stack overflow running too deep of a recursion. To quickly verify if it is related to this, you can simply reduce size of some stack variables and retry.  If the problem goes away, you're moving in the right direction.


case 2: I have also seen CPLB miss if you use pragma pack(1) and try to type cast a ptr of even-byte variable (e.g. int) into odd boundary, this would be the reason if the problem goes away when, say, you change you added variable from a char into an int.


case 3: dereferencing NULL ptr.


Using gdbserver also gives you a hint of what's happening. I was able to identify all these cases: In the 2nd and 3rd case case, you can view a task trace (I used ddd) and the thread will be locked at the bad assignment.  In the 1st caes, all pthread info' could be trashed, and you won't be even able get the list of running threads.




2011-04-03 20:00:07     Re: CPLB miss in Application


Message: 99556   


Mike's resp to a similar problem






2011-04-05 01:23:27     Re: CPLB miss in Application

Usama Shakeel (PAKISTAN)

Message: 99577   


  Thanks Paul for the informative reply,


Actually I was trying to figure out the problem that is why I got late on reply.

The reason seems to be of deep recursion as when I reduce the number of iteration of loop it seems to work. Although I tried increasing the stack size of an application while compiling it, but it did not worked. Can you help how you resolved when you came across similar problem?



Usama Bin Shakeel




2011-04-05 07:40:34     Re: CPLB miss in Application


Message: 99597   


if your application is pthread based, you may need to set the stack of individual threads using pthread_attr_setstacksize(). I never tried it, though.


Personnally I never want to change the default stack settings because some unrelated code may depend on it. Here are a few suggestions:


- reduce the size of stack array variables


- declare the stack arrays as static, as long as it is ok to reuse (i.e. overwriting) the array when recursing in.


- change your algorithm so that you don't need to do a recursion at all.




2011-04-08 05:12:49     Re: CPLB miss in Application

Aaron Wu (CHINA)

Message: 99689   


What's the latest status for this problem, do you have a specific example to reproduce this issue?