From owner-freebsd-current@FreeBSD.ORG Thu Jun 11 20:55:32 2015 Return-Path: Delivered-To: freebsd-current@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9192D811 for ; Thu, 11 Jun 2015 20:55:32 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-oi0-x244.google.com (mail-oi0-x244.google.com [IPv6:2607:f8b0:4003:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5366F16DD for ; Thu, 11 Jun 2015 20:55:32 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by oiax69 with SMTP id x69so3186831oia.2 for ; Thu, 11 Jun 2015 13:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=56+syFUN6LAebwFQ8mQ487zpvGeZHgK/upo9FKYqQtU=; b=t9+fOSDWLch5HgXj0v+64RtvC5XVCAWTAuOhnqvMx928B8Tp1plGd8AMwATjhyPOZY xeD4kNWD/W2KzyaZtkGRCje16a/pfrQsXc7O98wC+8chVVfQdNFhSnNfbYeinLI/1eN7 WRqOZzDfF0IsOopXABdxUqyrXj40oNv6b4DPMYe6oXcGVDYURuEkJOkhj3E/iYvS/bAW P5sNO2bvvWUNmiYUxB9zeS8arbGgjJd2y87p2IFLFG71/qVo/7xjv01dVLxlXTjeiHEL rqfLB/D5P5Wo29DnwHd1+bb3b3ADRmMVyetNSmr81yGr68vSW243GbU8105Oy987V2Bd 8JSg== MIME-Version: 1.0 X-Received: by 10.202.89.131 with SMTP id n125mr9003856oib.91.1434056131486; Thu, 11 Jun 2015 13:55:31 -0700 (PDT) Sender: kob6558@gmail.com Received: by 10.202.221.69 with HTTP; Thu, 11 Jun 2015 13:55:31 -0700 (PDT) In-Reply-To: References: Date: Thu, 11 Jun 2015 13:55:31 -0700 X-Google-Sender-Auth: KgR6_1URGqTsGRdDcu7LBrbfDvU Message-ID: Subject: Re: Slow shutdown From: Kevin Oberman To: "Ranjan1018 ." <214748mv@gmail.com> Cc: Garrett Cooper , FreeBSD CURRENT Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 20:55:32 -0000 On Thu, Jun 11, 2015 at 1:50 AM, Ranjan1018 . <214748mv@gmail.com> wrote: > 2015-05-24 22:33 GMT+02:00 Garrett Cooper : > > > On May 24, 2015, at 6:33, Ranjan1018 . <214748mv@gmail.com> wrote: > > > > > On my laptop running r283297, after the message =E2=80=9CAll buffers = synced.=E2=80=9D > and > > > before =E2=80=9CUptime: =E2=80=A6..=E2=80=9D it takes more than 55 se= conds. > > > > Not a lot of info here to diagnose your issue... > > - What happens if you hit control-t, i.e. what wait channel does it pri= nt > > out? > > - What filesystems do you have mounted (fuse, NFS, UFS, ZFS)? > > - What=E2=80=99s your root media (SSDs, SATA/PATA hard drives, etc)? > > > > Thanks.. > > > > Solved ! > > The slow shutdown is caused by some remote smbfs shares mounted via > openvpn: the remote drives are unmounted after the openvpn daemon > termination, this induces some long timeout. The solution is to unmount t= he > smbfs shares in a shutdown script before the openvpn daemon termination. = I > have discovered this issue with this =E2=80=98dirty=E2=80=99 patch that d= isplays the > unmounted fs at shutdown: > > http://pastebin.com/Xfiz9nsv > > With this patch shutting down my laptop appear as: > > > https://drive.google.com/file/d/0BzoWQoMqq1sfcHZyRnlEeTRobFU/view?usp=3Ds= haring > . > > For testing the the patch apply it in /sys/kern, rebuild and install the > kernel. > > Set the new OID: > > # sysctl kern.shutdown.show_umountfs=3D1 > > Halt the system: > > # shutdown -h now > > Regards, > > Maurizio > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= " The same issue exists in fusefs, but has an uglier result. The fuse daemon shuts down before any fusefs based file systems are unmounted, but, for several R/W file systems including NTFS and exFAT, the result is a corrupt file system. I did the same thing to work around this problem... an init script, but I wonder if this should not be handled in some cleaner and more global manner. (No, I have no idea right now of how to implement this.) -- Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com