From owner-freebsd-current@freebsd.org Thu Dec 3 22:47:58 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9F62A40B9F for ; Thu, 3 Dec 2015 22:47:57 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EFF21DD4 for ; Thu, 3 Dec 2015 22:47:57 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wmec201 with SMTP id c201so49498881wme.0 for ; Thu, 03 Dec 2015 14:47:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=v2sk1ttCCtC5kiuCGlFLPl3qpO/LP9DwHIWJpfd1ESE=; b=IDnbx2oCGs0q6ubzwJ+XFyZ+CSpTN8TqNVR4X7ogduRTTgI/4N8Z6/YM7evsGw91Yp KXvR22uz6KQDEKeaPqh4w18yDYqwI8u9sVGlOzmHL42v4qOZ4w209hUXuAC5ANIgcGVA eFeT6J2qke0cKpiIVr94PnCorz97BuzhOv9hAuH93oR2LNpt2KdrsrxLB7l8bQVgWCZU K/nOigx1CaEoGuVNkAap8xIJkWrw70cLxnaASx0fiiUiAIKpq5m0lkfbzG6WAs9I7leX dv6M6uWJjg/HdEDBUfWp92yN6mGs7yf4Xe6wcrWGMa+4h2ZAXLf9fyWX1dzWhMxnM5n+ fnTw== X-Received: by 10.194.192.198 with SMTP id hi6mr13677958wjc.141.1449182875582; Thu, 03 Dec 2015 14:47:55 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id k125sm935113wmf.2.2015.12.03.14.47.54 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 03 Dec 2015 14:47:54 -0800 (PST) Date: Thu, 3 Dec 2015 23:47:52 +0100 From: Mateusz Guzik To: Rick Macklem Cc: FreeBSD Current Subject: Re: panic "ffs_checkblk: bad block" on recent -head kernels Message-ID: <20151203224752.GA19134@dft-labs.eu> Mail-Followup-To: Mateusz Guzik , Rick Macklem , FreeBSD Current References: <802637848.117955972.1449180507630.JavaMail.zimbra@uoguelph.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <802637848.117955972.1449180507630.JavaMail.zimbra@uoguelph.ca> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 22:47:58 -0000 On Thu, Dec 03, 2015 at 05:08:27PM -0500, Rick Macklem wrote: > Hi, > > I get a fairly reproducible panic when doing a full kernel build > on a 256Mbyte single core i386 when running recent kernels from -head. > > The panic is "ffs_checkblk: bad block ..". I don't actually have the > block # (although I think it's just 0xfffffffffffffff, given the backtrace), > because it runs off the screen. (I looked up the message via the debugger > from the first arg. to panic.) > > Here's the backtrace without all the numbers: > panic(c14f4b55, ffffffff, ffffffff, 0, 64,...) > ffs_checkblk(ffffffff, 8000, fffffff9c, ffffffff, c4a02454,...) > ffs_reallocblks > VOP_REALLOCBLKS_APV > cluster_write > ffs_write > VOP_WRITE_APV > vn_write > vn_io_fault_doio > vn_io_fault1 > vn_io_fault > dofilewrite > kern_writev > sys_write > syscall > > It doesn't happen on a kernel dated Sep. 30, but does happen on a Nov. 30 one. > (I was away from home, so I didn't upgrade kernels for 2 months.) > > I am slowly doing a binary search for the first kernel rev. where it occurs, > but since each build takes hours, it's going to take a while;-). > > At this point, it doesn't appear to happen on r289278 (just before jeff@'s buffer > cache patch). > With kernels between r289279-->r290480, I get into the "R" state that > was fixed by r290481 before I get a crash. > I tried reverting r289405 and r290047 from a recent kernel and the crashes still > occurred, so it doesn't appear to be these commits. > > I am currently testing r290481 to see if the crash occurs for this rev. > > If anyone has some insight into which commit might cause this, please let me know. > Well, did it crash with r291460 or later? If so, try the kernel just before that and if that helps, try: diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ff37de8..0ad6ef7 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2783,6 +2783,7 @@ _vdrop(struct vnode *vp, bool locked) vp->v_op = NULL; #endif bzero(&vp->v_un, sizeof(vp->v_un)); + vp->v_lasta = vp->v_clen = vp->v_cstart = vp->v_lastw = 0; vp->v_iflag = 0; vp->v_vflag = 0; bo->bo_flag = 0; -- Mateusz Guzik