AnsweredAssumed Answered

pppd v2.4.5 crash on Buildroot trunk

Question asked by ToSa on Oct 15, 2012
Latest reply on Oct 22, 2012 by sonic

Hi.

 

I'm trying to evaluate BF609 platform, and I'm using Buildroot trunk distro and 2012R1-RC2 toolchain. While trying to connect to a 3G GSM module the system crashed in pppd application. Here's the crash trace:

 

root:/> pppd /dev/ttyUSB2 file /etc/ppp/gprs-options &

[1] 366 pppd /dev/ttyUSB2 file /etc/ppp/gprs-options

root:/> Undefined instruction

<5> - May be used to emulate instructions that are not defined for

<5>   a particular processor implementation.

Deferred Exception context

CURRENT PROCESS:

COMM=pppd PID=366  CPU=0

TEXT = 0x04c80000-0x04cb12d0        DATA = 0x04d002d0-0x04d50068

BSS = 0x04d50068-0x04ce0000  USER-STACK = 0x04cffe40

 

return address: [0x05288112]; contents of:

0x052880f0:  0092  7082  78c9  2000  e490  1480  3240  0e80

0x05288100:  8205  c0ea  1ea4  e214  0004  3190  1009  c192

0x05288110:  e09a [74ae] 9180  0206  2032  5002  4300  00a4

0x05288120:  648e  a300  0410  0150  c018  a201  0828  c081

 

Compiled for cpu family 0x27fe (Rev 0), but running on:0x0000 (Rev 0)

ADSP-BF609-0.0 500(MHz CCLK) 100(MHz SCLK) (mpu off)

Linux version 3.3.0-ADI-2012R1 (tosa@localhost) (gcc version 4.3.5 (ADI) ) #11 Mon Oct 15 10:52:55 BST 2012

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 00000021  IPEND: 0008  IMASK: ffff  SYSCFG: 2806

  EXCAUSE   : 0x21

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

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

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

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

RETS: <0x04c87546> [ /usr/sbin/pppd + 0x7546 ]

PC  : <0x05288112> /* kernel dynamic memory */

DCPLB_FAULT_ADDR: <0xff800ffc> /* on-chip Data Bank A */

ICPLB_FAULT_ADDR: <0x05288112> /* kernel dynamic memory */

PROCESSOR STATE:

R0 : 04cffbec    R1 : 00000007    R2 : 0000c0b0    R3 : 0000c0b0

R4 : 00000000    R5 : 040e4168    R6 : 00000007    R7 : 0000016f

P0 : 000000be    P1 : 05004104    P2 : 040344f8    P3 : 90080410

P4 : 04d03bf0    P5 : 04d0bdb4    FP : 04cffbc4    SP : 04acbf24

LB0: 0498c59f    LT0: 0498c59e    LC0: 00000000

LB1: 049eec59    LT1: 049eec52    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : fffffffc    I0 : 04cff9a4

B1 : 000000c0    L1 : 00000000    M1 : 00000001    I1 : 04b211a0

B2 : 7ffff000    L2 : 00000000    M2 : 00001802    I2 : 80000000

B3 : 00000000    L3 : 00000000    M3 : 0000005b    I3 : 001a2880

A0.w: 0000c0b0   A0.x: 00000000   A1.w: 00000014   A1.x: 00000000

USP : 04cffba8  ASTAT: 02001044

 

Hardware Trace:

   0 Target : <0x00003ec8> { _trap_c + 0x0 }

     Source : <0xffa007b8> { _exception_to_level5 + 0xa0 } CALL pcrel

   1 Target : <0xffa00718> { _exception_to_level5 + 0x0 }

     Source : <0xffa005d2> { _bfin_return_from_exception + 0x6 } RTX

   2 Target : <0xffa005cc> { _bfin_return_from_exception + 0x0 }

     Source : <0xffa00670> { _ex_trap_c + 0x70 } JUMP.S

   3 Target : <0xffa00600> { _ex_trap_c + 0x0 }

     Source : <0xffa0084e> { _trap + 0x2a } JUMP (P4)

   4 Target : <0xffa00824> { _trap + 0x0 }

      FAULT : <0x05288112> /* kernel dynamic memory */ 0x74ae

     Source : <0x0528810e> /* kernel dynamic memory */ 0xc192e09a

   5 Target : <0x0528810e> /* kernel dynamic memory */

     Source : <0x05004106> /* kernel dynamic memory */ JUMP.L

   6 Target : <0x05004104> /* kernel dynamic memory */

     Source : <0xffa0057e> { _ex_dcplb_miss + 0x66 } RTX

   7 Target : <0xffa00518> { _ex_dcplb_miss + 0x0 }

     Source : <0xffa0084e> { _trap + 0x2a } JUMP (P4)

   8 Target : <0xffa00824> { _trap + 0x0 }

     Source : <0x04c86992> [ /usr/sbin/pppd + 0x6992 ] JUMP (P1)

   9 Target : <0x04c8698a> [ /usr/sbin/pppd + 0x698a ]

     Source : <0x04c87542> [ /usr/sbin/pppd + 0x7542 ] JUMP.L

  10 Target : <0x04c8753a> [ /usr/sbin/pppd + 0x753a ]

     Source : <0x04c87528> [ /usr/sbin/pppd + 0x7528 ] IF !CC JUMP pcrel (BP)

  11 Target : <0x04c87524> [ /usr/sbin/pppd + 0x7524 ]

     Source : <0x049cc0b6> [ /lib/libuClibc-0.9.29.so + 0xc0b6 ] RTS

  12 Target : <0x049cc0b6> [ /lib/libuClibc-0.9.29.so + 0xc0b6 ]

     Source : <0xffa00d3c> { __common_int_entry + 0xcc } RTI

  13 Target : <0xffa00cda> { __common_int_entry + 0x6a }

     Source : <0xffa00f76> { _evt_system_call + 0x66 } JUMP.S

  14 Target : <0xffa00f76> { _evt_system_call + 0x66 }

     Source : <0xffa009da> { _system_call + 0xbe } RTS

  15 Target : <0xffa009d6> { _system_call + 0xba }

     Source : <0xffa009c6> { _system_call + 0xaa } IF !CC JUMP pcrel

