From dgilbert@daveg.ca  Thu Oct 16 18:39:30 2003
Return-Path: <dgilbert@daveg.ca>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A4C8D16A4B3
	for <freebsd-gnats-submit@freebsd.org>; Thu, 16 Oct 2003 18:39:30 -0700 (PDT)
Received: from sizone.org (mortar.sizone.org [65.126.154.242])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6763243FCB
	for <freebsd-gnats-submit@freebsd.org>; Thu, 16 Oct 2003 18:39:27 -0700 (PDT)
	(envelope-from dgilbert@daveg.ca)
Received: by sizone.org (Postfix, from userid 66)
	id A86C330239; Thu, 16 Oct 2003 21:39:24 -0400 (EDT)
Received: by canoe.dclg.ca (Postfix, from userid 101)
	id D72DB1D25D8; Thu, 16 Oct 2003 18:36:24 -0400 (EDT)
Message-Id: <20031016223624.D72DB1D25D8@canoe.dclg.ca>
Date: Thu, 16 Oct 2003 18:36:24 -0400 (EDT)
From: David Gilbert <dgilbert@daveg.ca>
Reply-To: David Gilbert <dgilbert@daveg.ca>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Snapshots prevent disk sync on shutdown
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         58154
>Category:       kern
>Synopsis:       Snapshots prevent disk sync on shutdown
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    mckusick
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 16 18:40:12 PDT 2003
>Closed-Date:    Wed Jan 11 06:09:37 UTC 2012
>Last-Modified:  Wed Jan 11 06:09:37 UTC 2012
>Originator:     David Gilbert
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
daveg.ca
>Environment:
System: FreeBSD canoe.dclg.ca 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Tue Oct 7 16:54:59 EDT 2003 dgilbert@canoe.dclg.ca:/usr/src/sys/i386/compile/CANOE i386


