[#5277] kgdb self tests fail on do_fork when CTRL+C is hit

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

[#5277] kgdb self tests fail on do_fork when CTRL+C is hit

Submitted By: Mike Frysinger

Open Date

2009-06-18 09:29:51     Close Date

2009-09-16 19:20:08

Priority:

Medium     Assignee:

Sonic Zhang

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2010R1     Release:

trunk 6784

Category:

N/A     Board:

EZKIT Lite

Processor:

BF548     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

trunk

App binary format:

N/A     

Summary: kgdb self tests fail on do_fork when CTRL+C is hit

Details:

 

this shouldnt be related to the recent changes i made to kgdb -- i reverted those and still get the same crash

 

i enabled the default kgdb internal tests:

CONFIG_KGDB_TESTS=y

CONFIG_KGDB_TESTS_ON_BOOT=y

CONFIG_KGDB_TESTS_BOOT_STRING="V1F100"

 

then booted up and the first stuff worked fine:

...

kgdb: Registered I/O driver kgdbts.

kgdbts:RUN plant and detach test

kgdbts:RUN sw breakpoint test

kgdbts:RUN bad memory access test

kgdbts:RUN singlestep test 1000 iterations

kgdbts:RUN singlestep [0/1000]

kgdbts:RUN singlestep [100/1000]

kgdbts:RUN singlestep [200/1000]

kgdbts:RUN singlestep [300/1000]

kgdbts:RUN singlestep [400/1000]

kgdbts:RUN singlestep [500/1000]

kgdbts:RUN singlestep [600/1000]

kgdbts:RUN singlestep [700/1000]

kgdbts:RUN singlestep [800/1000]

kgdbts:RUN singlestep [900/1000]

kgdbts:RUN hw breakpoint test

kgdbts:RUN do_fork for 100 breakpoints

Freeing unused kernel memory: 2124k freed

...

 

so then to exercise the do_fork thing, you have to do a bunch of forks.  the simple case works fine:

root:/> while :; do ls > /dev/null ; done

kgdb: Unregistered I/O driver kgdbts, debugger disabled.

^C

root:/>

 

but if the first thing i do at boot is hit CTRL+C, KGDB craps out:

root:/> kgdbts: BP mismatch 27c6e expected ef8c

 

Double Fault

Kernel OOPS in progress

Deferred Exception context

 

No Valid process in current context

return address: [0x0007f02a]; contents of:

0x0007f000:  e147  0000  e107  ef8c  3037  6416  2f84  e147

0x0007f010:  000c  e107  0b00  3037  6416  2f7d  e140  000a

0x0007f020:  3017  e100  8f0c  e300  083d [efcd] 6008  2fab

0x0007f030:  e140  000a  a1a9  e100  8e44  e300  0833  2f87

 

ADSP-BF548-0.2 525(MHz CCLK) 131(MHz SCLK) (mpu off)

Linux version 2.6.30-ADI-2010R1-pre (vapier@vapier-m) (gcc version 4.3.3 (ADI-trunk/git-04ddb73) ) #42 Thu Jun 18 09:10:35 EDT 2009

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 00060021  IPEND: ffe02108  SYSCFG: 0006

  EXCAUSE   : 0x21

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

  physical IVG8 asserted : <0xffa00e40> { _evt_evt8 + 0x0 }

  physical IVG13 asserted : <0xffa00f6c> { _evt_evt13 + 0x0 }

  logical irq   6 mapped  : <0xffa00370> { _timer_interrupt + 0x0 }

  logical irq  48 mapped  : <0x00079110> { _bfin_serial_rx_int + 0x0 }

  logical irq  49 mapped  : <0x00078e94> { _bfin_serial_tx_int + 0x0 }

RETE: <0x(null)> /* Maybe null pointer? */

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

RETX: <0x0007f02a> { _check_and_rewind_pc + 0x14a }

RETS: <0x0007f02a> { _check_and_rewind_pc + 0x14a }

PC  : <0x0007f02a> { _check_and_rewind_pc + 0x14a }

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

ICPLB_FAULT_ADDR: <0x0007f02a> { _check_and_rewind_pc + 0x14a }

 

PROCESSOR STATE:

R0 : 0000002b    R1 : 0000003f    R2 : 0000003f    R3 : 00000d9a

R4 : 000bbc4d    R5 : 0000100d    R6 : 0000ef8e    R7 : 0000ef8c

P0 : 00000d99    P1 : 000c2d00    P2 : 000c2d58    P3 : 000c0ce0

P4 : 000c02e0    P5 : 000c0c04    FP : 0000000f    SP : 000cfa90

LB0: 00068204    LT0: 00068202    LC0: 00000000

LB1: 000675e8    LT1: 000675de    LC1: 00000000

B0 : 0000001b    L0 : 00000000    M0 : 00000000    I0 : 00000000

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 000856f0

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

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 0000000f

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

USP : 000d0000  ASTAT: 02003025

 

Hardware Trace:

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

     Source : <0xffa006fa> { _exception_to_level5 + 0xb2 } CALL pcrel

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

     Source : <0xffa00518> { _bfin_return_from_exception + 0x18 } RTX

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

     Source : <0xffa0058e> { _ex_trap_c + 0x46 } JUMP.S

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

     Source : <0xffa007c4> { _trap + 0x58 } JUMP (P4)

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

     Source : <0x00027c6c> { _kgdb_breakpoint + 0xc } EXCPT 0x2

   5 Target : <0x00027c60> { _kgdb_breakpoint + 0x0 }

     Source : <0x0007907e> { _bfin_serial_rx_chars + 0x17a } CALL pcrel

   6 Target : <0x0007907a> { _bfin_serial_rx_chars + 0x176 }

     Source : <0x00078f40> { _bfin_serial_rx_chars + 0x3c } IF !CC JUMP

   7 Target : <0x00078f04> { _bfin_serial_rx_chars + 0x0 }

     Source : <0x0007911c> { _bfin_serial_rx_int + 0xc } CALL pcrel

   8 Target : <0x0007911a> { _bfin_serial_rx_int + 0xa }

     Source : <0x00079128> { _bfin_serial_rx_int + 0x18 } IF CC JUMP

   9 Target : <0x00079120> { _bfin_serial_rx_int + 0x10 }

     Source : <0x00079118> { _bfin_serial_rx_int + 0x8 } JUMP.S

  10 Target : <0x00079110> { _bfin_serial_rx_int + 0x0 }

     Source : <0x00029b4c> { _handle_IRQ_event + 0x48 } CALL (P2)

  11 Target : <0x00029b46> { _handle_IRQ_event + 0x42 }

     Source : <0x00029b30> { _handle_IRQ_event + 0x2c } JUMP.S

  12 Target : <0x00029b20> { _handle_IRQ_event + 0x1c }

     Source : <0x00029b12> { _handle_IRQ_event + 0xe } IF CC JUMP

  13 Target : <0x00029b04> { _handle_IRQ_event + 0x0 }

     Source : <0x0002b0dc> { _handle_simple_irq + 0x38 } CALL pcrel

  14 Target : <0x0002b0a4> { _handle_simple_irq + 0x0 }

     Source : <0xffa0035c> { _asm_do_IRQ + 0x74 } CALL (P1)

  15 Target : <0xffa00350> { _asm_do_IRQ + 0x68 }

     Source : <0x000296c6> { _irq_to_desc + 0x1a } RTS

Kernel panic - not syncing: Double Fault - unrecoverable event

 

Follow-ups

 

--- Sonic Zhang                                              2009-09-07 06:47:29

Fixed. kgdboc should accept gdb break only when it is active.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

kgdb-config    application/octet-stream    16509    Mike Frysinger

Attachments

Outcomes