Userspace Stack

Stack info:

SP: [0x04cffba8] <0x04cffba8> [ pppd + 0x1fba8 ]

FP: (0x04cffc54)

Memory from 0x04cffba0 to 04d00000

04cffba0: 049ef5b2  04cffbbc [049ef5e0] 00000000  00000000  04034028  00000008  04cffbec

04cffbc0: 04c8776e  04d0bdb8  00000001  00000000  040e4168  00000007  00000007  04ca59ac

04cffbe0: 040e4168  00000000  ffffffff  04cffc54  04c9ca0a  04d0b5cc  04d03bf0  00000066

04cffc00: 00000001  04d0b764  00000007  0000003c  00020002  00000000  040e4168  04cffc4c

04cffc20: 04c96ec6  04d03bf0  00000010  040e4628  040e4600  04cffc70  04c870e0  04d03bf0

04cffc40: 04d0b79c  04d0b76c  04cffc70  049ec064  040e45fc (04cffc80)<04c9486c> 04d03bf0

04cffc60: 04d0b7d0  04d07148  00000003  00000000  04d0b78c  04c88b28  04d03bf0  04d0bdb4

04cffc80:(04cffd60) 04c88b38  04d03bf0  04d0bdb4  04cfff00  00000000  04ca5d70  0000016e

04cffca0: 00000000  04d0bdcc  04d0c3dc  04d0056c  04d0bdc0  04d0bde0  04d0d3f0  04d0c3d4

04cffcc0: 04d00978  04d03610  00014803  00000000  00000000  00000000  00000000  00000000

04cffce0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

04cffd00: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

04cffd20: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

04cffd40: 00000000  00000000  00000000  04989080  00363633  04034990  04cfff45  04cfff00

04cffd60:(04cffe04)<049efe7e> 04b211a0  040349a8  04cfff45  04cfff00  04cfff20  00000004

04cffd80: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

04cffda0: 00000000  00000003  04c80034  00000004  00000020  00000005  00000006  00000006

04cffdc0: 00001000  00000007  04988000  00000008  00000000  00000009  04c86b80  00000000

04cffde0: 00000000  0000000b  00000000  0000000c  00000000  0000000d  00000000  0000000e

04cffe00: 00000000 (00000000) 04c86bae  04173bb0  04c86b80  04173b98  04cfff00  04cfff20

04cffe20: 04c86b84  040349a8  04cfff00  04cffe44  04034990  04034998  04173b98  04cfff2c

04cffe40: 00000004  04cfff45 <04cfff4a> 04cfff57 <04cfff5c> 00000000 <04cfff72> 04cfff79

04cffe60: 04cfff84  04cfff98  04cfff9e  04cfffc1  04cfffcf  04cfffd9  00000000  00000010

04cffe80: 00000000  00000006  00001000  00000011  00000064  00000003  04c80034  00000004

04cffea0: 00000020  00000005  00000006  00000007  04988000  00000008  00000000  00000009

04cffec0: 04c86b80  0000000b  00000000  0000000c  00000000  0000000d  00000000  0000000e

04cffee0: 00000000  00000017  00000000  0000001f  0001ffed  00000000  00000000  00000000

04cfff00: 00020000  04988000  00000000  00004ae0  04173ae0  00005ae0  00000264  00000000

04cfff20: 00020000  04c80000  00000000 <000312d0> 04d002d0  000322d0 <0004fd98> 00000000

04cfff40: 00000000  70707000  642f0064  742f7665  53557974  66003242  00656c69  6374652f

04cfff60: 7070702f  7270672f  706f2d73  6e6f6974  4f480073  2f3d454d  52455400  74763d4d

04cfff80: 00323031  696b6c63  7a685f6e  3532283d  30303030  00293030  3d445750  4150002f

04cfffa0: 2f3d4854  6e696273  73752f3a  62732f72  2f3a6e69  3a6e6962  7273752f  6e69622f

04cfffc0: 45485300  2f3d4c4c  2f6e6962  55006873  3d524553  746f6f72  53554800  45565f48

04cfffe0: 4f495352  2e313d4e  322e3032  73752f00  62732f72  702f6e69  00647070  00000000

Return addresses in stack:

   frame  1 : <0x04c9486c> [ /usr/sbin/pppd + 0x1486c ]

   frame  3 : <0x049efe7e> [ /lib/libuClibc-0.9.29.so + 0x2fe7e ]

    address : <0x04cfff4a> [ pppd + 0x1ff4a ]

    address : <0x04cfff5c> [ pppd + 0x1ff5c ]

    address : <0x04cfff72> [ pppd + 0x1ff72 ]

    address : <0x000312d0> { _pc_clock_getres + 0x10 }

    address : <0x0004fd98> { _fput + 0x74 }

 

I tried to debug the crash using gdb, but failed because pppd uses forks, which gdb apparently doesn't fully support (tried follow-fork-mode option set to child in gdb, still no success).

 

I have attached a patch to pppd which changes the fork to vfork, and removes HAS_SHADOW from the makefile.

 

Is there anything else I missed in the pppd code? Any other hints how to debug child process?

 

Thanks, Tom

Outcomes