[#5466] Kernel badness.

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

[#5466] Kernel badness.

Submitted By: Vasile Marii

Open Date

2009-08-27 00:07:22     Close Date

2009-09-13 23:40:45

Priority:

Medium     Assignee:

Nobody

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2010R1     Release:

Category:

Drivers     Board:

N/A

Processor:

BF537     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Rejected

Uboot version or rev.:

    Toolchain version or rev.:

gcc version 4.1.2 (ADI svn)

App binary format:

N/A     

Summary: Kernel badness.

Details:

 

I have a problem with kernel booting shows me kernel badness. When i compike kernel withe debug info i got :

=================================

[ INFO: inconsistent lock state ]

2.6.30.5-ADI-2010R1-pre_bfin_krn_vascim_0.4_-svn7234 #197

---------------------------------                       

inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.    

sh/13 [HC0[0]:SC1[2]:HE1:SE0] takes:                    

(&port_lock_key){?.-...}, at: [<00091b2e>] _bfin_serial_rx_dma_timeout+0x3e/0x11c

{IN-HARDIRQ-W} state was registered at:                                          

  [<0002d476>] _lock_acquire+0xaa/0xcc                                           

  [<000e51a2>] __spin_lock+0x26/0x34                                             

  [<00091998>] _bfin_serial_dma_tx_int+0x18/0xb8                                 

  [<000336fe>] _handle_IRQ_event+0x5e/0x154                                      

  [<00034bf4>] _handle_simple_irq+0x50/0x84                                      

  [<ffa00354>] 0xffa00354                                                        

  [<ffa01024>] 0xffa01024                                                        

  [<ffa00bf2>] 0xffa00bf2                                                        

irq event stamp: 524                                                             

hardirqs last  enabled at (524): [<000e5610>] __spin_unlock_irqrestore+0x2c/0x58 

hardirqs last disabled at (523): [<000e5388>] __spin_lock_irqsave+0x14/0x40      

softirqs last  enabled at (462): [<000148e0>] ___do_softirq+0x1a4/0x1ac          

softirqs last disabled at (513): [<00014cde>] _irq_exit+0x52/0x60                

 

other info that might help us debug this:

2 locks held by sh/13:                  

#0:  (&p->cred_exec_mutex){+.+.+.}, at: [<00051634>] _do_execve+0x48/0x204

#1:  (&(bfin_serial_ports[i].rx_dma_timer)){+.-...}, at: [<00017b5e>] _run_timer_softirq+0xae/0x164

 

stack backtrace:

Hardware Trace:

   0 Target : <0x00004d20> { _dump_stack + 0x0 }

     Source : <0x0002a36a> { _print_usage_bug + 0x14a } CALL pcrel

   1 Target : <0x0002a36a> { _print_usage_bug + 0x14a }          

     Source : <0x000113ee> { _printk + 0x16 } RTS                

   2 Target : <0x000113ea> { _printk + 0x12 }                    

     Source : <0x000113d4> { _vprintk + 0x390 } RTS              

   3 Target : <0x000113cc> { _vprintk + 0x388 }                  

     Source : <0x00011372> { _vprintk + 0x32e } IF CC JUMP       

   4 Target : <0x00011366> { _vprintk + 0x322 }                  

     Source : <0x0000d212> { _sub_preempt_count + 0x7a } RTS     

   5 Target : <0x0000d20e> { _sub_preempt_count + 0x76 }         

     Source : <0x0000d202> { _sub_preempt_count + 0x6a } JUMP.S  

   6 Target : <0x0000d1f4> { _sub_preempt_count + 0x5c }         

     Source : <0x0000d1aa> { _sub_preempt_count + 0x12 } IF CC JUMP

   7 Target : <0x0000d198> { _sub_preempt_count + 0x0 }           

     Source : <0x00011362> { _vprintk + 0x31e } CALL pcrel        

   8 Target : <0x00011360> { _vprintk + 0x31c }                   

     Source : <0x00011352> { _vprintk + 0x30e } IF CC JUMP        

   9 Target : <0x00011348> { _vprintk + 0x304 }                   

     Source : <0x0002ac2c> { _lockdep_on + 0x1c } RTS             

  10 Target : <0x0002ac10> { _lockdep_on + 0x0 }                  

     Source : <0x00011344> { _vprintk + 0x300 } CALL pcrel        

  11 Target : <0x00011344> { _vprintk + 0x300 }                   

     Source : <0x000113b0> { _vprintk + 0x36c } JUMP.S            

  12 Target : <0x000113b0> { _vprintk + 0x36c }                   

     Source : <0x00010e0c> { _release_console_sem + 0x1b8 } RTS   

  13 Target : <0x00010e06> { _release_console_sem + 0x1b2 }       

     Source : <0x00010a10> { _wake_up_klogd + 0x24 } RTS          

  14 Target : <0x00010a0c> { _wake_up_klogd + 0x20 }              

     Source : <0x000109fe> { _wake_up_klogd + 0x12 } IF !CC JUMP  

  15 Target : <0x000109ec> { _wake_up_klogd + 0x0 }               

     Source : <0x00010e02> { _release_console_sem + 0x1ae } CALL pcrel

Stack info:                                                          

SP: [0x03c7b8bc] <0x03c7b8bc> /* kernel dynamic memory */           

FP: (0x03c7b8c0)                                                    

Memory from 0x03c7b8b0 to 03c7c000                                  

03c7b8b0: 03c53000  03c7b8bc  0000000d [03c7b8f4](03c7b8f4)<0002a36e> 03c53000  0012cac8

03c7b8d0: 002797b8  03c7a000  00000001  00000000  00000000  00000001  00000002  00000001

03c7b8f0: 00000000 (03c7b920)<0002a608> 03c53378  0002b510  03c53000  00000000  00000002

03c7b910:<0002d476> 006432ac  03c7b940  00000002 (03c7b960)<0002c8da> 03c53378  00279d08

03c7b930: 00000020  00000009  00000002  00000000  03c7b964 <0002a922> 03c53000  006394cc

03c7b950:<000e5610> 006432e8  00000000  00000000 (03c7b9a4)<0002d476> 0014e4e4  00000000

03c7b970:<00091b2e> 03c7a000 <0000ffc0> 00000000  00000002  006394dc  00000000  00000000

03c7b990: 00000000  00000002  00000000  00000000 <00091b2e>(03c7b9e4)<000e51da> 0014e4e4

03c7b9b0: 006394cc  00091af0  006394cc <00091b2e><03c7ba34> 00000102  006394dc  00000000

03c7b9d0: 00000000  00000000  00000002  00000000 <00091b2e>(03c7ba00)<00091b2e> 00000058

03c7b9f0: 00000000 <00017bb2> 00639594  00157da8 (03c7ba48)<00017bb6> 00639594  00157da8

03c7ba10: 03c7a000 <03c7ba34> 00000000  00000000  00000000  00000002  00000000  00017b5e

03c7ba30: 006394cc  006394bc  00283c68  00134f88  03c7ba40  03c7ba40 (03c7ba84)<0001480a>

03c7ba50: 00813d20  00157ca0  0000000a <00014cde> 00000102  00000081  00000004  00613f14

03c7ba70: 00642c88  03c7ba8c  03c7ba8c <000e555a> 00000000 (03c7bab4)<00014cde> 00813d20

03c7ba90: 0000002a  008b9de8  03c7a000  00000000  0000002a  00001000 <ffa00354> 00813d20

03c7bab0: 0000002a (03c7bacc)<ffa0038a> 00000006  03c53360  00279488  03c53000 (03c7bae8)

03c7bad0:<ffa01024> 00001000  00000000  03c53000  03c7bb08 <0002a83e>(00000000)<ffa00bf2>

03c7baf0: 00280968  03c7bb3c <0002ca34> 0003599c  00008050  00000026  00000000  03c7bbd8

03c7bb10: ffa01230  0003599c <0003ec52> 00000006  00003024  00000001  ffa01232  00000000

03c7bb30: ffa01232  00000000  00000000  00000000  00000000  00000000  00000000  00000000

03c7bb50: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

03c7bb70: 00000000  00000000  00000000  00000000  00000000 <008ea000> 03c79e3d  03c79e00

03c7bb90: 03c7bbe4  00813d20  0000002a  008b9de8  03c7a000  03c7a000 <03caa000> 00001000

03c7bbb0: 00000000  0000002a  00001000  00000000  00000002  0000002a  03c7a000  03c7a000

03c7bbd0:<03caa000> 00000006  03c7bbec  00000001  03c7bbfc  03c7bc5c <0003fddc> 00813d20

03c7bbf0: 0000002a  008b9de8  00001000  00000000  0000002a  00001000  008b9de8  0000002a

03c7bc10: 03c7bc58  00001000  03c53360  0027aad8  03c586c0  00000000  00000000  03c7bcdc

03c7bc30: 00000000  0000002e  008b9cd8  03c58734  03c7bd18  00000029  0002a000  00003b20

03c7bc50:<03caa000> 00000000  0002db20  03c7bd20 <0004d5ce> 03c7bc94  03c586c0  03c7bda0

03c7bc70: 03c53000  00000005  00033ed8  03c80000  03c7bc94  00000000  00000001  00000000

03c7bc90: 00000000  03c53000  03c478d4  00000000  00000001  ffffffff  03c586c0  00000000

03c7bcb0: 00000000  00000000  00000000  03c53000  00000000  00000000  03c7bce0  03c53000

03c7bcd0: 0002013c  03c7bcd4  03c7bcd4  00000000  00000000 <0007e476> 03c478d4  00000005

03c7bcf0: 03c7a000  0002db20  03c478d4  03c7bd2c <000230f0> 03c7a000  03c47364  03c47364

03c7bd10: 03c478d4  00000005  03c80000  0002db20  03c7bdac <0006b184> 03c7a000  03c47364

03c7bd30: 03c47364  0002db20  00000000  006472ec  0003a000  03c7bda0  00000002  00000000

03c7bd50:<00014ce4><ffa00354> 00000000  006472ec  03c7bd78  03c7be60  000063b8  000013e8

03c7bd70: 00003ed2  00000001  00039290 <ffa01024> fffffff8  00069ba0  0064e3e0  000053a8

03c7bd90: 0002db20  000014ea  00000004  0003a000  00000000  00000000  03c7bdf0  03c7be60

03c7bdb0:<0006b7a6> 03c7bde8  03c47364  03c47364  fffffff8  0006b754  00000000  00000000

03c7bdd0: 00000000  03c7bde8  00000000  03c7be5c  03c7be58  00000000  00000000  00000000

03c7bdf0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

03c7be10: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

03c7be30: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

03c7be50: 00000000  00000000  00000000  00003ed2  03c7be90 <00050ad0> 00000000  0064732c

03c7be70: 03c47364  fffffff8  0006b754  00000000  00000000  03c47364  03c7bf24  0001f000

03c7be90: 03c7bec4 <0005171a> 03c47364  03c7a000  03c79e34  00000000  03c7c000  00000001

03c7beb0: 03c79e28  03c79fc8  03c7bf24  03c47364  00000000  03c7bef8 <00001510> 000014dc

03c7bed0: 0000000b  03c79fc8  03c7c000  03c79e34  03c79e28  00000001  03c6622c  00000001

03c7bef0: 03c53000  03c7bf24  00000000 <ffa008b4> 00000000  ffffe000  03c6622c  03c662c8

03c7bf10: 03c53000  03c474c0 <03c66328> 00000001  03c6622c  03c62dc2  00008000  00000000

03c7bf30: 00000000  03c7c000  03c62dc2  03c62dc2 <03c6034e><ffa00fb2> 00003024  00000001

03c7bf50: 03c63f8d  00000000  03c63f8a  00000000  00000000  00000000  00000000  00000000

03c7bf70: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

03c7bf90: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  03c79fc8

03c7bfb0: 03c79e3d  03c79e00  03c79e0c  03c66270  03c67384  03c79fc8  03c673a8  00000002

03c7bfd0: 0000000b  00000000  03c78bc8  03c6622c  00000001 <03c66328> 03c79e28  03c79e34

03c7bff0: 03c662c8  03c662c8  0000000b  00000006                                        

Return addresses in stack:                                                              

   frame  1 : <0x0002a36e> { _print_usage_bug + 0x14e }                                 

   frame  2 : <0x0002a608> { _mark_lock + 0x290 }                                       

    address : <0x0002d476> { _lock_acquire + 0xaa }                                     

   frame  3 : <0x0002c8da> { ___lock_acquire + 0x47a }                                  

    address : <0x0002a922> { _trace_hardirqs_on_caller + 0xca }                         

    address : <0x000e5610> { __spin_unlock_irqrestore + 0x2c }                          

   frame  4 : <0x0002d476> { _lock_acquire + 0xaa }                                     

    address : <0x00091b2e> { _bfin_serial_rx_dma_timeout + 0x3e }                       

    address : <0x0000ffc0> { _sys_unshare + 0x178 }                                     

    address : <0x00091b2e> { _bfin_serial_rx_dma_timeout + 0x3e }                       

   frame  5 : <0x000e51da> { __spin_lock_bh + 0x2a }                                    

    address : <0x00091b2e> { _bfin_serial_rx_dma_timeout + 0x3e }                       

    address : <0x03c7ba34> /* kernel dynamic memory */                                  

    address : <0x00091b2e> { _bfin_serial_rx_dma_timeout + 0x3e }                       

   frame  6 : <0x00091b2e> { _bfin_serial_rx_dma_timeout + 0x3e }                       

    address : <0x00017bb2> { _run_timer_softirq + 0x102 }

   frame  7 : <0x00017bb6> { _run_timer_softirq + 0x106 }

    address : <0x03c7ba34> /* kernel dynamic memory */

   frame  8 : <0x0001480a> { ___do_softirq + 0xce }

    address : <0x00014cde> { _irq_exit + 0x52 }

    address : <0x000e555a> { __spin_unlock + 0x1e }

   frame  9 : <0x00014cde> { _irq_exit + 0x52 }

    address : <0xffa00354> /* kernel dynamic memory */

   frame 10 : <0xffa0038a> /* kernel dynamic memory */

   frame 11 : <0xffa01024> /* kernel dynamic memory */

    address : <0x0002a83e> { _mark_held_locks + 0x3e }

   frame 12 : <0xffa00bf2> /* kernel dynamic memory */

    address : <0x0002ca34> { ___lock_acquire + 0x5d4 }

    address : <0x0003ec52> { _find_get_page + 0xe }

    address : <0x008ea000> /* kernel dynamic memory */

    address : <0x03caa000> [ sh + 0x2a000 ]

    address : <0x03caa000> [ sh + 0x2a000 ]

    address : <0x0003fddc> { _generic_file_aio_read + 0x1d0 }

    address : <0x03caa000> [ sh + 0x2a000 ]

    address : <0x0004d5ce> { _do_sync_read + 0x7e }

    address : <0x0007e476> { ___up_write + 0xfa }

    address : <0x000230f0> { _up_write + 0x18 }

    address : <0x0006b184> { _load_flat_file + 0x3c8 }

    address : <0x00014ce4> { _irq_exit + 0x58 }

    address : <0xffa00354> /* kernel dynamic memory */

    address : <0xffa01024> /* kernel dynamic memory */

    address : <0x0006b7a6> { _load_flat_binary + 0x52 }

    address : <0x00050ad0> { _search_binary_handler + 0xb0 }

    address : <0x0005171a> { _do_execve + 0x12e }

    address : <0x00001510> { _sys_execve + 0x34 }

    address : <0xffa008b4> /* kernel dynamic memory */

    address : <0x03c66328> [ init + 0x6328 ]

    address : <0x03c6034e> [ init + 0x34e ]

    address : <0xffa00fb2> /* kernel dynamic memory */

    address : <0x03c66328> [ init + 0x6328 ]

 

but machine still works.

 

Follow-ups

 

--- Mike Frysinger                                           2009-08-27 05:14:43

you need to post your kernel .config.  we cant guess what option you enabled

that caused this.

 

--- Vasile Marii                                             2009-08-27 06:50:11

sory

i've attached the .config file for kernel but which gives me the fellowing:

Loading .data_l1 @ 0xff800000 (32 bytes)                                 

sh_addr: FF800000, p_paddr: 00789830                                     

Loading from: 0129A000 to 00789830, size: 32                             

## Starting application at 0x00668a58 ...                                

console [ttyBF0] enabled, bootconsole disabled                           

------------[ cut here ]------------                                     

Badness at kernel/lockdep.c:2896                                         

 

ADSP-BF537-0.65535(Detected 0.2) 500(MHz CCLK) 100(MHz SCLK) (mpu on)

Linux version 2.6.30.5-ADI-2010R1-pre_bfin_krn_vascim_0.4_-svn7234

(root@vasile) (gcc version 4.1.2 (ADI svn)) #203 PREEMPT Thu Aug 27 12:48:01

EEST 2009

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 00000021  IPEND: 8048  IMASK: 003f  SYSCFG: 0006

  Peripheral interrupts masked off                       

  Kernel interrupts masked off                           

  EXCAUSE   : 0x21                                       

  physical IVG3 asserted : <0xffa00724> /* kernel dynamic memory */

  physical IVG6 asserted : <0xffa00d6c> /* kernel dynamic memory */

  physical IVG15 asserted : <0xffa00f4c> /* kernel dynamic memory */

  logical irq   6 mapped  : <0xffa003c8> /* kernel dynamic memory */

RETE: <0x1be0221a> /* kernel dynamic memory */                    

RETN: <0x0065dcd8> { _init_thread_union + 0x1cd8 }                

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

RETS: <0x000299d0> { _check_flags + 0x40 }                        

PC  : <0x000299e2> { _check_flags + 0x52 }                        

DCPLB_FAULT_ADDR: <0x00644380> { _debug_locks_silent + 0x0 }       

ICPLB_FAULT_ADDR: <0x000299e2> { _check_flags + 0x52 }             

 

PROCESSOR STATE:

R0 : 00000000    R1 : 00000000    R2 : 00000001    R3 : 00000703

R4 : 00000002    R5 : 00000000    R6 : 0000003f    R7 : 0065c000

P0 : ffe02108    P1 : 0065c000    P2 : 00644380    P3 : 00035f44

P4 : 00000000    P5 : 00654b08    FP : 0065dce4    SP : 0065dbfc

LB0: ffa01250    LT0: ffa0124e    LC0: 00000000                

LB1: 03fc0200    LT1: 03fc0200    LC1: 00000000                

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 00129464

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 0013121c

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 : 0065e000  ASTAT: 02001025                                 

 

Hardware Trace:

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

     Source : <0xffa006b8> /* kernel dynamic memory */ CALL pcrel

   1 Target : <0xffa00614> /* kernel dynamic memory */          

     Source : <0xffa004c8> /* kernel dynamic memory */ RTX      

   2 Target : <0xffa004b0> /* kernel dynamic memory */          

     Source : <0xffa0056c> /* kernel dynamic memory */ JUMP.S   

   3 Target : <0xffa004f8> /* kernel dynamic memory */          

     Source : <0xffa0077e> /* kernel dynamic memory */ JUMP (P4)

   4 Target : <0xffa00724> /* kernel dynamic memory */          

     Source : <0x000299e0> { _check_flags + 0x50 } IF CC JUMP   

   5 Target : <0x000299d0> { _check_flags + 0x40 }              

     Source : <0x0008296a> { _debug_locks_off + 0x66 } RTS      

   6 Target : <0x00082966> { _debug_locks_off + 0x62 }          

     Source : <0x00082962> { _debug_locks_off + 0x5e } JUMP.S   

   7 Target : <0x00082930> { _debug_locks_off + 0x2c }          

     Source : <0x00082922> { _debug_locks_off + 0x1e } IF CC JUMP

   8 Target : <0x00082904> { _debug_locks_off + 0x0 }           

     Source : <0x000299cc> { _check_flags + 0x3c } CALL pcrel   

   9 Target : <0x00029990> { _check_flags + 0x0 }               

     Source : <0x0002d562> { _lock_acquire + 0x86 } CALL pcrel  

  10 Target : <0x0002d542> { _lock_acquire + 0x66 }             

     Source : <0x0002d4fc> { _lock_acquire + 0x20 } IF CC JUMP  

  11 Target : <0x0002d4dc> { _lock_acquire + 0x0 }              

     Source : <0x000eb126> { __spin_lock + 0x22 } CALL pcrel    

  12 Target : <0x000eb114> { __spin_lock + 0x10 }               

     Source : <0x0000d2f6> { _add_preempt_count + 0x7e } RTS    

  13 Target : <0x0000d2f2> { _add_preempt_count + 0x7a }        

     Source : <0x0000d2d8> { _add_preempt_count + 0x60 } IF CC JUMP

  14 Target : <0x0000d2b4> { _add_preempt_count + 0x3c }          

     Source : <0x0000d298> { _add_preempt_count + 0x20 } IF CC JUMP

  15 Target : <0x0000d278> { _add_preempt_count + 0x0 }           

     Source : <0x000eb110> { __spin_lock + 0xc } CALL pcrel       

possible reason: unannotated irqs-off.                            

irq event stamp: 17                                               

hardirqs last  enabled at (17): [<000eb598>]

__spin_unlock_irqrestore+0x2c/0x58

hardirqs last disabled at (16): [<000eb310>]

__spin_lock_irqsave+0x14/0x40    

softirqs last  enabled at (0): [<(null)>] (null)                        

    

softirqs last disabled at (0): [<(null)>] (null)                        

    

Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar     

 

... MAX_LOCKDEP_SUBCLASSES:  8                                               

 

... MAX_LOCK_DEPTH:          48                                              

 

... MAX_LOCKDEP_KEYS:        8191                                            

 

... CLASSHASH_SIZE:          4096                                            

 

... MAX_LOCKDEP_ENTRIES:     16384                                           

 

... MAX_LOCKDEP_CHAINS:      32768                                           

 

... CHAINHASH_SIZE:          16384                                           

 

memory used by lock dependency info: 3487 kB                                

 

per task-struct memory footprint: 1152 bytes 

 

 

from previous i've enabled some debug fom kernel hacking and disabled some

drivers like SPI and general purpose drivers.

 

 

--- Mike Frysinger                                           2009-08-27 07:27:17

booting kernels with 'bootelf' is not supported, so stop using it

 

unless you actually need these options, disable tracing and lockdep

 

--- Sonic Zhang                                              2009-09-04 06:34:18

Please boot your kernel uImage by bootm in uboot and post all boot log here.

Otherwise this bug will be rejected.

 

--- Sonic Zhang                                              2009-09-11 03:35:38

Since no flow up information.

 

--- Vasile Marii                                             2009-09-12 11:34:47

Sory, i just needed a quick solution to my problem an i just downloaded another

version and now it's ok. Before that i was using the svn version.

Sory again.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

config    application/octet-stream    18045    Vasile Marii

Attachments

Outcomes