[#5135] error info shows when reboot kernel after run oprofile test

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

[#5135] error info shows when reboot kernel after run oprofile test

Submitted By: Vivi Li

Open Date

2009-05-15 07:28:39     Close Date

2009-07-02 03:34:06

Priority:

Medium     Assignee:

Graf Yang

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

Category:

Tests     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

gcc4.1-09r1_rc6

App binary format:

N/A     

Summary: error info shows when reboot kernel after run oprofile test

Details:

 

Reboot kernel after run oprofile test, there will be error info.

 

Run following for oprofile test:

--

root:/> /usr/bin/bfin_opcontrol --init

root:/> /usr/bin/bfin_opcontrol --start-daemon &^M

KSDBG:get cputype=4,counts=1^M

Using 2.6+ OProfile kernel interface.^M

Reading module info.^M

Using log file /var/lib/oprofile/oprofiled.log^M

147^M

root:/> /usr/bin/bfin_opcontrol --start^M

root:/> /usr/bin/bfin_opcontrol --dump^M

root:/> /usr/bin/opreport -l^M

CPU: CPU with timer interrupt, speed 600 MHz (estimated)^M

Profiling through timer interrupt^M

warning: could not check that the binary file /vmlinux has not been modified since the profile was taken. Results may be inaccurate.^M

samples  %        app name                 symbol name^M

1        50.0000  ld-uClibc.so.0           (no symbols)^M

1        50.0000  vmlinux                  _getname^M

root:/>

--

 

Then reboot kernel, there will be error info.

--

root:/> reboot

Illegal use of supervisor resource

- Attempted to use a Supervisor register or instruction from User mode.

   Supervisor resources are registers and instructions that are reserved

   for Supervisor use: Supervisor only registers, all MMRs, and Supervisor

   only instructions.

Deferred Exception context

CURRENT PROCESS:

COMM=oprofiled PID=148

CPU = 0

TEXT = 0x03120000-0x03129358        DATA = 0x03130358-0x03139210

BSS = 0x03139210-0x03140000  USER-STACK = 0x0315fe70

 

return address: [0x0312242e]; contents of:

0x03122400:  e51b  ff9b  0051  e519  ff98  e51b  ff99  0051

0x03122410:  e519  ff96  e51b  ff97  0051  e519  ff94  e51b

0x03122420:  ff95  0051  e519  ff92  e51b  ff93  0051 [e519]

0x03122430:  ff90  e51b  ff91  0051  e519  ff8e  e51b  ff8f

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 0006202e  IPEND: 0030  SYSCFG: 0006

  EXCAUSE   : 0x2e

  interrupts disabled

  physical IVG5 asserted : <0xffa00b8c> { _evt_ivhw + 0x0 }

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

RETN: <0x03110000> [ /usr/lib/libpopt.so.0 + 0x0 ]

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

RETS: <0x03122d7c> [ /usr/bin/oprofiled + 0x2d7c ]

PC  : <0x0312242e> [ /usr/bin/oprofiled + 0x242e ]

DCPLB_FAULT_ADDR: <0xfffffe40> /* kernel dynamic memory */

ICPLB_FAULT_ADDR: <0x0312242e> [ /usr/bin/oprofiled + 0x242e ]

 

PROCESSOR STATE:

R0 : 00000000    R1 : 00000001    R2 : 00880008    R3 : 00000002

R4 : 0315fe74    R5 : 030d0004    R6 : 00000000    R7 : 0315fd04

P0 : 000000be    P1 : 00a8c120    P2 : 030d13f8    P3 : 00000000

P4 : 03130b20    P5 : 03130fd0    FP : 0315fce4    SP : 0310ff24

LB0: 00ae6351    LT0: 00ae6344    LC0: 00000000

LB1: 00a9d68b    LT1: 00a9d68a    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 0315eb91

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

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

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

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

USP : 0315fcd4  ASTAT: 02003004

 

Hardware Trace:

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

     Source : <0xffa0062a> { _exception_to_level5 + 0x9e } CALL pcrel

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

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

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

     Source : <0xffa004e6> { _ex_trap_c + 0x66 } JUMP.S

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

     Source : <0xffa006c4> { _trap + 0x38 } JUMP (P4)

   4 Target : <0xffa006aa> { _trap + 0x1e }

     Source : <0xffa006a6> { _trap + 0x1a } IF !CC JUMP

   5 Target : <0xffa0068c> { _trap + 0x0 }

     Source : <0x03122d78> [ /usr/bin/oprofiled + 0x2d78 ] CALL pcrel

   6 Target : <0x03122d74> [ /usr/bin/oprofiled + 0x2d74 ]

     Source : <0x03122d6c> [ /usr/bin/oprofiled + 0x2d6c ] IF CC JUMP

   7 Target : <0x03122d66> [ /usr/bin/oprofiled + 0x2d66 ]

     Source : <0x00a8c126> [ /lib/libc.so.0 + 0xc126 ] RTS

   8 Target : <0x00a8c126> [ /lib/libc.so.0 + 0xc126 ]

     Source : <0xffa00b88> { __common_int_entry + 0xd8 } RTI

   9 Target : <0xffa00b26> { __common_int_entry + 0x76 }

     Source : <0xffa00d50> { _evt_system_call + 0x64 } JUMP.S

  10 Target : <0xffa00d50> { _evt_system_call + 0x64 }

     Source : <0xffa0084c> { _system_call + 0xb8 } RTS

  11 Target : <0xffa00848> { _system_call + 0xb4 }

     Source : <0xffa00838> { _system_call + 0xa4 } IF !CC JUMP

  12 Target : <0xffa00832> { _system_call + 0x9e }

     Source : <0xffa00822> { _system_call + 0x8e } IF !CC JUMP

  13 Target : <0xffa007fc> { _system_call + 0x68 }

     Source : <0xffa00118> { _sys_rt_sigreturn + 0x10 } RTS

  14 Target : <0xffa00114> { _sys_rt_sigreturn + 0xc }

     Source : <0x00002354> { _do_rt_sigreturn + 0x48 } RTS

  15 Target : <0x00002348> { _do_rt_sigreturn + 0x3c }

     Source : <0x00002a10> { _do_rt_sigreturn + 0x704 } JUMP.S

Userspace Stack

Stack info:

SP: [0x0315fcd4] <0x0315fcd4> [ oprofiled + 0x1fcd4 ]

FP: (0x0315fd94)

Memory from 0x0315fcd0 to 03160000

0315fcd0: 00000000 [03130fd0] 03130b20  0315fd04  00000000  030d0004  0315fe74  0315fd2c

0315fcf0: 00000004  00000001  03130690  00000000  03130880  00004000  00000000  00000000

0315fd10: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0315fd30: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0315fd50: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0315fd70: 00000000  00000000  00000000  00000000  00000000  00000000  031618f0  00000800

0315fd90: 00000800 (0315fe34)<00ab36cc> 0315ff18  031618f0  0315ff6b  0315ff20  03163adc

0315fdb0: 00ae68a4  030d1144  0dfd935e  00000000  00000000  00000000  00000000  00000000

0315fdd0: 00000000  00000003  03120034  00000004  00000020  00000005  00000006  00000006

0315fdf0: 00001000  00000007  00ae0000  00000008  00000000  00000009  031224f8  00000000

0315fe10: 00000000  0000000b  00000000  0000000c  00000000  0000000d  00000000  0000000e

0315fe30: 00000000 (00000000)<03122526> 030d1178  031224f8  030d1170  0315ff20  0315ff40

0315fe50:<031224fc> 0310286c  00000005  0315ff40  0310285c  03102864  030d1170  0315ff4c

0315fe70: 00000005  0315ff6b <0315ff7e> 0315ff81  0315ff82  0315ff8f  00000000 <0315ffa6>

0315fe90: 0315ffad  0315ffbb  0315ffde  00000000  00000010  00000000  00000006  00001000

0315feb0: 00000011  00000064  00000003  03120034  00000004  00000020  00000005  00000006

0315fed0: 00000007  00ae0000  00000008  00000000  00000009  031224f8  0000000b  00000000

0315fef0: 0000000c  00000000  0000000d  00000000  0000000e  00000000  00000017  00000000

0315ff10: 0000001f  0001ffe9  00000000  00000000 <00020000> 00ae0000  00000000  0000701c

0315ff30: 030d101c  0000b01c  00000450  00000000 <00020000> 03120000  00000000  00009358

0315ff50: 03130358  0000d358  00008eb8  00000000  00000000  00000000  2f000000  2f727375

0315ff70: 2f6e6962  6f72706f  656c6966  652d0064  2d2d0000  762d6f6e  6e696c6d  2d007875

0315ff90: 616d692d  2f3d6567  2f6e6962  74656877  6e6f7473  4f480065  2f3d454d  45485300

0315ffb0: 2f3d4c4c  2f6e6962  50006873  3d485441  6e69622f  73752f3a  69622f72  732f3a6e

0315ffd0: 3a6e6962  7273752f  6962732f  4554006e  6c3d4d52  78756e69  73752f00  69622f72

0315fff0: 706f2f6e  69666f72  0064656c  00000000  00000000

Return addresses in stack:

   frame  1 : <0x00ab36cc> [ /lib/libc.so.0 + 0x336cc ]

   frame  2 : <0x03122526> [ /usr/bin/oprofiled + 0x2526 ]

    address : <0x031224fc> [ /usr/bin/oprofiled + 0x24fc ]

    address : <0x0315ff7e> [ oprofiled + 0x1ff7e ]

    address : <0x0315ffa6> [ oprofiled + 0x1ffa6 ]

    address : <0x00020000> { _check_clock + 0x28 }

    address : <0x00020000> { _check_clock + 0x28 }

Illegal use of supervisor resource

- Attempted to use a Supervisor register or instruction from User mode.

   Supervisor resources are registers and instructions that are reserved

   for Supervisor use: Supervisor only registers, all MMRs, and Supervisor

   only instructions.

Deferred Exception context

CURRENT PROCESS:

COMM=oprofiled PID=147

CPU = 0

TEXT = 0x03120000-0x03129358        DATA = 0x03130358-0x03139210

BSS = 0x03139210-0x03140000  USER-STACK = 0x0315fe70

 

return address: [0x0312242e]; contents of:

0x03122400:  e51b  ff9b  0051  e519  ff98  e51b  ff99  0051

0x03122410:  e519  ff96  e51b  ff97  0051  e519  ff94  e51b

0x03122420:  ff95  0051  e519  ff92  e51b  ff93  0051 [e519]

0x03122430:  ff90  e51b  ff91  0051  e519  ff8e  e51b  ff8f

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 0006202e  IPEND: 0030  SYSCFG: 0006

  EXCAUSE   : 0x2e

  interrupts disabled

  physical IVG5 asserted : <0xffa00b8c> { _evt_ivhw + 0x0 }

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

RETN: <0x030d8000> [ watchdogd + 0x0 ]

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

RETS: <0x03122d7c> [ /usr/bin/oprofiled + 0x2d7c ]

PC  : <0x0312242e> [ /usr/bin/oprofiled + 0x242e ]

DCPLB_FAULT_ADDR: <0xfffffe40> /* kernel dynamic memory */

ICPLB_FAULT_ADDR: <0x0312242e> [ /usr/bin/oprofiled + 0x242e ]

 

PROCESSOR STATE:

R0 : 00000000    R1 : 00000001    R2 : 00880008    R3 : 00000002

R4 : 0315fe74    R5 : 030d0004    R6 : 00000000    R7 : 0315fd04

P0 : 000000be    P1 : 00a8c120    P2 : 030d13f8    P3 : 00000000

P4 : 03130b20    P5 : 03130fd0    FP : 0315fce4    SP : 030d7f24

LB0: 00ae6351    LT0: 00ae6344    LC0: 00000000

LB1: 00a9d68b    LT1: 00a9d68a    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 0315eb91

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

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

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

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

USP : 0315fcd4  ASTAT: 02003004

 

Hardware Trace:

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

     Source : <0xffa0062a> { _exception_to_level5 + 0x9e } CALL pcrel

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

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

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

     Source : <0xffa004e6> { _ex_trap_c + 0x66 } JUMP.S

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

     Source : <0xffa006c4> { _trap + 0x38 } JUMP (P4)

   4 Target : <0xffa006aa> { _trap + 0x1e }

     Source : <0xffa006a6> { _trap + 0x1a } IF !CC JUMP

   5 Target : <0xffa0068c> { _trap + 0x0 }

     Source : <0x03122d78> [ /usr/bin/oprofiled + 0x2d78 ] CALL pcrel

   6 Target : <0x03122d74> [ /usr/bin/oprofiled + 0x2d74 ]

     Source : <0x03122d6c> [ /usr/bin/oprofiled + 0x2d6c ] IF CC JUMP

   7 Target : <0x03122d66> [ /usr/bin/oprofiled + 0x2d66 ]

     Source : <0x00a8c126> [ /lib/libc.so.0 + 0xc126 ] RTS

   8 Target : <0x00a8c126> [ /lib/libc.so.0 + 0xc126 ]

     Source : <0xffa00b88> { __common_int_entry + 0xd8 } RTI

   9 Target : <0xffa00b26> { __common_int_entry + 0x76 }

     Source : <0xffa00d50> { _evt_system_call + 0x64 } JUMP.S

  10 Target : <0xffa00d50> { _evt_system_call + 0x64 }

     Source : <0xffa0084c> { _system_call + 0xb8 } RTS

  11 Target : <0xffa00848> { _system_call + 0xb4 }

     Source : <0xffa00838> { _system_call + 0xa4 } IF !CC JUMP

  12 Target : <0xffa00832> { _system_call + 0x9e }

     Source : <0xffa00822> { _system_call + 0x8e } IF !CC JUMP

  13 Target : <0xffa007fc> { _system_call + 0x68 }

     Source : <0xffa00118> { _sys_rt_sigreturn + 0x10 } RTS

  14 Target : <0xffa00114> { _sys_rt_sigreturn + 0xc }

     Source : <0x00002354> { _do_rt_sigreturn + 0x48 } RTS

  15 Target : <0x00002348> { _do_rt_sigreturn + 0x3c }

     Source : <0x00002a10> { _do_rt_sigreturn + 0x704 } JUMP.S

Userspace Stack

Stack info:

SP: [0x0315fcd4] <0x0315fcd4> [ oprofiled + 0x1fcd4 ]

FP: (0x0315fd94)

Memory from 0x0315fcd0 to 03160000

0315fcd0: 00000000 [03130fd0] 03130b20  0315fd04  00000000  030d0004  0315fe74  0315fd2c

0315fcf0: 00000004  00000001  03130690  00000000  03130880  00004000  00000000  00000000

0315fd10: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0315fd30: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0315fd50: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0315fd70: 00000000  00000000  00000000  00000000  00000000  00000000  031618f0  00000800

0315fd90: 00000800 (0315fe34)<00ab36cc> 0315ff18  031618f0  0315ff6b  0315ff20  03163adc

0315fdb0: 00ae68a4  030d1144  0dfd935e  00000000  00000000  00000000  00000000  00000000

0315fdd0: 00000000  00000003  03120034  00000004  00000020  00000005  00000006  00000006

0315fdf0: 00001000  00000007  00ae0000  00000008  00000000  00000009  031224f8  00000000

0315fe10: 00000000  0000000b  00000000  0000000c  00000000  0000000d  00000000  0000000e

0315fe30: 00000000 (00000000)<03122526> 030d1178  031224f8  030d1170  0315ff20  0315ff40

0315fe50:<031224fc> 0310286c  00000005  0315ff40  0310285c  03102864  030d1170  0315ff4c

0315fe70: 00000005  0315ff6b <0315ff7e> 0315ff81  0315ff82  0315ff8f  00000000 <0315ffa6>

0315fe90: 0315ffad  0315ffbb  0315ffde  00000000  00000010  00000000  00000006  00001000

0315feb0: 00000011  00000064  00000003  03120034  00000004  00000020  00000005  00000006

0315fed0: 00000007  00ae0000  00000008  00000000  00000009  031224f8  0000000b  00000000

0315fef0: 0000000c  00000000  0000000d  00000000  0000000e  00000000  00000017  00000000

0315ff10: 0000001f  0001ffe9  00000000  00000000 <00020000> 00ae0000  00000000  0000701c

0315ff30: 030d101c  0000b01c  00000450  00000000 <00020000> 03120000  00000000  00009358

0315ff50: 03130358  0000d358  00008eb8  00000000  00000000  00000000  2f000000  2f727375

0315ff70: 2f6e6962  6f72706f  656c6966  652d0064  2d2d0000  762d6f6e  6e696c6d  2d007875

0315ff90: 616d692d  2f3d6567  2f6e6962  74656877  6e6f7473  4f480065  2f3d454d  45485300

0315ffb0: 2f3d4c4c  2f6e6962  50006873  3d485441  6e69622f  73752f3a  69622f72  732f3a6e

0315ffd0: 3a6e6962  7273752f  6962732f  4554006e  6c3d4d52  78756e69  73752f00  69622f72

0315fff0: 706f2f6e  69666f72  0064656c  00000000  00000000

Return addresses in stack:

   frame  1 : <0x00ab36cc> [ /lib/libc.so.0 + 0x336cc ]

   frame  2 : <0x03122526> [ /usr/bin/oprofiled + 0x2526 ]

    address : <0x031224fc> [ /usr/bin/oprofiled + 0x24fc ]

    address : <0x0315ff7e> [ oprofiled + 0x1ff7e ]

    address : <0x0315ffa6> [ oprofiled + 0x1ffa6 ]

    address : <0x00020000> { _check_clock + 0x28 }

    address : <0x00020000> { _check_clock + 0x28 }

Restarting system..

 

U-Boot 2008.10-svn1847 (ADI-2009R1-rc1) (Apr 17 2009 - 18:25:58)

 

CPU:   ADSP bf561-0.3 (Detected Rev: 0.5) (bypass boot)

Board: ADI BF561 EZ-Kit Lite board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 600 MHz, Core: 600 MHz, System: 100 MHz

RAM:   64 MB

Flash:  8 MB

In:    serial

Out:   serial

Err:   serial

Net:   MAC:   00:E0:22:FE:B1:3C

Hit any key to stop autoboot:  0

bfin>

--

 

--

root:/> reboot

Jump to NULL address

Deferred Exception context

CURRENT PROCESS:

COMM=oprofiled PID=148

CPU = 0

TEXT = 0x03130000-0x03139358        DATA = 0x03160358-0x03169210

BSS = 0x03169210-0x03180000  USER-STACK = 0x0319fe50

 

return address: [0x00000000]; contents of:

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 0006202d  IPEND: 0030  SYSCFG: 0006

  EXCAUSE   : 0x2d

  interrupts disabled

  physical IVG5 asserted : <0xffa00b8c> { _evt_ivhw + 0x0 }

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

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

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

RETS: <0x03132d7c> [ /usr/bin/oprofiled + 0x2d7c ]

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

DCPLB_FAULT_ADDR: <0x0319fd44> [ oprofiled + 0x1fd44 ]

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

 

PROCESSOR STATE:

R0 : 00000000    R1 : 00000001    R2 : 00880008    R3 : 00000002

R4 : 0319fe54    R5 : 030d1004    R6 : 0319ff00    R7 : 0319fce4

P0 : 000000be    P1 : 00000000    P2 : 00aef3f8    P3 : 00000000

P4 : 03160b20    P5 : 03160fd0    FP : 0319fcc4    SP : 031a3f24

LB0: 00ae6351    LT0: 00ae6344    LC0: 00000000

LB1: 00a9fa39    LT1: 00a9f9f2    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 0319ea05

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

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

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

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

USP : 0319fcb4  ASTAT: 02003004

 

Hardware Trace:

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

     Source : <0xffa0062a> { _exception_to_level5 + 0x9e } CALL pcrel

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

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

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

     Source : <0xffa004e6> { _ex_trap_c + 0x66 } JUMP.S

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

     Source : <0xffa006c4> { _trap + 0x38 } JUMP (P4)

   4 Target : <0xffa006aa> { _trap + 0x1e }

     Source : <0xffa006a6> { _trap + 0x1a } IF !CC JUMP

   5 Target : <0xffa0068c> { _trap + 0x0 }

     Source : <0x03132436> [ /usr/bin/oprofiled + 0x2436 ] JUMP (P1)

   6 Target : <0x0313242e> [ /usr/bin/oprofiled + 0x242e ]

     Source : <0x03132d78> [ /usr/bin/oprofiled + 0x2d78 ] CALL pcrel

   7 Target : <0x03132d74> [ /usr/bin/oprofiled + 0x2d74 ]

     Source : <0x03132d6c> [ /usr/bin/oprofiled + 0x2d6c ] IF CC JUMP

   8 Target : <0x03132d66> [ /usr/bin/oprofiled + 0x2d66 ]

     Source : <0x00a8c126> [ /lib/libc.so.0 + 0xc126 ] RTS

   9 Target : <0x00a8c126> [ /lib/libc.so.0 + 0xc126 ]

     Source : <0xffa00b88> { __common_int_entry + 0xd8 } RTI

  10 Target : <0xffa00b26> { __common_int_entry + 0x76 }

     Source : <0xffa00d50> { _evt_system_call + 0x64 } JUMP.S

  11 Target : <0xffa00d50> { _evt_system_call + 0x64 }

     Source : <0xffa0084c> { _system_call + 0xb8 } RTS

  12 Target : <0xffa00848> { _system_call + 0xb4 }

     Source : <0xffa00838> { _system_call + 0xa4 } IF !CC JUMP

  13 Target : <0xffa00832> { _system_call + 0x9e }

     Source : <0xffa00822> { _system_call + 0x8e } IF !CC JUMP

  14 Target : <0xffa007fc> { _system_call + 0x68 }

     Source : <0xffa00118> { _sys_rt_sigreturn + 0x10 } RTS

  15 Target : <0xffa00114> { _sys_rt_sigreturn + 0xc }

     Source : <0x00002354> { _do_rt_sigreturn + 0x48 } RTS

Userspace Stack

Stack info:

SP: [0x0319fcb4] <0x0319fcb4> [ oprofiled + 0x1fcb4 ]

FP: (0x0319fd74)

Memory from 0x0319fcb0 to 031a0000

0319fcb0: 00000000 [03160fd0] 03160b20  0319fce4  0319ff00  030d1004  0319fe54  0319fd0c

0319fcd0: 00000000  00000001  03160690  00000000  03160880  00004000  00000000  00000000

0319fcf0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0319fd10: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0319fd30: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0319fd50: 00000000  00000000  00000000  00000000  00000000  00000000  031798f0  00000800

0319fd70: 00000800 (0319fe14)<00ab36cc> 0319fef4  031798f0  0319ff43  0319ff00  0317badc

0319fd90: 00ae68a4  00aef144  0dfd935e  00000000  00000000  00000000  00000000  00000000

0319fdb0: 00000000  00000003  03130034  00000004  00000020  00000005  00000006  00000006

0319fdd0: 00001000  00000007  00ae0000  00000008  00000000  00000009  031324f8  00000000

0319fdf0: 00000000  0000000b  00000000  0000000c  00000000  0000000d  00000000  0000000e

0319fe10: 00000000 (00000000)<03132526> 00aef178  031324f8  00aef170  0319ff00  0319ff20

0319fe30:<031324fc> 03ecf864  00000004  0319ff20  03ecf854  03ecf85c  00aef170  0319ff2c

0319fe50: 00000004  0319ff43  0319ff4f  0319ff78  0319ff8c  00000000  0319ffad  0319ffb8

0319fe70: 0319ffdb  0319ffe9  00000000  00000010  00000000  00000006  00001000  00000011

0319fe90: 00000064  00000003  03130034  00000004  00000020  00000005  00000006  00000007

0319feb0: 00ae0000  00000008  00000000  00000009  031324f8  0000000b  00000000  0000000c

0319fed0: 00000000  0000000d  00000000  0000000e  00000000  00000017  00000000  0000001f

0319fef0: 0001fff0  00000000  00000000  00000000 <00020000> 00ae0000  00000000  0000701c

0319ff10: 00aef01c  0000b01c  00000450  00000000 <00020000> 03130000  00000000  00009358

0319ff30: 03160358  0000d358  00008eb8  00000000  2e000000  72706f2f  6c69666f  2d006465

0319ff50: 6576652d  3d73746e  41544f54  52425f4c  48434e41  3978303a  313a303a  30303030

0319ff70: 3a313a30  00313a31  6d762d2d  756e696c  2f2e3d78  696c6d76  0078756e  656b2d2d

0319ff90: 6c656e72  6e61722d  303d6567  31303030  2c303030  66303030  30646531  52455400

0319ffb0: 696c3d4d  0078756e  48544150  69622f3d  752f3a6e  622f7273  2f3a6e69  6e696273

0319ffd0: 73752f3a  62732f72  53006e69  4c4c4548  69622f3d  68732f6e  4d4f4800  002f3d45

0319fff0: 706f2f2e  69666f72  0064656c  00000000  00001004

Return addresses in stack:

   frame  1 : <0x00ab36cc> [ /lib/libc.so.0 + 0x336cc ]

   frame  2 : <0x03132526> [ /usr/bin/oprofiled + 0x2526 ]

    address : <0x031324fc> [ /usr/bin/oprofiled + 0x24fc ]

    address : <0x00020000> { _check_clock + 0x28 }

    address : <0x00020000> { _check_clock + 0x28 }

Jump to NULL address

Deferred Exception context

CURRENT PROCESS:

COMM=oprofiled PID=147

CPU = 0

TEXT = 0x03130000-0x03139358        DATA = 0x03160358-0x03169210

BSS = 0x03169210-0x03180000  USER-STACK = 0x0319fe50

 

return address: [0x00000000]; contents of:

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 0006202d  IPEND: 0030  SYSCFG: 0006

  EXCAUSE   : 0x2d

  interrupts disabled

  physical IVG5 asserted : <0xffa00b8c> { _evt_ivhw + 0x0 }

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

RETN: <0x030d8000> [ watchdogd + 0x0 ]

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

RETS: <0x03132d7c> [ /usr/bin/oprofiled + 0x2d7c ]

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

DCPLB_FAULT_ADDR: <0x0319fd44> [ oprofiled + 0x1fd44 ]

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

 

PROCESSOR STATE:

R0 : 00000000    R1 : 00000001    R2 : 00880008    R3 : 00000002

R4 : 0319fe54    R5 : 030d1004    R6 : 0319ff00    R7 : 0319fce4

P0 : 000000be    P1 : 00000000    P2 : 00aef3f8    P3 : 00000000

P4 : 03160b20    P5 : 03160fd0    FP : 0319fcc4    SP : 030d7f24

LB0: 00ae6351    LT0: 00ae6344    LC0: 00000000

LB1: 00a9fa39    LT1: 00a9f9f2    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 0319ea05

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

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

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

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

USP : 0319fcb4  ASTAT: 02003004

 

Hardware Trace:

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

     Source : <0xffa0062a> { _exception_to_level5 + 0x9e } CALL pcrel

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

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

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

     Source : <0xffa004e6> { _ex_trap_c + 0x66 } JUMP.S

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

     Source : <0xffa006c4> { _trap + 0x38 } JUMP (P4)

   4 Target : <0xffa006aa> { _trap + 0x1e }

     Source : <0xffa006a6> { _trap + 0x1a } IF !CC JUMP

   5 Target : <0xffa0068c> { _trap + 0x0 }

     Source : <0x03132436> [ /usr/bin/oprofiled + 0x2436 ] JUMP (P1)

   6 Target : <0x0313242e> [ /usr/bin/oprofiled + 0x242e ]

     Source : <0x03132d78> [ /usr/bin/oprofiled + 0x2d78 ] CALL pcrel

   7 Target : <0x03132d74> [ /usr/bin/oprofiled + 0x2d74 ]

     Source : <0x03132d6c> [ /usr/bin/oprofiled + 0x2d6c ] IF CC JUMP

   8 Target : <0x03132d66> [ /usr/bin/oprofiled + 0x2d66 ]

     Source : <0x00a8c126> [ /lib/libc.so.0 + 0xc126 ] RTS

   9 Target : <0x00a8c126> [ /lib/libc.so.0 + 0xc126 ]

     Source : <0xffa00b88> { __common_int_entry + 0xd8 } RTI

  10 Target : <0xffa00b26> { __common_int_entry + 0x76 }

     Source : <0xffa00d50> { _evt_system_call + 0x64 } JUMP.S

  11 Target : <0xffa00d50> { _evt_system_call + 0x64 }

     Source : <0xffa0084c> { _system_call + 0xb8 } RTS

  12 Target : <0xffa00848> { _system_call + 0xb4 }

     Source : <0xffa00838> { _system_call + 0xa4 } IF !CC JUMP

  13 Target : <0xffa00832> { _system_call + 0x9e }

     Source : <0xffa00822> { _system_call + 0x8e } IF !CC JUMP

  14 Target : <0xffa00810> { _system_call + 0x7c }

     Source : <0xffa00830> { _system_call + 0x9c } JUMP.S

  15 Target : <0xffa0082e> { _system_call + 0x9a }

     Source : <0xffa01836> { _schedule + 0x1aa } RTS

Userspace Stack

Stack info:

SP: [0x0319fcb4] <0x0319fcb4> [ oprofiled + 0x1fcb4 ]

FP: (0x0319fd74)

Memory from 0x0319fcb0 to 031a0000

0319fcb0: 00000000 [03160fd0] 03160b20  0319fce4  0319ff00  030d1004  0319fe54  0319fd0c

0319fcd0: 00000000  00000001  03160690  00000000  03160880  00004000  00000000  00000000

0319fcf0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0319fd10: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0319fd30: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0319fd50: 00000000  00000000  00000000  00000000  00000000  00000000  031798f0  00000800

0319fd70: 00000800 (0319fe14)<00ab36cc> 0319fef4  031798f0  0319ff43  0319ff00  0317badc

0319fd90: 00ae68a4  00aef144  0dfd935e  00000000  00000000  00000000  00000000  00000000

0319fdb0: 00000000  00000003  03130034  00000004  00000020  00000005  00000006  00000006

0319fdd0: 00001000  00000007  00ae0000  00000008  00000000  00000009  031324f8  00000000

0319fdf0: 00000000  0000000b  00000000  0000000c  00000000  0000000d  00000000  0000000e

0319fe10: 00000000 (00000000)<03132526> 00aef178  031324f8  00aef170  0319ff00  0319ff20

0319fe30:<031324fc> 03ecf864  00000004  0319ff20  03ecf854  03ecf85c  00aef170  0319ff2c

0319fe50: 00000004  0319ff43  0319ff4f  0319ff78  0319ff8c  00000000  0319ffad  0319ffb8

0319fe70: 0319ffdb  0319ffe9  00000000  00000010  00000000  00000006  00001000  00000011

0319fe90: 00000064  00000003  03130034  00000004  00000020  00000005  00000006  00000007

0319feb0: 00ae0000  00000008  00000000  00000009  031324f8  0000000b  00000000  0000000c

0319fed0: 00000000  0000000d  00000000  0000000e  00000000  00000017  00000000  0000001f

0319fef0: 0001fff0  00000000  00000000  00000000 <00020000> 00ae0000  00000000  0000701c

0319ff10: 00aef01c  0000b01c  00000450  00000000 <00020000> 03130000  00000000  00009358

0319ff30: 03160358  0000d358  00008eb8  00000000  2e000000  72706f2f  6c69666f  2d006465

0319ff50: 6576652d  3d73746e  41544f54  52425f4c  48434e41  3978303a  313a303a  30303030

0319ff70: 3a313a30  00313a31  6d762d2d  756e696c  2f2e3d78  696c6d76  0078756e  656b2d2d

0319ff90: 6c656e72  6e61722d  303d6567  31303030  2c303030  66303030  30646531  52455400

0319ffb0: 696c3d4d  0078756e  48544150  69622f3d  752f3a6e  622f7273  2f3a6e69  6e696273

0319ffd0: 73752f3a  62732f72  53006e69  4c4c4548  69622f3d  68732f6e  4d4f4800  002f3d45

0319fff0: 706f2f2e  69666f72  0064656c  00000000  00001004

Return addresses in stack:

   frame  1 : <0x00ab36cc> [ /lib/libc.so.0 + 0x336cc ]

   frame  2 : <0x03132526> [ /usr/bin/oprofiled + 0x2526 ]

    address : <0x031324fc> [ /usr/bin/oprofiled + 0x24fc ]

    address : <0x00020000> { _check_clock + 0x28 }

    address : <0x00020000> { _check_clock + 0x28 }

Restarting system..

 

U-Boot 2008.10-svn1847 (ADI-2009R1-rc1) (Apr 17 2009 - 18:25:58)

 

CPU:   ADSP bf561-0.3 (Detected Rev: 0.5) (bypass boot)

Board: ADI BF561 EZ-Kit Lite board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 600 MHz, Core: 600 MHz, System: 100 MHz

RAM:   64 MB

Flash:  8 MB

In:    serial

Out:   serial

Err:   serial

Net:   MAC:   00:E0:22:FE:B1:3C

Hit any key to stop autoboot:  0

bfin>

--

 

Follow-ups

 

--- Graf Yang                                                2009-06-25 07:30:51

It will encounter null pointer or instruction misalign when oprofile is going

into _exit(EXIT_SUCCESS).

 

Old toolchain(svn3087)  have not this problem.

 

--- Graf Yang                                                2009-06-26 08:58:43

Since toolchain commit svn3171, an uClibc bug is exposed for fdpic format.

Some stack may be destroyed by functions in ld-uClibc.so.0.

I need digging in...

 

Attach the application file for Jie to look on it.

 

--- Jie Zhang                                                2009-06-27 00:21:35

I think I know what happens. It's not a regression of toolchain. It's an

application bug.

 

static void opd_fork(void)

{

        switch(vfork()){

        //switch (fork()) {

                case -1:

                        perror("oprofiled: fork() failed: ");

                        exit(EXIT_FAILURE);

                        break;

                case 0:

                        break;

                default:

                        /* parent */

                        _exit(EXIT_SUCCESS);

                        break;

        }

}

 

vfork does not make a copy of address space for child process. Both child and

parent share the same one. In opd_fork (), the child will ruin the stack when it

returns from main and calls exit. The GOT pointer saved on stack when entering

main is destroyed. When parent resumes, an incorrect value is restored for GOT

pointer, which further causes the dump shows in the bug report.

 

The child should call an exec function or _exit after vfork. The oprofile have

to be fixed in this way.

 

--- Graf Yang                                                2009-06-29 05:50:58

In opd_fork(), the child go down, the parent just do _exit(), so I think we need

not call this function.

I have commit it to trunk and branch.

 

--- Mike Frysinger                                           2009-06-29 11:48:52

then why not change opd_fork() to call daemon(1,1)

 

--- Graf Yang                                                2009-06-29 22:05:20

Need to make things be more clear.

 

--- Graf Yang                                                2009-06-30 04:19:29

Mike,

daemon() also works.

 

The following patch would be committed if no one object.

 

static void opd_go_daemon(void)

{

+#ifdef __uClinux__

+    daemon (0, 1);

+#else

     opd_fork();

 

     if (chdir(OP_BASE_DIR)) {

@@ -141,9 +142,9 @@

     }

 

     opd_fork();

+#endif

}

 

--- Mike Frysinger                                           2009-06-30 12:50:56

you should use daemon(1,1) and then do the chdir() manually to match behavior

 

daemon() will chdir("/"), not chdir(OP_BASE_DIR)

 

--- Graf Yang                                                2009-06-30 22:34:14

Thanks, I will commit patch like the following.

 

static void opd_go_daemon(void)

{

-    /*opd_fork();*/

+#ifdef __uClinux__

+    daemon (1, 1);

 

     if (chdir(OP_BASE_DIR)) {

         fprintf(stderr, "oprofiled: opd_go_daemon: couldn't chdir to "

             OP_BASE_DIR ": %s", strerror(errno));

         exit(EXIT_FAILURE);

     }

+#else

+    opd_fork();

 

+    if (chdir(OP_BASE_DIR)) {

+        fprintf(stderr, "oprofiled: opd_go_daemon: couldn't chdir to "

+            OP_BASE_DIR ": %s", strerror(errno));

+        exit(EXIT_FAILURE);

+    }

+

     if (setsid() < 0) {

         perror("oprofiled: opd_go_daemon: couldn't setsid: ");

         exit(EXIT_FAILURE);

     }

 

-    /*opd_fork();*/

+    opd_fork();

+#endif

}

 

--- Graf Yang                                                2009-07-01 03:26:23

Commited to trunk and branch.

 

--- Vivi Li                                                  2009-07-02 03:34:06

OK now. Close it.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

oprofiled3170    application/octet-stream    46016    Graf Yang

opdump3171    application/octet-stream    782384    Graf Yang

Attachments

Outcomes