From mishania@skraldespand.demos.su  Fri Oct  3 06:16:32 1997
Received: from skraldespand.demos.su (skraldespand.demos.su [194.87.0.19])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA12647
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 3 Oct 1997 06:16:28 -0700 (PDT)
Received: (from mishania@localhost)
          by skraldespand.demos.su (8.8.7/D) id RAA21122;
          Fri, 3 Oct 1997 17:15:53 +0400 (MSD)
Message-Id: <199710031315.RAA21122@skraldespand.demos.su>
Date: Fri, 3 Oct 1997 17:15:53 +0400 (MSD)
From: mishania@demos.net
Reply-To: mishania@demos.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: restore doesn't correctly handle "sparse" files.
X-Send-Pr-Version: 3.2

>Number:         4683
>Category:       bin
>Synopsis:       restore doesn't correctly handle "sparse" files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    iedowse
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct  3 06:20:00 PDT 1997
>Closed-Date:    Sun Feb 17 16:59:50 PST 2002
>Last-Modified:  Sun Feb 17 17:00:12 PST 2002
>Originator:     Mikhail A. Sokolov
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Demos Company, Ltd.
>Environment:
FreeBSD 3.0-CURRENT, any FFS with files, where some of them are sparse; dump 
from 3.0, restore from 3.0. FreeBSD-2.1 and FreeBSD 2.2 branches have the
following problem also.

>Description:
restore can't handle "sparse" files correctly, - segfaults.

>How-To-Repeat:
#dump 0af that.dump <file system which also includes sparse files as "normal" ones> 
# restore -rf that.dump
hole in map
abort? [yn] Segmentation fault
#
zcat dump.gz | restore -rf -
hole in map
abort? [yn] Segmentation fault
# uname -a
FreeBSD XXXX.demos.su 2.2-970618-RELENG FreeBSD 2.2-970618-RELENG #0: Fri Jul 18 03:46:46 MSD 1997     root@myname.my.domain:/usr/src/sys/compile/XXXX  i386
----
zcat dump.gz | restore -rf -
hole in map
abort? [yn] Segmentation fault
# uname -a 
FreeBSD ZZZZZZZ.demos.su 3.0-970926-SNAP FreeBSD 3.0-970926-SNAP #0: Mon Sep 29 00:13:37 MSD 1997     mishania@pappnase.demos.su:/usr/src/sys/compile/GEISTESKRANK  i386
---- 
zcat dump.gz | restore -rf -
hole in map
abort? [yn] Segmentation fault
# uname -a
FreeBSD YYYY.demos.su 2.1.5-RELEASE FreeBSD 2.1.5-RELEASE #1: Mon Mar 31 12:27:49 MSD 1997     tbk@YYYY.demos.su:/usr/src/sys/compile/SHOW  i386

This opetation won't even drop the core, so no gdb output is available.

>Fix:
The fix isn't really known; the workaround is to use [g,gnu]tar with -S option.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: ache 
Responsible-Changed-When: Mon Oct 6 23:57:18 PDT 1997 
Responsible-Changed-Why:  
Goes to "pending" for unknown reason 
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: imp 
Responsible-Changed-When: Wed Sep 16 11:03:47 MDT 1998 
Responsible-Changed-Why:  
I'll look into this. 
Responsible-Changed-From-To: imp->des 
Responsible-Changed-By: des 
Responsible-Changed-When: Tue Nov 20 16:37:17 PST 2001 
Responsible-Changed-Why:  
Warner asked me to take this. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=4683 
State-Changed-From-To: open->feedback 
State-Changed-By: iedowse 
State-Changed-When: Sun Feb 17 16:44:28 PST 2002 
State-Changed-Why:  

This was almost certainly fixed a long time ago by revision 1.14 
of sbin/restore/tape.c. Based on the 'hole in map' error, the problem 
was probably due to a large filesystem, not sparse files. Can you 
confirm that the problem is fixed in more recent releases? 


Responsible-Changed-From-To: des->iedowse 
Responsible-Changed-By: iedowse 
Responsible-Changed-When: Sun Feb 17 16:44:28 PST 2002 
Responsible-Changed-Why:  
I've been looking into a few restore bugs. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=4683 
State-Changed-From-To: feedback->closed 
State-Changed-By: iedowse 
State-Changed-When: Sun Feb 17 16:59:50 PST 2002 
State-Changed-Why:  

Mail to submitter bounces. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=4683 
>Unformatted:
