Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Mar 2006 08:17:12 GMT
From:      Pietro Cerutti <pietro.cerutti@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/94045: dump(8) seg-fault on nullfs
Message-ID:  <200603030817.k238HCSN070807@www.freebsd.org>
Resent-Message-ID: <200603030820.k238K75L019448@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help


>Number:         94045
>Category:       bin
>Synopsis:       dump(8) seg-fault on nullfs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 03 08:20:07 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Pietro Cerutti
>Release:        6.0-STABLE
>Organization:
-
>Environment:
FreeBSD gahr 6.0-STABLE FreeBSD 6.0-STABLE #4: Wed Mar  1 16:51:41 CET 2006     toor@gahr:/usr/obj/usr/src/sys/GAHR  i386
>Description:
The dump(8) utility crashes on nullfs types, when they are mounted via fstab.

A nullfs is defined in the last row of /etc/fstab:

# Device          Mountpoint           FStype      Options     Dump  Pass#
/dev/ad0s2b       none                 swap        sw          0  0
/dev/ad0s2a       /                    ufs         rw          1  1
/dev/ad0s2f       /home                ufs         rw          2  2
/dev/ad0s2e       /usr                 ufs         rw          2  2
/dev/ad0s2d       /var                 ufs         rw          2  2
/dev/acd0         /cdrom               cd9660      ro,noauto   0  0
/dev/cd0          /cdrom               cd9660      ro,noauto   0  0
/dev/ad0s1        /mnt/win             ntfs        ro,noauto   0  0
/dev/da0          /mnt/pen             msdosfs     rw,noauto   0  0
linprocfs         /compat/linux/proc   linprocfs   rw          0  0
proc              /proc                procfs      rw          0  0
/usr/local/etc    /mnt/tmp             nullfs      rw,noauto   0  0

After mounting it with (# mount /mnt/tmp), it appears in the list of mounted filesystems (# mount). See the last row:

/dev/ad0s2a       on / (ufs, local)
devfs             on /dev (devfs, local)
/dev/ad0s2f       on /home (ufs, local, soft-updates)
/dev/ad0s2e       on /usr (ufs, local, soft-updates)
/dev/ad0s2d       on /var (ufs, local, soft-updates)
linprocfs         on /usr/compat/linux/proc (linprocfs, local)
procfs            on /proc (procfs, local)
pid747@gahr:/net  on /net (nfs)
pid747@gahr:/host on /host (nfs)
srv-file:/share   on /.amd_mnt/srv-file/host/share (nfs, nosuid)
/usr/local/etc    on /mnt/tmp (nullfs, local)

dump(8) seg-faults trying to dump it:

# dump -0 -f usr.local.etc /mnt/tmp
  DUMP: SIGSEGV: ABORTING!
Segmentation fault (core dumped)

The strange is that if the nullfs filesystem is not listed in /etc/fstab, and is mounted by hand (# mount_nullfs /usr/local/etc /mnt/tmp), then dump(8) gives an "unknown filesystem error), which is acceptable:

# mount_nullfs /usr/local/etc/ /mnt/tmp
# dump -0 -f usr.local.etc /mnt/tmp
dump: /mnt/tmp: unknown file system


>How-To-Repeat:
1) add a line in /etc/fstab specifying a nullfs mount point (e.g. /usr/ on /mnt)
2) mount it (e.g. mount /mnt)
3) try to dump it (e.g. dump -0 -f test /mnt)
-> dump should seg-fault

4) remove the line in /etc/fstab
5) mount a nullfs by hand (e.g. mount_nullfs /usr/ mnt/)
6) try to dump it (e.g dump -0 -f test /mnt)
-> dump should say "dump: /mnt: unknown file system"
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603030817.k238HCSN070807>