From owner-svn-src-all@FreeBSD.ORG Tue May 31 22:02:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEBEB106566B; Tue, 31 May 2011 22:02:39 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id DEA8C8FC08; Tue, 31 May 2011 22:02:38 +0000 (UTC) Received: by wwc33 with SMTP id 33so5164326wwc.31 for ; Tue, 31 May 2011 15:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=JRmpzJz/N3UxFJ6GOtLnRj9dE5KYc7svx9UVo6qLPEg=; b=e0pb7VcWlLlRsHnHyGdIHd6fipHQfcDwQz6yT55+eZdiCdDKNeQUGm1GdgEPcGEnph 3YK0XktXZ9Ne+43reQXXuPHJ1BvCWeSFqrSehq6dBggh+DeoZQXjwD5f/LMatDPoVMpO dJLyxfKluOcyVu+RVj79CDvuwOazI/2EArvjU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=j7osepsUjqlSAcgWfyVJIT+2XOVq6LJjmEV6Kpz3zVfuEpuE12EhlfyBhxjJEz+qw9 9cu88g3E4DNgfjvjhmCdOOtprPvHbDBPR0q2UdL6LeN/WE/i63MGYdEz2NPz/4pW38Ay FeqmuG8PZKO6c7XODrWQSZ03MNThglL4bd+Vg= MIME-Version: 1.0 Received: by 10.216.230.213 with SMTP id j63mr4158975weq.20.1306879357724; Tue, 31 May 2011 15:02:37 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.216.93.193 with HTTP; Tue, 31 May 2011 15:02:37 -0700 (PDT) In-Reply-To: <20110531214618.GA57498@nargothrond.kdm.org> References: <201105311729.p4VHTwrZ033296@svn.freebsd.org> <20110531214618.GA57498@nargothrond.kdm.org> Date: Tue, 31 May 2011 15:02:37 -0700 X-Google-Sender-Auth: K3aHYfmuaAayhfYe2vfT2N8beko Message-ID: From: mdf@FreeBSD.org To: "Kenneth D. Merry" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222537 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2011 22:02:40 -0000 On Tue, May 31, 2011 at 2:46 PM, Kenneth D. Merry wrote: > On Tue, May 31, 2011 at 14:00:18 -0700, mdf@FreeBSD.org wrote: >> On Tue, May 31, 2011 at 10:29 AM, Kenneth D. Merry wro= te: >> > Author: ken >> > Date: Tue May 31 17:29:58 2011 >> > New Revision: 222537 >> > URL: http://svn.freebsd.org/changeset/base/222537 >> > >> > Log: >> > ?Fix apparent garbage in the message buffer. >> > >> > ?While we have had a fix in place (options PRINTF_BUFR_SIZE=3D128) to = fix >> > ?scrambled console output, the message buffer and syslog were still ge= tting >> > ?log messages one character at a time. ?While all of the characters st= ill >> > ?made it into the log (courtesy of atomic operations), they were often >> > ?interleaved when there were multiple threads writing to the buffer at= the >> > ?same time. >> >> This seems to panic my box with "lock "msgbuf" 0xfffffe0127ffffe0 >> already initialized". >> >> Unfortunately, though I booted with a fresh CURRENT this morning >> successfully, both /boot/kernel and /boot/kernel.old give this panic. >> To add insult to injury, when the kernel drops into the debugger, my >> keyboard input no longer works so I can't get a stack, etc. > > Uh-oh! > >> So: >> >> 1) Is there anything else I can do to help debug this? >> 2) how can I resurrect this box without a reinstall? >> >> I will try to repro on a virtual machine so I have a snapshot to come ba= ck to. > > My guess is that this is an issue with the message buffer reinitializatio= n > path. =A0lock_init() (called by mtx_init()) has an assert to make sure th= at > the lock is initialized, and that is just a flag check. > > Since the spin lock is part of the message buffer structure, if it is hel= d > over from a previous boot, the LO_INITIALIZED flag may still be set. > > Try power cycling the machine. =A0If it is an issue with re-initializatio= n, > that should clear the memory and allow you to boot. Hmm, apparently my previous presses of the power button weren't long enough. I let it sit off for 20 seconds and it boots okay now. Thanks, matthew > My testing has been with VMs (under Xen), so the reinit path has probably > not been tested as fully as it should have been. =A0Sorry about that! > > As for the debugger, that's another issue altogether. =A0It does work for= me, > but then again if the spin lock initialization is broken for the message > buffer that may affect things. > > Try a cold boot and see if that helps. =A0If so, I think we can probably = just > bzero the mutex in msgbuf_reinit() and that will fix things. > > Ken > -- > Kenneth Merry > ken@FreeBSD.ORG >