From owner-freebsd-current@FreeBSD.ORG Mon May 25 22:22:29 2015 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ECC1BAF; Mon, 25 May 2015 22:22:29 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CECB1EFA; Mon, 25 May 2015 22:22:28 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=S/5orWv+u/Etw9VhriJWzrDX5BY+gfwiSmDpb9XrzIM=; b=gKhH+wStugXcJvlk/dpWBEUcHKDaNMD7e0o5a+2djFJwA2xolQkzu70xhqwjlaQ2Tpur37WopCtlOzqEKBcSkJ/O9hZrsWBEyNTCJdT9rVUHTyJTHonASAlxfkr2HVEWLw6z+dK15PjFKgf8pP5rjmp/jmw070bSPhbNxRFJdSM=; Received: from 104-54-221-134.lightspeed.austtx.sbcglobal.net ([104.54.221.134]:47806 helo=borg.lerctr.org) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1Yx0lQ-000Jhw-1K; Mon, 25 May 2015 17:22:28 -0500 Date: Mon, 25 May 2015 17:22:15 -0500 From: Larry Rosenman To: Chagin Dmitry Cc: freebsd-current@FreeBSD.org Subject: Re: Linuxulator: CRASH Message-ID: <20150525222215.GA1294@borg.lerctr.org> References: <20150525204118.GA1176@borg.lerctr.org> <20150525205536.GA6195@dchagin.static.corbina.net> <20150525211232.GA1143@borg.lerctr.org> <20150525213103.GA21369@dchagin.static.corbina.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150525213103.GA21369@dchagin.static.corbina.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -1.0 (-) X-LERCTR-Spam-Score: -1.0 (-) X-Spam-Report: SpamScore (-1.0/5.0) ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 X-LERCTR-Spam-Report: SpamScore (-1.0/5.0) ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 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: Mon, 25 May 2015 22:22:29 -0000 On Tue, May 26, 2015 at 12:31:03AM +0300, Chagin Dmitry wrote: > On Mon, May 25, 2015 at 04:12:32PM -0500, Larry Rosenman wrote: > > On Mon, May 25, 2015 at 11:55:36PM +0300, Chagin Dmitry wrote: > > > On Mon, May 25, 2015 at 03:41:18PM -0500, Larry Rosenman wrote: > > > > I have a boinc-client installation running World Community Grid science > > > > that's been working fine for months. > > > > > > > > Updated to current -HEAD, and now we crash the kernel if it's running. > > > > > > > > The backtrace points to the linuxulator. > > > > > > > r283544, but this is not final fix. > > > > > > chd > > > > Thanks! That fixes the crash -- I'll watch for follow-on commits. > > > this need more testing before land: > > > diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c > index a28da8d..c2bf3ae 100644 > --- a/sys/compat/linux/linux_emul.c > +++ b/sys/compat/linux/linux_emul.c > @@ -219,6 +219,18 @@ void > linux_proc_exec(void *arg __unused, struct proc *p, struct image_params *imgp) > { > struct thread *td = curthread; > + struct thread *othertd; > + > + /* > + * In a case of execing from linux binary properly detach > + * other threads from the user space. > + */ > + if (__predict_false(SV_PROC_ABI(p) == SV_ABI_LINUX)) { > + FOREACH_THREAD_IN_PROC(p, othertd) { > + if (td != othertd) > + (p->p_sysent->sv_thread_detach)(othertd); > + } > + } > > /* > * In a case of execing to linux binary we create linux > -- > Have fun! > chd Applied, and running -- will let you know if it crashes or mis-behaves. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 108 Turvey Cove, Hutto, TX 78634-5688