From owner-freebsd-current@FreeBSD.ORG Thu Jun 11 08:50:57 2015 Return-Path: Delivered-To: freebsd-current@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 8997584A for ; Thu, 11 Jun 2015 08:50:57 +0000 (UTC) (envelope-from 214748mv@gmail.com) Received: from mail-yk0-x22a.google.com (mail-yk0-x22a.google.com [IPv6:2607:f8b0:4002:c07::22a]) (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 472421FD8 for ; Thu, 11 Jun 2015 08:50:57 +0000 (UTC) (envelope-from 214748mv@gmail.com) Received: by yken206 with SMTP id n206so277674yke.2 for ; Thu, 11 Jun 2015 01:50:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IPf9pDuL4+iCQwk5xLJPAGBjwqAjb5BZsDAR1IHViB4=; b=XWuJ2HbiuosgN8Qxc309E/sibIoiK3bjq20i9Ed/pI151p97BTE8NKDNFgxPN5X6rg iIafM5gXetXdtiHj6sjYtYBJG/rWrDx8uujseWMvjuuZSpvoYyZphnkJXZf7CQcYOvmc 4Uy1X7QF/P7boUMzVVk6GfxIBFUyQxzsCxX+M1OID/bIR/YxyrSEJJkpLwJQ8DSwaUdc Nr+0EMr6gsrtsfHWJXTEmnRzM5rZYB2W/cIDiCtYZwzZzTL6vjHnbr6GrODfp2i7epUO iAOMyKg6fa3g5OR2tDmAimZmw6/rvXtCGihcyLRUH1ZtQgM9Kfvlt/22Z+6tV5X5lKhZ fUhg== MIME-Version: 1.0 X-Received: by 10.129.80.87 with SMTP id e84mr9873586ywb.31.1434012656164; Thu, 11 Jun 2015 01:50:56 -0700 (PDT) Received: by 10.13.226.196 with HTTP; Thu, 11 Jun 2015 01:50:56 -0700 (PDT) In-Reply-To: References: Date: Thu, 11 Jun 2015 10:50:56 +0200 Message-ID: Subject: Re: Slow shutdown From: "Ranjan1018 ." <214748mv@gmail.com> To: Garrett Cooper Cc: 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 08:50:57 -0000 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 sy= nced.=E2=80=9D and > > before =E2=80=9CUptime: =E2=80=A6..=E2=80=9D it takes more than 55 seco= nds. > > Not a lot of info here to diagnose your issue... > - What happens if you hit control-t, i.e. what wait channel does it print > 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 the 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 dis= plays 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=3Dsha= ring . 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