Re: block: WARN_ON_ONCE(ev->block <= 0) triggered in __disk_unblock_events()

From: Bart Van Assche
Date: Tue Jan 03 2012 - 15:33:43 EST


On Tue, Jan 3, 2012 at 6:37 PM, Tejun Heo <tj@xxxxxxxxxx> wrote:
> On Sun, Jan 01, 2012 at 05:22:58PM +0000, Bart Van Assche wrote:
>> In a workload that involves a lot of scsi_remove_hosts() calls (srp-ha
>> patch set stress test) I get the call stack below after about 30 to 50
>> iterations. Is this a known issue ? Does this indicate a race
>> condition in the block layer ? I can trigger this issue not only with
>> 3.2-rc7 but also with 3.1.6. I haven't tried any other kernel versions
>> yet.
>>
>> ------------[ cut here ]------------
>> WARNING: at block/genhd.c:1466 __disk_unblock_events+0xf5/0x110()
>
> It's indicating that there were more disk_unblock_events() than
> disk_block_events().  Hmmm... weird.  I'll prep a debug patch.

After having found and fixed a race condition in the (not yet
published) patch set I'm preparing that stress test ran fine for 1000
iterations. The block warning mentioned above didn't reappear and the
"blocked for more than 120 seconds" warning was gone too. Sorry for
the noise.

Bart.
--
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/