Date: Mon, 18 Jul 2005 15:48:18 +0200 (CEST) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-stable@FreeBSD.ORG Subject: Re: dangerous situation with shutdown process Message-ID: <200507181348.j6IDmIFX014072@lurza.secnetix.de> In-Reply-To: <20050715162214.GA665@drjekyll.mkbuelow.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthias Buelow <mkb@incubus.de> wrote: > Sorry folks, have I somehow dropped into a parallel universe, > or is there some serious misunderstanding going on? Seems so. > To the OP: There is no "sync" process that is being killed by > shutdown Yes, there is a kernel process called "syncer". During shutdown, each of the kernel processes (including the syncer) has 60 seconds to terminate. If it doesn't, "timed out" is printed on the console. This timeout can be changed using a sysctl tunable (kern.shutdown.kproc_shutdown_wait). > The kernel writes out all dirty buffers as part of its > shutdown procedure. When you shut down a machine, the kernel flushes all dirty buffers to disk. While it is doing that, it displays the number of remaining buffers, with increasing time intervals between them. If there are still buffers left after a certain number of intervals without change, the kernel gives up. If that is really the problem, then the best solution would be to make the number of flushing intervals and/or the increasing interval a sysctl tunable. They're currently hardcoded at 20 and 50ms, respectively; see the boot() function in src/sys/kern/kern_shutdown.c. That means that the timeout will happen after 10 seconds. Doubling the number of intervals (i.e. 40 instead of 20) will make the timeout happen after 40 seconds, which should be sufficient. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Marktplatz 29, 85567 Grafing Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "C++ is the only current language making COBOL look good." -- Bertrand Meyer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507181348.j6IDmIFX014072>