Subject: Re: strange dump output
To: None <current-users@netbsd.org>
From: Simon J. Gerraty <sjg@crufty.net>
List: current-users
Date: 01/03/2002 10:29:48
> /-- too        / lev 1 STRANGE
> sendbackup: start [too:/ level 1]
> sendbackup: info BACKUP=/sbin/dump
> sendbackup: info RECOVER_CMD=/usr/bin/gzip -dc |/sbin/restore -f... -
> sendbackup: info COMPRESS_SUFFIX=.gz
> sendbackup: info end
> |   DUMP: Found /dev/rsd0a on / in /etc/fstab
...
> |   DUMP: dumping (Pass IV) [regular files]
> ? Bus error - core dumped

Its restore that is dumping core.  I rebuilt it with symbols:

# gdb /sbin/restore /tmp/restore.core
GNU gdb 5.0nb1
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc--netbsdelf"...
Core was generated by `restore'.
Program terminated with signal 10, Bus error.
#0  0x4182c in fclose ()
(gdb) bt
#0  0x4182c in fclose ()
#1  0x13f20 in extractdirs (genmode=597052)
    at /u3/NetBSD/current/src/sbin/restore/dirs.c:203
#2  0x10abc in main (argc=1, argv=0xeffff8d4)
    at /u3/NetBSD/current/src/sbin/restore/main.c:255
#3  0x102d4 in ___start ()
(gdb) frame 0
#0  0x4182c in fclose ()
(gdb) frame 1
#1  0x13f20 in extractdirs (genmode=597052)
    at /u3/NetBSD/current/src/sbin/restore/dirs.c:203
203                                     (void) fclose(mf);
(gdb) p mf
$1 = (FILE *) 0x91c3c
(gdb) p *mf
$2 = {_p = 0x5cec0 "<directory file - name unknown>", _r = 7, _w = 596032,
  _flags = 256, _file = 0, _bf = {_base = 0xc0000 "~v~\177\003",
    _size = 41605}, _lbfsize = 787457, _cookie = 0x2e000000, _close = 0x4104,
  _read = 0xc0402, _seek = 0x2e2e0000, _write = 0xa281, _ext = {
    _base = 0xc0403 "", _size = 1702126336}, _up = 0x0, _ur = 64750593,
  _ubuf = "/\000\200", _nbuf = "", _lb = {_base = 0x1 "", _size = 41683},
  _blksize = 1574924, _offset = 8245931987523827058}
(gdb) 

prompt anyone?  If not I'll dig deeper.

Thanks
--sjg