Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932224AbaAHVXQ (ORCPT ); Wed, 8 Jan 2014 16:23:16 -0500 Received: from mail-pd0-f171.google.com ([209.85.192.171]:33137 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752325AbaAHVXN (ORCPT ); Wed, 8 Jan 2014 16:23:13 -0500 Date: Wed, 8 Jan 2014 13:24:29 -0800 From: Kent Overstreet To: Muthu Kumar Cc: Chris Mason , "linux-btrfs@vger.kernel.org" , "fengguang.wu@intel.com" , "linux-kernel@vger.kernel.org" , "lkp@linux.intel.com" , "axboe@kernel.dk" , "linux-fsdevel@vger.kernel.org" Subject: Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748 Message-ID: <20140108212429.GE7291@kmo-pixel> References: <1389210102.23310.31.camel@ret.masoncoding.com> <1389212231.23310.33.camel@ret.masoncoding.com> <1389214325.23310.34.camel@ret.masoncoding.com> <1389215536.23310.37.camel@ret.masoncoding.com> <20140108211454.GC7291@kmo-pixel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 08, 2014 at 01:18:46PM -0800, Muthu Kumar wrote: > On Wed, Jan 8, 2014 at 1:14 PM, Kent Overstreet wrote: > > On Wed, Jan 08, 2014 at 09:11:49PM +0000, Chris Mason wrote: > >> On Wed, 2014-01-08 at 13:01 -0800, Muthu Kumar wrote: > >> > On Wed, Jan 8, 2014 at 12:51 PM, Chris Mason wrote: > >> > > On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: > >> > >> On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason wrote: > >> > >> > On Wed, 2014-01-08 at 11:54 -0800, Muthu Kumar wrote: > >> > >> >> Chris, > >> > >> >> > >> > >> >> [ 8.336061] WARNING: CPU: 0 PID: 0 at fs/bio.c:1778 bio_endio+0xbe/0x100() > >> > >> >> [ 8.336062] bio_endio: bio for (unknown) without endio > >> > >> >> > >> > >> >> This is my recent change to avoid memory leak in bio_endio. But I > >> > >> >> think the problem is higher up, most likely bio_endio is called twice > >> > >> >> on the same bio (which was freed before). > >> > >> >> > >> > >> > > >> > >> > I think these are just two separate problems. Lets ignore the WARN_ON > >> > >> > for now. > >> > >> > > >> > >> > >> > >> Not really... the BUG that is triggered: > >> > >> > >> > >> kernel BUG at fs/bio.c:523! > >> > >> > >> > >> It is in bio_put() (added to bio_endio() as part of recent change) > >> > >> which gets an already freed bio. > >> > >> > >> > > > >> > > Oh! I see. Let me try with that one reverted. Thanks! > >> > > > >> > > -chris > >> > > > >> > > >> > But, like I said, problem is in different place. I am running a "dd" > >> > on ext4 fs for a while now, but didn't hit the problem. Any idea to > >> > repro locally? I would also suggest running just the for-3.1/core to > >> > isolate the issue. > >> > >> Just reverting that change fixes it for me. Jens mentioned it was > >> broken for on-stack bios. > > > > On-stack bios? I don't recall ever coming across such a thing, who what > > where why? > > > > i would expect on stack bios to work though, i'm really curious how it > > was broken > > New change added a bio_put() which might not work if the bio is on stack. > > I don't remember seeing a on-stack-bio either, any help to jog my memory? That's code that logically belongs in bio_chain_endio(), it's just a hack to avoid blowing the stack since the kernel is compiled with -fno-sibling-call-optimization when you enable frame pointers (otherwise would optimize those tail calls to jumps and we'd have no stack blowing issues). -- 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/