From owner-freebsd-current@freebsd.org Fri Dec 16 23:27:03 2016 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 97644C832C4 for ; Fri, 16 Dec 2016 23:27:03 +0000 (UTC) (envelope-from kargl@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B77B1E47; Fri, 16 Dec 2016 23:27:03 +0000 (UTC) (envelope-from kargl@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id uBGNQt9j014585 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 16 Dec 2016 15:26:55 -0800 (PST) (envelope-from kargl@troutmask.apl.washington.edu) Received: (from kargl@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id uBGNQtSM014584; Fri, 16 Dec 2016 15:26:55 -0800 (PST) (envelope-from kargl) Date: Fri, 16 Dec 2016 15:26:55 -0800 From: "Steven G. Kargl" To: John Baldwin Cc: Mark Johnston , kargl@uw.edu, freebsd-current@freebsd.org, kib@freebsd.org Subject: Re: Revision 309657 to stack_machdep.c renders unbootable system Message-ID: <20161216232655.GA12842@troutmask.apl.washington.edu> Reply-To: kargl@uw.edu References: <20161214194848.GA881@troutmask.apl.washington.edu> <20161214234804.GA26443@troutmask.apl.washington.edu> <20161215005012.GA84222@wkstn-mjohnston.west.isilon.com> <1848178.kLUBJlL36D@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1848178.kLUBJlL36D@ralph.baldwin.cx> User-Agent: Mutt/1.7.2 (2016-11-26) X-Mailman-Approved-At: Sat, 17 Dec 2016 00:02:21 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 16 Dec 2016 23:27:03 -0000 On Fri, Dec 16, 2016 at 03:19:09PM -0800, John Baldwin wrote: > > So the hack in pause() is probably not as necessary now. In particular, I > think we only need it for thread0, not for other threads. The patch below > worked for me with SPEW's config: > > Index: kern_synch.c > =================================================================== > --- kern_synch.c (revision 310128) > +++ kern_synch.c (working copy) > @@ -321,7 +321,8 @@ pause_sbt(const char *wmesg, sbintime_t sbt, sbint > if (sbt == 0) > sbt = tick_sbt; > > - if (cold || kdb_active || SCHEDULER_STOPPED()) { > + if ((cold && curthread == &thread0) || kdb_active || > + SCHEDULER_STOPPED()) { > /* > * We delay one second at a time to avoid overflowing the > * system specific DELAY() function(s): > I'll give your patch a try on Monday. I'm heading out the door for the weekend, and the system that has problems sits in my office. System is currently rebuilding firefox-50, which seems to have a penchant for becoming wedged. An unkillable program consuming ~1 GB of memory. :( -- Steve http://troutmask.apl.washington.edu/~kargl/ 2. https://www.youtube.com/watch?v=Py6d6o2jbaE 1. https://www.youtube.com/watch?v=6hwgPfCcpyQ