From owner-freebsd-stable@FreeBSD.ORG Fri Feb 15 03:05:58 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CBC2BAF1; Fri, 15 Feb 2013 03:05:58 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 546F7E11; Fri, 15 Feb 2013 03:05:57 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAKWlHVGDaFvO/2dsb2JhbABEhkm6MXOCHwEBBSMEUhsOChEZAgRVBhOIEqppkjeQcYETA4hmhi+HD5BTgyWBSyMb X-IronPort-AV: E=Sophos;i="4.84,669,1355115600"; d="scan'208";a="14197857" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu.net.uoguelph.ca with ESMTP; 14 Feb 2013 22:05:56 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 75E6CB4031; Thu, 14 Feb 2013 22:05:56 -0500 (EST) Date: Thu, 14 Feb 2013 22:05:56 -0500 (EST) From: Rick Macklem To: Marc Fournier Message-ID: <1964289267.3041689.1360897556427.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <9A149E78-BB4F-414D-AAE5-331C5934FF82@hub.org> Subject: Re: 9-STABLE -> NFS -> NetAPP: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3041688_1205401174.1360897556425" X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: Konstantin Belousov , freebsd-stable@freebsd.org, John Baldwin X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 03:05:58 -0000 ------=_Part_3041688_1205401174.1360897556425 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Marc Fournier wrote: > On 2013-02-13, at 3:54 PM, Rick Macklem wrote: >=20 > >> > > The pid that is in "T" state for the "ps auxlH". >=20 > Different server, last kernel update on Jan 22nd, https process this > time instead of du last time. >=20 > I've attached: >=20 > ps auxlH > ps auxlH of just the processes that are in TJ state (6 httpd servers) > procstat output for each of the 6 process >=20 >=20 >=20 >=20 > They are included as attachments =E2=80=A6 if these don't make it through= , let > me know, just figured I'd try and keep it compact ... Well, I've looked at this call path a little closer: 16693 104135 httpd - mi_switch+0x186 thread_suspe= nd_check+0x19f sleepq_catch_signals+0x1c5 sleepq_timedwait_sig+0x19 _sleep+0x2ca clnt_vc_call+0x763 clnt_reconnect_= call+0xfb newnfs_request+0xadb nfscl_request+0x72 nfsrpc_accessrpc+0x1df nfs34_access_otw+0x56 nfs_acces= s+0x306 vn_open_cred+0x5a8 kern_openat+0x20a amd64_syscall+0x540 Xfast_syscall+0xf7=20 I am probably way off, since I am not familiar with this stuff, but it seems to me that thread_suspend_check() should just return 0 for the case where stop_allowed =3D=3D SIG_STOP_NOT_ALLOWED (TDF_SBDRY flag set) instead of sitting in the loop and doing a mi_switch(). I'm not even sure if it should call thread_suspend_check() for this case, but there are cases in thread_suspend_check() that I don't understand. Although I don't really understand thread_suspend_check(), I've attached a simple patch that might be a starting point for fixing this? I wouldn't recommend trying the patch until kib and/or jhb weigh in on whether it makes any sense. rick ------=_Part_3041688_1205401174.1360897556425 Content-Type: text/x-patch; name=sigstop.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=sigstop.patch LS0tIGtlcm4vc3Vicl9zbGVlcHF1ZXVlLmMuc2F2CTIwMTMtMDItMTQgMjA6Mzk6NDcuMDAw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