Re: 3.0.3 kernel BUG at kernel/timer.c:1035

From: Lin Ming
Date: Tue Sep 06 2011 - 10:51:25 EST


On Mon, Sep 5, 2011 at 8:38 PM, Frank van Maarseveen <frankvm@xxxxxxxxxxx> wrote:
> On Fri, Sep 02, 2011 at 01:10:58AM -0700, Andrew Morton wrote:
>> On Wed, 24 Aug 2011 15:02:38 +0200 Frank van Maarseveen <frankvm@xxxxxxxxxxx> wrote:
>>
>> > Got several of these (logged via netconsole):
>> >
>> > kernel BUG at kernel/timer.c:1035!
>> > invalid opcode: 0000 [#1]
>> > PREEMPT
>> > SMP
>> >
>> > ...
>> >
>> > Call Trace:
>> > [<c107af48>] run_timer_softirq+0x148/0x1e0
>> > [<c1069265>] ? rebalance_domains+0x135/0x160
>> > [<c106a28b>] ? get_parent_ip+0xb/0x40
>> > [<c106a28b>] ? get_parent_ip+0xb/0x40
>> > [<c1075098>] __do_softirq+0x78/0x100
>> > [<c1075020>] ? local_bh_enable+0xa0/0xa0
>> > <IRQ>
>> >
>> > [<c10753ad>] ? irq_exit+0x5d/0x70
>> > [<c104df53>] ? smp_apic_timer_interrupt+0x53/0x90
>> > [<c178fa22>] ? apic_timer_interrupt+0x2a/0x30
>> > [<c103d3ed>] ? mwait_idle+0x4d/0x80
>> > [<c1034b0a>] ? cpu_idle+0x3a/0x80
>> > [<c176dc3b>] ? rest_init+0x7b/0x80
>> > [<c1b1471b>] ? start_kernel+0x2e2/0x2e8
>> > [<c1b141c1>] ? loglevel+0x1a/0x1a
>> > [<c1b140b3>] ? i386_start_kernel+0xb3/0xbb
>> >
>> >
>>
>> Could be that a timer was freed while still running.
>>
>> Please ensure that all kernel debugging options are enabled.
>> Especially
>>
>> CONFIG_DEBUG_OBJECTS=y
>> CONFIG_DEBUG_OBJECTS_SELFTEST=y
>> CONFIG_DEBUG_OBJECTS_FREE=y
>> CONFIG_DEBUG_OBJECTS_TIMERS=y
>> CONFIG_DEBUG_OBJECTS_WORK=y
>> CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
>> CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
>> CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
>> CONFIG_SLUB_DEBUG_ON=y
>>
>> CONFIG_DEBUG_OBJECTS_TIMERS might catch this one.
>
> Got something after enabling the above. Unplugging USB storage
> before umount a couple of times produced the following trace:
>
> usb 1-7: USB disconnect, device number 10
> Buffer I/O error on device sdb1, logical block 0
> lost page write due to I/O error on sdb1
> ------------[ cut here ]------------
> WARNING: at lib/debugobjects.c:262 debug_print_object+0x85/0xa0()
> Hardware name: OptiPlex GX620
> ODEBUG: free active (active state 0) object type: timer_list hint: wakeup_timer_fn+0x0/0x50

Does below patch help?