Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Sep 2009 16:22:37 GMT
From:      Tim Bishop <tim@bishnet.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/138764: ZFS panic: "panic: dirtying snapshot!"
Message-ID:  <200909121622.n8CGMb7j085963@www.freebsd.org>
Resent-Message-ID: <200909121630.n8CGU7pv080408@freefall.freebsd.org>

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

>Number:         138764
>Category:       kern
>Synopsis:       ZFS panic: "panic: dirtying snapshot!"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 12 16:30:07 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Tim Bishop
>Release:        8-STABLE (post BETA4)
>Organization:
>Environment:
FreeBSD aberfal.kent.ac.uk 8.0-BETA4 FreeBSD 8.0-BETA4 #23: Fri Sep 11 18:33:19 BST 2009     tdb@aberfal.kent.ac.uk:/usr/obj/usr/src/sys/ABERFAL  i386
>Description:
I'm running with a ZFS root file system using GPT partitioning and gptzfsboot. I then started using ZFS snapshots by using the sysutils/freebsd-snapshot port. This port basically just runs "zfs snapshot" and does some housekeeping.

The first snapshot went fine (when the machine was quiet). The second (when the machine was doing a portupgrade) caused a panic. All I have on the console is:

panic: dirtying snapshot

I traced this down to:

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:1104

void
dsl_dataset_dirty(dsl_dataset_t *ds, dmu_tx_t *tx)
{
        dsl_pool_t *dp;

        if (ds == NULL) /* this is the meta-objset */
                return;

        ASSERT(ds->ds_user_ptr != NULL);

        if (ds->ds_phys->ds_next_snap_obj != 0)
                panic("dirtying snapshot!");

        dp = ds->ds_dir->dd_pool;

        if (txg_list_add(&dp->dp_dirty_datasets, ds, tx->tx_txg) == 0) {
                /* up the hold count until we can be written out */
                dmu_buf_add_ref(ds->ds_dbuf, ds);
        }
}

I'm not sure what this means though.

Sadly I have no debugging enabled and no crash dump.
>How-To-Repeat:
Hard to say. Run ZFS root and do snapshots when the machine is busy? I've only seen it once.
>Fix:


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



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