kern/160400: zfs rename dumps core

Nikolai Lifanov lifanov at
Fri Sep 2 17:00:28 UTC 2011

>Number:         160400
>Category:       kern
>Synopsis:       zfs rename dumps core
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 02 17:00:24 UTC 2011
>Originator:     Nikolai Lifanov
>Release:        9.0 beta 2
FreeBSD lifanovbsd2 9.0-BETA2 FreeBSD 9.0-BETA2 #0: Fri Sep  2 03:47:59 EDT 2011     root at lifanovbsd2:/usr/obj/usr/src/sys/LIFANOV_FAST  amd64
After creating a full boot environment and trying to boot into it, renaming the dataset containing the environment fails with a coredump.

lifanovbsd2# zfs list
NAME                                     USED  AVAIL  REFER  MOUNTPOINT
rpool                                   7.22G   891G   393M  none
rpool/ROOT                              3.84G   891G    31K  none
rpool/ROOT/be-base                      3.84G   891G   399M  legacy
rpool/ROOT/be-base/tmp                    76K   891G    44K  /tmp
rpool/ROOT/be-base/usr                  3.37G   891G  2.17G  /usr
rpool/ROOT/be-base/usr/home               88K   891G    67K  /usr/home
rpool/ROOT/be-base/usr/jail               31K   891G    31K  /usr/jail
rpool/ROOT/be-base/usr/ports             539M   891G   426M  /usr/ports
rpool/ROOT/be-base/usr/ports/distfiles   113M   891G   113M  /usr/ports/distfiles
rpool/ROOT/be-base/usr/ports/packages     31K   891G    31K  /usr/ports/packages
rpool/ROOT/be-base/usr/src               684M   891G   684M  /usr/src
rpool/ROOT/be-base/var                  84.0M   891G   136K  /var
rpool/ROOT/be-base/var/crash            31.5K   891G  31.5K  /var/crash
rpool/ROOT/be-base/var/db               82.9M   891G  80.3M  /var/db
rpool/ROOT/be-base/var/db/pkg           2.57M   891G  2.57M  /var/db/pkg
rpool/ROOT/be-base/var/empty              31K   891G    31K  /var/empty
rpool/ROOT/be-base/var/log               629K   891G   397K  /var/log
rpool/ROOT/be-base/var/mail               64K   891G    38K  /var/mail
rpool/ROOT/be-base/var/run               106K   891G  61.5K  /var/run
rpool/ROOT/be-base/var/tmp                52K   891G    32K  /var/tmp
rpool/tmp                                 45K   891G    44K  none
rpool/usr                               2.85G   891G  2.17G  none
rpool/usr/home                            69K   891G    68K  none
rpool/usr/jail                            31K   891G    31K  none
rpool/usr/ports                          345M   891G   232M  none
rpool/usr/ports/distfiles                113M   891G   113M  none
rpool/usr/ports/packages                  32K   891G    31K  none
rpool/usr/src                            348M   891G   348M  none
rpool/var                               81.9M   891G   133K  none
rpool/var/crash                         32.5K   891G  31.5K  none
rpool/var/db                            81.4M   891G  80.5M  none
rpool/var/db/pkg                         890K   891G   889K  none
rpool/var/empty                           31K   891G    31K  none
rpool/var/log                            146K   891G   112K  none
rpool/var/mail                          33.5K   891G  32.5K  none
rpool/var/run                           83.5K   891G  61.5K  none
rpool/var/tmp                             33K   891G    32K  none
lifanovbsd2# zfs rename rpool/ROOT/be-base rpool/ROOT/be-current
Assertion failed: (!clp->cl_alldependents), file /usr/src/cddl/lib/libzfs/../../../cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c, line 470.
Abort (core dumped)

Do roughly the following:


zfs snapshot -r rpool at snap0

zfs create -o dedup=on rpool/ROOT

zfs send rpool at snap0 | zfs recv rpool/ROOT/be-base

zfs destroy rpool/ROOT/be-base at snap0

for i in `zfs list -t snapshot | grep snap0 | cut -d@ -f1 | cut -c6-`; do (zfs send rpool${i}@snap0 | zfs recv rpool/ROOT/be-base${i}); done

for i in `mount | grep -v /mnt/ | grep rpool/ | cut -d' ' -f1 | cut -c6-`; do zfs set mountpoint=none rpool${i}; zfs set mountpoint=${i} rpool/ROOT/be-base${i}; done

#Check your mountpoints and fiddle to get everything right.

#Running previous command twice to start off might help.

#'zfs list' can lie

zfs set freebsd:boot-environment=1 rpool/ROOT/be-base

zfs set mountpoint=/mnt rpool/ROOT/be-base

sed -i 's/zfs:rpool/zfs:rpool\/ROOT\/be-base/g' /rpool/ROOT/be-base/boot/loader.conf

zfs set mountpoint=legacy rpool/ROOT/be-base

zpool set bootfs=rpool/ROOT/be-base rpool



After this, do a 'zfs rename' on be-base.



More information about the freebsd-bugs mailing list