From owner-freebsd-current@FreeBSD.ORG Sun Jul 8 14:34:17 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F77110656FC for ; Sun, 8 Jul 2012 14:34:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id E50358FC15 for ; Sun, 8 Jul 2012 14:34:16 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q68EVQmA069684; Sun, 8 Jul 2012 17:31:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q68EVD1i045538; Sun, 8 Jul 2012 17:31:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q68EVDox045537; Sun, 8 Jul 2012 17:31:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 8 Jul 2012 17:31:13 +0300 From: Konstantin Belousov To: Michael Butler Message-ID: <20120708143113.GZ2338@deviant.kiev.zoral.com.ua> References: <4FF98128.6050607@protected-networks.net> <20120708133455.GX2338@deviant.kiev.zoral.com.ua> <4FF98F21.9060003@protected-networks.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JefYhWJ8RkX3aR0a" Content-Disposition: inline In-Reply-To: <4FF98F21.9060003@protected-networks.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=unavailable version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: current@freebsd.org Subject: Re: sleeping thread panic? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 14:34:17 -0000 --JefYhWJ8RkX3aR0a Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 08, 2012 at 09:46:09AM -0400, Michael Butler wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On 07/08/12 09:34, Konstantin Belousov wrote: > > On Sun, Jul 08, 2012 at 08:46:32AM -0400, Michael Butler wrote: > >> Sorry, no symbols but this happened twice last night while being the > >> target of a dump over NFS .. > >> > >> root@mail:/var/crash # less info.0 > >> Dump header from device /dev/ada0s1 > >> Architecture: i386 > >> Architecture Version: 2 > >> Dump Length: 252809216B (241 MB) > >> Blocksize: 512 > >> Dumptime: Sun Jul 8 00:21:23 2012 > >> Hostname: mail.auburn.protected-networks.net > >> Magic: FreeBSD Kernel Dump > >> Version String: FreeBSD 10.0-CURRENT #87: Sat Jul 7 22:39:55 EDT 20= 12 > >> root@mail.auburn.protected-networks.net:/usr/obj/usr/src/sys/AUBURN > >> Panic String: sleeping thread > >> Dump Parity: 2996346376 > >> Bounds: 0 > >> Dump Status: good > >> > >> > >> (kgdb) bt > >> #0 0xc07530cd in doadump () > >> #1 0xc0753656 in kern_reboot () > >> #2 0xc0753cfc in panic () > >> #3 0xc079a34e in propagate_priority () > >> #4 0xc079b5e4 in turnstile_wait () > >> #5 0xc073ea71 in _mtx_lock_sleep () > >> #6 0xc09c4772 in vm_page_unwire () > >> #7 0xc07db039 in vfs_vmio_release () > >> #8 0xc07dd476 in getnewbuf () > >> #9 0xc07de50b in getblk () > >> #10 0xc0966d99 in ffs_balloc_ufs2 () > >> #11 0xc099281e in ffs_write () > >> #12 0xc0a38b05 in VOP_WRITE_APV () > >> #13 0xc068a65e in nfsvno_write () > >> #14 0xc06882e7 in nfsrvd_write () > >> #15 0xc066ea05 in nfsrvd_dorpc () > >> #16 0xc067d42f in nfssvc_program () > >> #17 0xc09356e2 in svc_run_internal () > >> #18 0xc0935b70 in svc_thread_start () > >> #19 0xc07204fb in fork_exit () > >> #20 0xc09fe7a4 in fork_trampoline () > >=20 > > You need to provide: > > 1. exact version of your kernel sources >=20 > This is the CVS equivalent of SVN r238221 >=20 > > 2. complete panic message. There should be backtrace of the 'sleeping > > thread', not the paniced thread, right after the panic message. > >=20 >=20 > Sorry, that is the entire info file - nothing more than I've posted is > logged, Catch it next time ? This should be quite reproducable, if real. Actually, try this. diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 9485fdd..de33afc 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1030,7 +1030,6 @@ rescan0: ++pageout_lock_miss; if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; - vm_page_lock_queues(); goto unlock_and_continue; } KASSERT(mp !=3D NULL, @@ -1041,7 +1040,6 @@ rescan0: if (vget(vp, LK_EXCLUSIVE | LK_TIMELOCK, curthread)) { VM_OBJECT_LOCK(object); - vm_page_lock_queues(); ++pageout_lock_miss; if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; @@ -1082,15 +1080,17 @@ rescan0: * If the page has become held it might * be undergoing I/O, so skip it */ + KASSERT(queues_locked, ("unlocked queues 2")); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); if (m->hold_count) { - vm_page_lock_queues(); - queues_locked =3D TRUE; vm_page_unlock(m); vm_page_requeue(m); if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; goto unlock_and_continue; } + vm_page_unlock_queues(); + queues_locked =3D FALSE; } =20 /* --JefYhWJ8RkX3aR0a Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/5mbAACgkQC3+MBN1Mb4hoMACbB3G9Gwu3YQ1fYAZHkwsN/GQm 3u4AnAl42Vp5wGz65vGg1t/qNF1r2wEh =yNBm -----END PGP SIGNATURE----- --JefYhWJ8RkX3aR0a--