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

From: Lin Ming
Date: Fri Sep 09 2011 - 10:21:42 EST


On Thu, Sep 8, 2011 at 5:30 AM, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 07 Sep 2011 20:36:19 +0800
> Lin Ming <ming.m.lin@xxxxxxxxx> wrote:
>
>> On Wed, 2011-09-07 at 18:24 +0800, Frank van Maarseveen wrote:
>> > On Tue, Sep 06, 2011 at 10:48:38PM +0800, Lin Ming wrote:
>> > > Does below patch help?
>> > >
>> > > >From a98b874437f871d5ecc3f6fe409b2b474b1f2731 Mon Sep 17 00:00:00 2001
>> > > From: Lin Ming <ming.m.lin@xxxxxxxxx>
>> > > Date: Tue, 6 Sep 2011 22:45:43 +0800
>> > > Subject: [PATCH] block: delete bdi writeback wakup_timer in blk_cleanup_queue()
>> > >
>> > > Signed-off-by: Lin Ming <ming.m.lin@xxxxxxxxx>
>> > > ---
>> > >  block/blk-core.c |    1 +
>> > >  1 files changed, 1 insertions(+), 0 deletions(-)
>> > >
>> > > diff --git a/block/blk-core.c b/block/blk-core.c
>> > > index 90e1ffd..22529a3 100644
>> > > --- a/block/blk-core.c
>> > > +++ b/block/blk-core.c
>> > > @@ -363,6 +363,7 @@ void blk_cleanup_queue(struct request_queue *q)
>> > >   blk_sync_queue(q);
>> > >
>> > >   del_timer_sync(&q->backing_dev_info.laptop_mode_wb_timer);
>> > > + del_timer_sync(&q->backing_dev_info.wb.wakeup_timer);
>> > >   mutex_lock(&q->sysfs_lock);
>> > >   queue_flag_set_unlocked(QUEUE_FLAG_DEAD, q);
>> > >   mutex_unlock(&q->sysfs_lock);
>> > > --
>> > > 1.7.2.3
>> > >
>> >
>> > No, bug still present. Stack trace is the same and I double checked that
>> > it was the new kernel (this time with a lot more debug enabled).
>>
>> Thanks for test.
>> I'll try to reproduce this bug.
>
> Probably this will "fix" it:

Frank,

Does Andrew's patch help?

Lin Ming

>
> --- a/block/blk-sysfs.c~a
> +++ a/block/blk-sysfs.c
> @@ -4,6 +4,7 @@
>  #include <linux/kernel.h>
>  #include <linux/slab.h>
>  #include <linux/module.h>
> +#include <linux/timer.h>
>  #include <linux/bio.h>
>  #include <linux/blkdev.h>
>  #include <linux/blktrace_api.h>
> @@ -486,7 +487,7 @@ static void blk_release_queue(struct kob
>                __blk_queue_free_tags(q);
>
>        blk_trace_shutdown(q);
> -
> +       del_timer_sync(&q->backing_dev_info.wb.wakeup_timer);
>        bdi_destroy(&q->backing_dev_info);
>        kmem_cache_free(blk_requestq_cachep, q);
>  }
> _
>
> Jens, can you please take a look at this regression?
> blk_release_queue() is freeing a pending timer.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/