Re: Linuxulator: CRASH

From: Larry Rosenman <ler_at_lerctr.org>
Date: Mon, 25 May 2015 17:22:15 -0500
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
> _at__at_ -219,6 +219,18 _at__at_ 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_at_lerctr.org
US Mail: 108 Turvey Cove, Hutto, TX 78634-5688
Received on Mon May 25 2015 - 20:22:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:57 UTC