Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Sep 2016 13:17:50 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        Slawa Olhovchenkov <slw@zxy.spb.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: nginx and FreeBSD11
Message-ID:  <10607861.GgoaaofMji@ralph.baldwin.cx>
In-Reply-To: <20160915190948.GY2840@zxy.spb.ru>
References:  <20160907191348.GD22212@zxy.spb.ru> <15357564.UUkYdbUZHc@ralph.baldwin.cx> <20160915190948.GY2840@zxy.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10607861.GgoaaofMji>