Re: 2.5.49: kernel BUG at drivers/block/ll_rw_blk.c:1950!

Neil Brown (neilb@cse.unsw.edu.au)
Wed, 27 Nov 2002 07:13:09 +1100


On Tuesday November 26, akpm@digeo.com wrote:
> Srihari Vijayaraghavan wrote:
> >
> > [1.] One line summary of the problem:
> > kernel BUG at drivers/block/ll_rw_blk.c:1950!
>
> That's BIO_BUG_ON(!bio->bi_size);
>
> > Software RAID 0.
>
> Yes, there have been a few reports of this. The pagecache code
> does bio_add_page() against a new BIO and it doesn't work. We
> end up submitting an empty BIO and boom.
>
> I've seen various RAID patches floating about which address this,
> but either they weren't merged or they didn't work right.
>
> Jens, what is the policy here? Should bio_add_page() for an
> empty bio "always succeed"? (Bearing in mind that pages can
> be 64k...). I guess -EIO would be better than a BUG.
>
> Are there more RAID fixes pending?

The patch that was supposed to fix this was in 2.4.29.
The only way it should still be able to happen is with an IO request
that isn't aligned nicely, and the case in question is using ext3
which I am sure always does nicely aligned requests.

Srihari, could you possibly try with the following patch please to see
if it gives more useful information.

Thanks,
NeilBrown

----------- Diffstat output ------------
./fs/bio.c | 4 ++++
1 files changed, 4 insertions(+)

diff ./fs/bio.c~current~ ./fs/bio.c
--- ./fs/bio.c~current~ 2002-11-27 07:09:01.000000000 +1100
+++ ./fs/bio.c 2002-11-27 07:11:47.000000000 +1100
@@ -432,6 +432,10 @@ retry_segments:
* at this offset
*/
if (q->merge_bvec_fn(q, bio, bvec) < len) {
+ if (bio->bi_size == 0) {
+ printk(KERN_ERR "bio_add_page: want to add %d at %llu but only allowed %d - prepare to oops...\n",
+ len, (unsigned long long)bio->bi_sector, q->merge_bvec_fn(q, bio, bvec));
+ }
bvec->bv_page = NULL;
bvec->bv_len = 0;
bvec->bv_offset = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/