-CURRENT, cvsup-d as above.  Centrino 1.6 in a laptop (Dell D800), 1G
RAM, 60G drive with 2G swap.
>Description:
When a sufficiently large partition (mine's 55G) contains more than
one snapshot, a shutdown -h now will not sync the disk.  The output
of 'syncing disks' never counts down.  This works fine with one
snapshot ... but not with more.  Small partitions (my other partition is
256M) don't appear to exhibit this problem.
>How-To-Repeat:
I create snapshots once per day on both / and /usr on my laptop.  If more
than one snapshot exists on /usr, this problem occurs.
>Fix:

None known to me.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mckusick 
Responsible-Changed-By: kris 
Responsible-Changed-When: Thu Oct 16 23:28:53 PDT 2003 
Responsible-Changed-Why:  
Assign to snapshot maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58154 

From: Ceri Davies <ceri@FreeBSD.org>
To: FreeBSD Gnats Submit <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: kern/58154: Snapshots prevent disk sync on shutdown
Date: Tue, 20 Jan 2004 21:32:40 +0000

 Adding to audit trail, from misfiled PR kern/61568:
 
 Date: Sun, 18 Jan 2004 22:59:57 -0800 (PST)
 From: Joseph Scott <joseph@randomnetworks.com>
 Message-Id: <20040118225309.C21889@randomservers>
 References: <200401140729.i0E7Ttok003002@beastie.mckusick.com>
  <20040114160426.T12913@randomservers>
 
  	The details I mentioned below appears to be about the same as the
  results in FreeBSD PR kern/58154.  I've CC'd the person who submitted that
  PR, perhaps he now as more details?
  
  	I've also tried this on a trial install of VMWare 4 on Windows XP.
  I was able to shutdown several times after a simple install.  Took several
  snapshots and now the shutdown just hangs.  The size of the fs doesn't
  appear to matter (size was mentioned in the PR).  So that makes 3
  different systems that showed the exact same results.
  
  	In order to add this additional info I've also CC'd this as a
  follow up to the PR.
  
  On Wed, 14 Jan 2004, Joseph Scott wrote:
  
  ->
  -> On Tue, 13 Jan 2004, Kirk McKusick wrote:
  ->
  -> -> Your results are exactly as I would expect. Each new snapshot
  -> -> needs to scan all the existing snapshots to purge them from
  -> -> its view (otherwise deleting older snapshots would cause them
  -> -> to be saved in the next older snapshot and you could never
  -> -> reclaim the space). The filesystem is not prevented from
  -> -> running while these purges are in progress, but the system
  -> -> will be slower because of the extra I/O.
  ->
  -> 	That makes sense.  On another snapshot note it appears that
  -> snapshots are causing problems under FreeBSD 5.2-RELEASE.  It took me
  -> awhile, but it looks like I can now repeat easily.
  ->
  -> 1.  Install FreeBSD 5.2-RELEASE from CD
  -> 2.  Run 'shutdown -h now' several times verifing that everything seems ok
  -> 3.  Snapshot a fs a couple of times (2 caused this to happen for me)
  -> 4.  Run 'shutdown -h now' and the system hangs at this line:
  ->
  -> syncing disks, buffers remaining...
  ->
  -> 5.  System requires a hard reset
  ->
  -> 	I've tried this now several times on two different systems with
  -> exactly the same results each time.  This was tested on right after
  -> completing an install of FreeBSD 5.2-RELEASE, the system was completely
  -> idle and not being used for anything else.  Even after rm'ing the snapshot
  -> files the shutdown would complete, but with errors which cause fsck's to
  -> be run when the system comes back up.
  ->
  -> 	This also seems to work with 'shutdown -r now', but it may require
  -> more than two snapshots to see the problem in that case.
  
  --
  Joseph Scott
  http://www.randomnetworks.com/joseph/blog/contact.php
 

From: Ceri Davies <ceri@FreeBSD.org>
To: FreeBSD Gnats Submit <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: kern/58154: Snapshots prevent disk sync on shutdown
Date: Tue, 20 Jan 2004 21:33:40 +0000

 Adding to audit trail, from misfiled PR kern/61581:
 
 Date: Mon, 19 Jan 2004 09:05:52 -0500
 From: David Gilbert <dgilbert@dclg.ca>
 Message-Id: <16395.58432.40577.277834@canoe.dclg.ca>
 Subject: pending/61581: Re: FreeBSD 5.x filesystem snapshots, FreeBSD PR kern/58154 
 References: <200401140729.i0E7Ttok003002@beastie.mckusick.com>
 	<20040114160426.T12913@randomservers>
 	<20040118225309.C21889@randomservers>
 
  >>>>> "Joseph" == Joseph Scott <joseph@randomnetworks.com> writes:
  
  Joseph> 	The details I mentioned below appears to be about the
  Joseph> same as the results in FreeBSD PR kern/58154.  I've CC'd the
  Joseph> person who submitted that PR, perhaps he now as more details?
  
  Joseph> 	I've also tried this on a trial install of VMWare 4 on
  Joseph> Windows XP.  I was able to shutdown several times after a
  Joseph> simple install.  Took several snapshots and now the shutdown
  Joseph> just hangs.  The size of the fs doesn't appear to matter (size
  Joseph> was mentioned in the PR).  So that makes 3 different systems
  Joseph> that showed the exact same results.
  
  My system is my laptop.  I have a script that takes a snapshot at 4 AM
  on / and /usr.  / is 256M nad /usr is 50G.  Shutdown hangs when there
  is more than one snapshot on /usr but it doesn't hang based on any
  number of snapshots on /.
  
  This is 100% repeatable.  Remvoing all-but-one /usr snapshot makes
  shutdowns work just fine.  Having more than one makes it hang on the
  buffers remaining bit.
  
  Dave.
  
  -- 
  ============================================================================
  |David Gilbert, Independent Contractor.       | Two things can only be     |
  |Mail:       dave@daveg.ca                    |  equal if and only if they |
  |http://daveg.ca                              |   are precisely opposite.  |
  =========================================================GLO================
 

From: "Julien Gabel" <jpeg@thilelli.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/58154: Snapshots prevent disk sync on shutdown.
Date: Thu, 14 Apr 2005 11:49:43 +0200 (CEST)

 Hello,
 
 As a side note, i just want to point out that i did not yet encountered
 this particular problem since 5.3-RELEASE, at least, on my 4 FreeBSD
 systems. Maybe this PR may be closed, if the original poster confirmed
 this behaviour for him too?
 
 -- 
 -jpeg.
 
State-Changed-From-To: open->closed 
State-Changed-By: mckusick 
State-Changed-When: Wed Jan 11 06:07:40 UTC 2012 
State-Changed-Why:  
This problem was resolved in 6.0. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58154 
>Unformatted:
