From owner-freebsd-stable@FreeBSD.ORG Thu Mar 12 20:20:08 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 973D1178 for ; Thu, 12 Mar 2015 20:20:08 +0000 (UTC) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (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 289713B1 for ; Thu, 12 Mar 2015 20:20:08 +0000 (UTC) Received: by wggx12 with SMTP id x12so18836178wgg.13 for ; Thu, 12 Mar 2015 13:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=KjdVNKpBOQK7nuf8hfmNnav1xfBPNZisALslv2xi2ko=; b=ZpsqPepMnAF0zRFUpnz9RSy12wqObYPj6e2aGK7V39sFMMmY/NCwp4cdoWNNYCvmuJ YfNS8FxrwG07oARO++IVbIyWKOpWUZIOmxAr+tE37Aj8yqCKNHZtaFSrIYv8DBFw9yzb tesxKrzFmxcqA7QjGYcjzsLJI/2tbLMehHz3OEMO2kj3r/HWNaosLU4SoM4U6YNB3g7v FofRA9IrMHHUqzC07YnElpsNqTDU8xIymQ8hAwqmZ0uzCP1isN5bRDIr1VQu1DVUL/kG GNS96SRyG6lL24agRwozyjbcaYiK+i4k+OrE2gx6emMViS4zWm2Lv3ZBSJBnZka+Wj/Z DxkA== MIME-Version: 1.0 X-Received: by 10.181.13.174 with SMTP id ez14mr134542440wid.72.1426191606580; Thu, 12 Mar 2015 13:20:06 -0700 (PDT) Sender: markjdb@gmail.com Received: by 10.194.92.229 with HTTP; Thu, 12 Mar 2015 13:20:06 -0700 (PDT) In-Reply-To: <5501108C.4080303@akips.com> References: <54FE3803.2000307@akips.com> <20150310215913.GB52108@charmander.picturesperfect.net> <54FFBDE9.5060702@akips.com> <1648097.s1OBMXVVbH@ralph.baldwin.cx> <5501108C.4080303@akips.com> Date: Thu, 12 Mar 2015 13:20:06 -0700 X-Google-Sender-Auth: 7wrwFzimb9wIYEJMQyj1YvhWL3E Message-ID: Subject: Re: Suspected libkvm infinite loop From: Mark Johnston To: Nick Frampton Content-Type: text/plain; charset=UTF-8 Cc: freebsd-stable stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2015 20:20:08 -0000 On Wed, Mar 11, 2015 at 9:05 PM, Nick Frampton wrote: > On 12/03/15 00:38, John Baldwin wrote: >>>> >>>> It sounds like this issue might be the one fixed in r272566: if the >>>> > >KERN_PROC_ALL sysctl is read with an insufficiently large buffer, an >>>> > >sbuf error return value could bubble up and be treated as ERESTART, >>>> > >resulting in a loop. >>>> > > >>>> > >This can be confirmed with something like >>>> > > >>>> > > dtrace -n 'syscall:::entry/pid == $target/{@[probefunc] = >>>> > > count();} tick-3s {exit(0);}' -p >>>> > > >>>> > >If the output consists solely of __sysctl, this bug is likely the >>>> > >culprit. >>> >>> > >>> >Unfortunately, I accidentally killed fstat this morning before I could >>> > do any further debug. >>> > >>> >I ran truss -p on it yesterday and it was spinning solely on __sysctl. >>> > >>> >I'll try compiling with debug symbols in case it happens again. I >>> > haven't been able to reproduce the >>> >problem in a reasonable time frame so it could be days or weeks before >>> > we see it happen again. >> >> Tha truss output is consistent with Mark's suggestion, so I would try >> his suggested fix of 272566. > > > I patched the 10.1 kernel with r272566 and it appears to have fixed the > issue. Is this patch likely to be MFCed back to 10-stable? A followup to the thread: the change has been merged to stable/10 in r279926.