#1 Help on rootcausing crash issue with PCD

closed
nobody
None
5
2011-03-14
2010-10-22
Anonymous
No

Hi Shalom,

Currently Iam debugging some issue ,where in snmp agent crashes on some scenario.snmp agent is been started using PCD.

This does not seems to show the actual place of crash(SIGSEGV). With gdb could not pin point because of timing issues. Looks like there is some problem on free part of the subagent code on some scenarios.But we could not get any backtrace of the stack.When running with PCD , below is the trace of it.. Any suggestion for debugging this "Address not mapped" issue.Could not exactly get much with object dump.I believe, Iam missing some thing.

**************************************************************************

**************************** Exception Caught ****************************

**************************************************************************

Signal information:

Time: Thu Jan 1 00:03:48 1970

Process name: /usr/sbin/snmpd

PID: 616

Fault Address: 0x0817e6e4

Signal: Segmentation fault

Signal Code: Address not mapped to object

Last error: No such file or directory (2)

Last error (by signal): 0

ARM registers:

trap_no=0x0000000e

error_code=0x00000005

oldmask=0x00000000

r0=0x040bf36c

r1=0x040bf36c

r2=0x0000004b

r3=0x00000001

r4=0x0817e6e0

r5=0x040bf374

r6=0x040bf374

r7=0x00000003

r8=0x00000000

r9=0x00000000

r10=0x00000000

fp=0x0e99b69c

ip=0x00184fa0

sp=0x0e99b658

lr=0x04037d4b

pc=0x040a5374

cpsr=0x00000030

fault_address=0x0817e6e4

Maps file:

00008000-0017d000 r-xp 00000000 1f:06 1060 /usr/sbin/snmpd

00184000-00188000 rw-p 00174000 1f:06 1060 /usr/sbin/snmpd

00188000-001df000 rwxp 00188000 00:00 0 [heap]

04000000-04005000 r-xp 00000000 1f:06 694 /lib/ld-uClibc-0.9.29.so

04005000-04007000 rw-p 04005000 00:00 0

0400c000-0400d000 r--p 00004000 1f:06 694 /lib/ld-uClibc-0.9.29.so

0400d000-0400e000 rw-p 00005000 1f:06 694 /lib/ld-uClibc-0.9.29.so

0400e000-04028000 r-xp 00000000 1f:06 787 /lib/libticc.so

04028000-04030000 ---p 04028000 00:00 0

04030000-04032000 rw-p 0001a000 1f:06 787 /lib/libticc.so

04032000-0403c000 r-xp 00000000 1f:06 739 /lib/libpthread-0.9.29.so

0403c000-04043000 ---p 0403c000 00:00 0

04043000-04044000 r--p 00009000 1f:06 739 /lib/libpthread-0.9.29.so

04044000-04045000 rw-p 0000a000 1f:06 739 /lib/libpthread-0.9.29.so

04045000-04047000 rw-p 04045000 00:00 0

04047000-0404d000 r-xp 00000000 1f:06 624 /lib/libuci.so.0.7

0404d000-04055000 ---p 0404d000 00:00 0

04055000-04056000 rw-p 00006000 1f:06 624 /lib/libuci.so.0.7

04056000-04058000 r-xp 00000000 1f:06 635 /lib/libuciwrapper.so

04058000-0405f000 ---p 04058000 00:00 0

0405f000-04060000 rw-p 00001000 1f:06 635 /lib/libuciwrapper.so

04060000-04063000 r-xp 00000000 1f:06 1204 /usr/lib/liblim.so

04063000-0406b000 ---p 04063000 00:00 0

0406b000-04077000 rw-p 00003000 1f:06 1204 /usr/lib/liblim.so

04077000-040b2000 r-xp 00000000 1f:06 697 /lib/libuClibc-0.9.29.so

040b2000-040b9000 ---p 040b2000 00:00 0

040b9000-040ba000 r--p 0003a000 1f:06 697 /lib/libuClibc-0.9.29.so

040ba000-040bb000 rw-p 0003b000 1f:06 697 /lib/libuClibc-0.9.29.so

040bb000-040c0000 rw-p 040bb000 00:00 0

040c0000-040cb000 r-xp 00000000 1f:06 775 /lib/libgcc_s.so.1

040cb000-040d2000 ---p 040cb000 00:00 0

040d2000-040d3000 rw-p 0000a000 1f:06 775 /lib/libgcc_s.so.1

040d3000-040d5000 r-xp 00000000 1f:06 427 /lib/libdl-0.9.29.so

040d5000-040dc000 ---p 040d5000 00:00 0

040dc000-040dd000 r--p 00001000 1f:06 427 /lib/libdl-0.9.29.so

040dd000-040de000 rw-p 00002000 1f:06 427 /lib/libdl-0.9.29.so

0e987000-0e99c000 rwxp 0e987000 00:00 0 [stack]

**************************************************************************

Regards,
-Sathish

Discussion

  • Hai Shalom

    Hai Shalom - 2010-10-22

    Sathish,

    This is a classical case of a segmentation fault, where your program tries to access a segment in memory which it is not allowed to.
    The PC shows that the crash was inside the C library, and the fault address shows the address it was trying to access, indeed it is not mapped to your program.
    The LR may suggest that the caller might be a function in pthread.
    You should reduce the PC address from the uClibc base address and get the offset inside it. Then look for the function in that offset in the objdump of libuClibc to figure out what was the crashing function.

     
  • Hai Shalom

    Hai Shalom - 2011-03-14
    • status: open --> closed