From owner-freebsd-stable@freebsd.org Thu Sep 15 20:17:54 2016 Return-Path: Delivered-To: freebsd-stable@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 C953FBDC1B5 for ; Thu, 15 Sep 2016 20:17:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA02BC30 for ; Thu, 15 Sep 2016 20:17:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id BA3CC10AF7E; Thu, 15 Sep 2016 16:17:53 -0400 (EDT) From: John Baldwin To: Slawa Olhovchenkov Cc: freebsd-stable@freebsd.org Subject: Re: nginx and FreeBSD11 Date: Thu, 15 Sep 2016 13:17:50 -0700 Message-ID: <10607861.GgoaaofMji@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20160915190948.GY2840@zxy.spb.ru> References: <20160907191348.GD22212@zxy.spb.ru> <15357564.UUkYdbUZHc@ralph.baldwin.cx> <20160915190948.GY2840@zxy.spb.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 15 Sep 2016 16:17:53 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 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, 15 Sep 2016 20:17:54 -0000 On Thursday, September 15, 2016 10:09:48 PM Slawa Olhovchenkov wrote: > On Thu, Sep 15, 2016 at 11:54:12AM -0700, John Baldwin wrote: > > > > > Index: vfs_aio.c > > > > =================================================================== > > > > --- vfs_aio.c (revision 305811) > > > > +++ vfs_aio.c (working copy) > > > > @@ -787,6 +787,8 @@ aio_process_rw(struct kaiocb *job) > > > > * aio_aqueue() acquires a reference to the file that is > > > > * released in aio_free_entry(). > > > > */ > > > > + KASSERT(curproc->p_vmspace == job->userproc->p_vmspace, > > > > + ("%s: vmspace mismatch", __func__)); > > > > if (cb->aio_lio_opcode == LIO_READ) { > > > > auio.uio_rw = UIO_READ; > > > > if (auio.uio_resid == 0) > > > > @@ -1054,6 +1056,8 @@ aio_switch_vmspace(struct kaiocb *job) > > > > { > > > > > > > > vmspace_switch_aio(job->userproc->p_vmspace); > > > > + KASSERT(curproc->p_vmspace == job->userproc->p_vmspace, > > > > + ("%s: vmspace mismatch", __func__)); > > > > } > > > > > > > > If this panics, then vmspace_switch_aio() is not working for > > > > some reason. > > > > > > This issuse caused rare, this panic produced with issuse or on any aio > > > request? (this is production server) > > > > It would panic in the case that we are going to write into the wrong > > process (so about as rare as your issue). > > Can I configure automatic reboot (not halted) in this case? FreeBSD in a stable branch should already reboot (after writing out a dump) by default unless you have configured it otherwise. -- John Baldwin