From owner-svn-src-head@FreeBSD.ORG Wed Nov 9 18:01:08 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16982106566C; Wed, 9 Nov 2011 18:01:08 +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 A34678FC08; Wed, 9 Nov 2011 18:01:07 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pA9I0vs8004933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Nov 2011 20:00:57 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pA9HVSL5071621; Wed, 9 Nov 2011 19:31:28 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pA9HVSZT071620; Wed, 9 Nov 2011 19:31:28 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 9 Nov 2011 19:31:28 +0200 From: Kostik Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20111109173128.GF50300@deviant.kiev.zoral.com.ua> References: <201111091725.pA9HPhXh092218@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O5LZf7nZwJBw2QY0" Content-Disposition: inline In-Reply-To: <201111091725.pA9HPhXh092218@svn.freebsd.org> 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=-3.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: Re: svn commit: r227394 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2011 18:01:08 -0000 --O5LZf7nZwJBw2QY0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 09, 2011 at 05:25:43PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Wed Nov 9 17:25:43 2011 > New Revision: 227394 > URL: http://svn.freebsd.org/changeset/base/227394 >=20 > Log: > Stopped process may legitimately have some threads sleeping and not > suspended, if the sleep is uninterruptible. Even more, stopped process might have some threads still running in the kernel mode, or inhibited due to wait on blockable locks. I was unable to design an expression that would assert that such thread will be stopped at the kernel->user boundary. The assertion itself is useful and catched several bugs, but theoretically can cause false positives. If any report of the fired assert for kernel-mode thread is provided, I will remove the assertions. > =20 > Reported and tested by: pho > MFC after: 1 week >=20 > Modified: > head/sys/amd64/amd64/machdep.c > head/sys/i386/i386/machdep.c >=20 > Modified: head/sys/amd64/amd64/machdep.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/amd64/amd64/machdep.c Wed Nov 9 17:15:51 2011 (r227393) > +++ head/sys/amd64/amd64/machdep.c Wed Nov 9 17:25:43 2011 (r227394) > @@ -2047,7 +2047,8 @@ int > fill_fpregs(struct thread *td, struct fpreg *fpregs) > { > =20 > - KASSERT(td =3D=3D curthread || TD_IS_SUSPENDED(td), > + KASSERT(td =3D=3D curthread || TD_IS_SUSPENDED(td) || > + (P_SHOULDSTOP(td->td_proc) && TD_IS_SLEEPING(td)), > ("not suspended thread %p", td)); > fpugetregs(td); > fill_fpregs_xmm(&td->td_pcb->pcb_user_save, fpregs); >=20 > Modified: head/sys/i386/i386/machdep.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/i386/i386/machdep.c Wed Nov 9 17:15:51 2011 (r227393) > +++ head/sys/i386/i386/machdep.c Wed Nov 9 17:25:43 2011 (r227394) > @@ -3299,7 +3299,8 @@ int > fill_fpregs(struct thread *td, struct fpreg *fpregs) > { > =20 > - KASSERT(td =3D=3D curthread || TD_IS_SUSPENDED(td), > + KASSERT(td =3D=3D curthread || TD_IS_SUSPENDED(td) || > + (P_SHOULDSTOP(td->td_proc) && TD_IS_SLEEPING(td)), > ("not suspended thread %p", td)); > #ifdef DEV_NPX > npxgetregs(td); --O5LZf7nZwJBw2QY0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEUEARECAAYFAk66uPAACgkQC3+MBN1Mb4iVQgCgyNICrEdJebqo7MtFOXKdwuJ9 BZYAlRcKOW/R6XRZhWWBIhgLR743YUQ= =NItd -----END PGP SIGNATURE----- --O5LZf7nZwJBw2QY0--