Programmatically handle DSI exception in c

Hi,

I have developed a C based server program to run inside the Thales Nshield solo HSM. Inside the program I have queu, thread pool and some other data structures developed by my self.

After program starts multiple clients can connect to the server and perform transactions. But after 2-3 days server will crash and program will prints the DSI exception vector. It is hard to find-out the correct error.

error :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
*** World exits: thread 31 caused CPU exception
DSI exception:
Exception vector 00300h
  r0 =00A110F4h  r1 =00553CB8h  r2 =00B07100h  r3 =FFFFFFD9h
  r4 =0000009Ah  r5 =00AC293Ch  r6 =00000000h  r7 =00000000h
  r8 =00AB7F20h  r9 =0000F030h  r10=40002028h  r11=00002000h
  r12=00000000h  r13=00D0B3C8h  r14=00000000h  r15=00000000h
  r16=00554260h  r17=00000000h  r18=00000000h  r19=00000000h
  r20=00AC0000h  r21=00000000h  r22=00AC0000h  r23=00553CE0h
  r24=00DDF000h  r25=00911914h  r26=00DCDA40h  r27=00911900h
  r28=00AC0000h  r29=00554110h  r30=00000000h  r31=FFFFFFD9h
  XER=20000000h  CR =80002028h  LR =00A110F4h  CTR=0013B7CCh
  PC =00A11100h  MSR=0000F030h
  f0   =0000000000000000h  f1   =0000000000000000h
  f2   =0000000000000000h  f3   =0000000000000000h
  f4   =0000000000000000h  f5   =0000000000000000h
  f6   =0000000000000000h  f7   =0000000000000000h
  f8   =0000000000000000h  f9   =0000000000000000h
  f10  =0000000000000000h  f11  =0000000000000000h
  f12  =0000000000000000h  f13  =0000000000000000h
  f14  =0000000000000000h  f15  =0000000000000000h
  f16  =0000000000000000h  f17  =0000000000000000h
  f18  =0000000000000000h  f19  =0000000000000000h
  f20  =0000000000000000h  f21  =0000000000000000h
  f22  =0000000000000000h  f23  =0000000000000000h
  f24  =0000000000000000h  f25  =0000000000000000h
  f26  =0000000000000000h  f27  =0000000000000000h
  f28  =0000000000000000h  f29  =0000000000000000h
  f30  =0000000000000000h  f31  =0000000000000000h
  FPSCR=00000000h[root@localhost bin]#  


How can I solve this? How can we handle DSI exceptions programmatically?

Thank you.
Last edited on
Hi,

Any idea about this?

Thank you.
Hi,

Thank you for the reply. The code is very big. If there is a way to handle these kind of exceptions or is there a way to debug the code easily please tel me.

Thank you.
How can we handle DSI exceptions programmatically?
I don't think that it is possible. It is a CPU exception which ends the program immediately.

How can I solve this?
Well, you read or write memory that you are not supposed to read or write. Check whether there are uninitialized variables (and initialize them).

Maybe at one point you allocate to much memory.

With raw pointer you have a lot of possible hard to detect errors like double free, access memory that is already freed, shallow copy, etc. Use smart pointer instead.

There's also the index out of bounds error. And more.
Hi coder777,

Thank you very very much for the reply. I'll check my code.
Topic archived. No new replies allowed.