From owner-freebsd-current@FreeBSD.ORG Sun Nov 25 22:56:22 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3136B186; Sun, 25 Nov 2012 22:56:22 +0000 (UTC) (envelope-from zeising+freebsd@daemonic.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) by mx1.freebsd.org (Postfix) with ESMTP id 946108FC0C; Sun, 25 Nov 2012 22:56:21 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id D8E0340005; Sun, 25 Nov 2012 23:56:20 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id CE53A40009; Sun, 25 Nov 2012 23:56:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (mx.daemonic.se [IPv6:2001:470:dca9:0:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id B825540005; Sun, 25 Nov 2012 23:56:19 +0100 (CET) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 3Y8mpC2fbnz8hVn; Sun, 25 Nov 2012 23:56:19 +0100 (CET) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([10.1.0.3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [10.1.0.6]) (amavisd-new, port 10025) with ESMTPS id dYd1_9gErbvD; Sun, 25 Nov 2012 23:56:17 +0100 (CET) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2001:470:dca9:0:1::4]) by mx.daemonic.se (Postfix) with ESMTPS id 3Y8mp91kHhz8hVm; Sun, 25 Nov 2012 23:56:17 +0100 (CET) Received: from tifa.daemonic.se (tifa.daemonic.se [10.32.0.6]) by mail.daemonic.se (Postfix) with ESMTPSA id 3Y8mp91KLSz9Ctj; Sun, 25 Nov 2012 23:56:17 +0100 (CET) Received: from tifa.daemonic.se (localhost [IPv6:::1]) by tifa.daemonic.se (Postfix) with ESMTP id 10A5C22AFA; Sun, 25 Nov 2012 23:56:17 +0100 (CET) Message-ID: <50B2A210.3020804@daemonic.se> Date: Sun, 25 Nov 2012 23:56:16 +0100 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: mdf@FreeBSD.org Subject: Re: panic: sbuf_trim makes no sense on sbuf 0xffffff82434d8898 with drain References: <50B29B07.20808@daemonic.se> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: Alexander Motin , current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 25 Nov 2012 22:56:22 -0000 On 11/25/12 23:48, mdf@FreeBSD.org wrote: > On Sun, Nov 25, 2012 at 2:26 PM, Niclas Zeising > wrote: >> Hi! >> I consistently get this panic while trying to boot a kernel build from >> r243530. It happens when the entropy harvesting rc.d script starts. r243380 >> worked fine, I haven't tested any revisions in between. Attached is the >> backtrace from the kernel, as gotten by kgdb. The machine uses zfs as a >> root pool, and there have been churn in this area. To my untrained eyes, >> however, the issue seem related to hdaa.c. Please let me know if I can >> provide any more information. > > r243530 added the new sysctl that is causing panic. I'm not sure why > there's an sbuf_trim() call; there shouldn't be more than a few \n at > the end. IMO the sbuf_trim() can be eliminated. > > Alternately, the panic check can be removed and we could allow > sbuf_trim() to remove any un-emitted whitespace for an sbuf with > drain. > > CC'ing mav@ who introduced the code. (I introduced sbuf drains). > Thank you for the quick reply! Just to confirm, manually reverting r243530 makes the system boot without panicing. Regards! -- Niclas