RE: [Bug 227404] UP FreeBSD VM always hangs on reboot since 20180329-r331740

2018-04-10 Thread Dexuan Cui via freebsd-bugs
> From: Bruce Evans 
> Sent: Tuesday, April 10, 2018 13:09
> > Here the bug is that UP FreeBSD VM hangs on reboot or power-off, and
> > I'm sure this recent patch (which was committed by Jeff on Mar 26) caused
> > this bug:
> > r331561:Fix a bug introduced in r329612 that slowly invalidates all clean 
> > bufs.
> >
> > However, SMP VM with 2 or more CPUs doesn't hang on reboot/power-off
> > according to our tests.
> 
> Actually, r329612 is what causes this bug.  I already did the bisection
> to find almost this bug a couple of weeks ago.  The hang occurs on amd64
> with 4 CPUs but not on amd64 with 8 CPUs or i386 with 4 or 8 CPUS.  I
> just checked that it occurs on i386 with 1 CPU.  All on the same machine.
> But r329611 doesn't hang for any of these cases.

So, it looks to me that: r329612 introduced a hang issue, so Jeff made r331561,
trying to fix the issue, but it looks the issue is not completely fixed (at 
least for me).

I didn't test r329612.

We noticed our amd64 VM (which has a single CPU) hung . The VM kernel was 
built with yesterday's latest kernel code + the default GENERIC kernel config.

However, using the same kernel binary, if we configure 2 or more CPUs
to the VM, the VM doesn't hang on reboot.

If I use the latest code but manually remove the changes made by r331561, 
the hang issue with our single-CPU VM will go away.

I hope the info is helpful.
 
> I still think there is an older bug, but now think it is related.  I
> only tested with SCHED_4BSD.  For SCHED_4BSD, I suspect that the bug
> is from pinning a thread to a CPU and then stopping that CPU.  Pure
> UP has no problems since pinning is null for it.  SCHED_4BSD has especially
> special handing for SMP (a separate runq for each CPU.  I have been
> modifying
> SCHED_4BSD and the separate queues mostly get in the way).
> 
> Bruce

I always use the default GENERIC kernel options, so I guess I'm using 
SCHED_4BSD(?)..

Thanks,
-- Dexuan
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


RE: [Bug 227404] UP FreeBSD VM always hangs on reboot since 20180329-r331740

2018-04-10 Thread Dexuan Cui via freebsd-bugs
> From: Bruce Evans
> Sent: Tuesday, April 10, 2018 00:45
> 
> On Tue, 10 Apr 2018 a bug that doesn't want repl...@freebsd.org wrote:
> 
> (The bug didn't even Cc freebsd-bugs for this followup.)

Thanks for the reminder! I Cc'd bugs@ just now.

> > --- Comment #4 from Dexuan Cui ---
> ...
> 
> I think I saw this a few months before that.
> 
> My only history of this is that I built a UP kernel on 17 Dec 2017 to see
> if UP kernels had the bug.  So SMP kernels probably had the bug then.
> 
> Bruce

Here the bug is that UP FreeBSD VM hangs on reboot or power-off, and
I'm sure this recent patch (which was commited by Jeff on Mar 26) caused this 
bug:
https://github.com/freebsd/freebsd/commit/63a483ed5f4eaadb8979992c7a5de24c7a471c61
("Fix a bug introduced in r329612 that slowly invalidates all clean bufs").

However, SMP VM with 2 or more CPUs doesn't hang on reboot/power-off
according to our tests.

Thanks,
-- Dexuan
___
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"