From owner-freebsd-fs@FreeBSD.ORG Thu Jul 30 05:49:44 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 781BE106564A; Thu, 30 Jul 2009 05:49:44 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206049004.chello.pl [87.206.49.4]) by mx1.freebsd.org (Postfix) with ESMTP id BBA1D8FC1B; Thu, 30 Jul 2009 05:49:43 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id C550145CD9; Thu, 30 Jul 2009 07:49:41 +0200 (CEST) Received: from localhost (chello087206049004.chello.pl [87.206.49.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 9BB5945C8A; Thu, 30 Jul 2009 07:49:36 +0200 (CEST) Date: Thu, 30 Jul 2009 07:50:01 +0200 From: Pawel Jakub Dawidek To: Maxim Dounin Message-ID: <20090730055001.GB2130@garage.freebsd.pl> References: <20090730013857.GB8794@mdounin.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p4qYPpj5QlsIQJ0K" Content-Disposition: inline In-Reply-To: <20090730013857.GB8794@mdounin.ru> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-fs@freebsd.org, freebsd-current@freebsd.org Subject: Re: another zfs panic X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2009 05:49:44 -0000 --p4qYPpj5QlsIQJ0K Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 30, 2009 at 05:38:57AM +0400, Maxim Dounin wrote: > Hello! >=20 > Here is zfs panic I'm able to reproduce by running an scp from=20 > remote machine to zfs volume and 3 parallel untars of ports tree=20 > in cycle. Not sure that everything is required, but the above=20 > workload triggers panic in several hours. >=20 > This is on fresh current with GENERIC kernel: >=20 > panic: sx_xlock() of destroyed sx @=20 > /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs= /zfs_rlock.c:535 > cpuid =3D 6 > KDB: enter: panic > [thread pid 36 tid 100071 ] > Stopped at kdb_enter+0x3d: movq $0,0x68a040(%rip) > db> bt > Tracing pid 36 tid 100071 td 0xffffff00040f3720 > kdb_enter() at kdb_enter+0x3d > panic() at panic+0x17b > _sx_xlock() at _sx_xlock+0xfc > zfs_range_unlock() at zfs_range_unlock+0x38 > zfs_get_data() at zfs_get_data+0xc1 > zil_commit() at zil_commit+0x532 > zfs_sync() at zfs_sync+0xa6 > sync_fsync() at sync_fsync+0x13a > sync_vnode() at sync_vnode+0x157 > sched_sync() at sched_sync+0x1d1 > fork_exit() at fork_exit+0x12a > fork_trampoline() at fork_trampoline+0xe > --- trap 0, rip =3D 0, rsp =3D 0xffffff80e7ee3d30, rbp =3D 0 --- >=20 > Machine is otherwise idle. The only zfs-related tuning applied is=20 > compression=3Dgzip-9. >=20 > Please let me know if you want me to test some patches. The kernel syncer tries to sync vnode which has its znode already destroyed. There is one place (that we know of) where vrecycle() is missing. Could you try this patch: http://people.freebsd.org/~pjd/patches/zfs_vnops.c.2.patch --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --p4qYPpj5QlsIQJ0K Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKcTSJForvXbEpPzQRAnA8AKCW8RInnvuPRaqbzWtUW6d/h121XgCfdgK1 ltQcddAqHrtc3JaVmnyjIlQ= =hpX/ -----END PGP SIGNATURE----- --p4qYPpj5QlsIQJ0K--