From owner-freebsd-current@freebsd.org Mon Oct 16 22:24:36 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA5CEE46E14 for ; Mon, 16 Oct 2017 22:24:36 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0051.outbound.protection.outlook.com [104.47.34.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 729C26FF8C for ; Mon, 16 Oct 2017 22:24:36 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM (52.132.46.161) by YTOPR0101MB1898.CANPRD01.PROD.OUTLOOK.COM (52.132.49.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 16 Oct 2017 22:24:35 +0000 Received: from YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM ([fe80::50ab:b8bf:bbb9:81f4]) by YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM ([fe80::50ab:b8bf:bbb9:81f4%13]) with mapi id 15.20.0077.022; Mon, 16 Oct 2017 22:24:34 +0000 From: Rick Macklem To: "freebsd-current@freebsd.org" CC: "fabian.freyer@physik.tu-berlin.de" Subject: pfind_locked(pid) fails when in a jail? Thread-Topic: pfind_locked(pid) fails when in a jail? Thread-Index: AQHTRsy4PlPkoH+r1k6i+VZl2ipOVw== Date: Mon, 16 Oct 2017 22:24:34 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTOPR0101MB1898; 6:GOi1CKx5W7V5V1c0cGo5dHL7rTBmmxnFbz5Bt3W5QDgQ0WZRVhNlo9KW0iqx/+f4bfX59es3mT+tSRuSxbdjxQG9mIbRdq9JXjigP9wI4Hyjo0TgWiFaciCsmXCKShq4lO8VSryBbWX4C3TLcHnh97d4+L+2T69w3MiVljU3uHCDf9mWGZ6vpp2dziPmpKzwZhl7x2bQdoJh8J39fTM5AVZCXUeRR2wyJU+w4wfSvzGSm2LMOYudmATYGXroOOsQ8/sPTNiqe/l1I7OSM4ZP6FbvveOP9KEIPswplVtBuvYWoav8Yt+1PQiwU1X2TmDd/pHZOaPF334AB7aFqh8mNw==; 5:8eDVM9Yj8gOVn4q9M4Bg/zjL29fm1Ntw+9v6L1wBFwN9Pel//uR5v/bX7QmdDlutIfUXHpOUmZ2G+jdmarPVGqyDgtDLN3vf+tL/oxa1ug5+MXbdTjeu2AEsL37pt4FGyBNulHYr5u5a5arWIAdJDg==; 24:Rqw/HcQKrm/z0acpu3AD2aVyY0E/G5Qp0W1qw0ym7utdHf/zVxXOzoQwZRzNTo4gFjOS7AzUJwS58g37pBcAiB0zGyTOEiTYbcrjsgL6tTc=; 7:LU17x8Wkp0HmyYlpTepLy3nHd76yNZiI4r8Lnq0eHCchgU11bwfrykjn1bs3+KC5t1oAjKVtGM3MUS9ijvA9za6ZFjK5qaAUX64r4lM6jnHk3ObhCmtXlyOXS63G1kmFz3I/4VE5P7/UTDWLeKwlFKGwCIB8LM7m1rwDE3gano/vzQsMWz1/r8WI6jwsLe2R9MT9bv7YVfXsqz9F2MM8DJXtzdvHD5KRM1UDQZJQOYQ= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: b9170dc4-35ae-4b50-1a9a-08d514e4ae17 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:YTOPR0101MB1898; x-ms-traffictypediagnostic: YTOPR0101MB1898: x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123560025)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(20161123562025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:YTOPR0101MB1898; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:YTOPR0101MB1898; x-forefront-prvs: 0462918D61 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(39860400002)(51874003)(199003)(189002)(8936002)(786003)(316002)(2501003)(81156014)(81166006)(33656002)(102836003)(6506006)(6436002)(97736004)(3660700001)(9686003)(74482002)(68736007)(305945005)(5250100002)(7696004)(8676002)(189998001)(55016002)(74316002)(5660300001)(53936002)(105586002)(106356001)(2351001)(3280700002)(5640700003)(101416001)(2900100001)(6916009)(478600001)(14454004)(2906002)(86362001)(50986999)(4326008)(25786009)(54356999); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB1898; H:YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2017 22:24:34.8173 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1898 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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: Mon, 16 Oct 2017 22:24:37 -0000 Hi, A problem w.r.t. the NFSv4 client's renew thread (nfscl) running up a lot o= f CPU when the NFSv4 mount is in a jail has been reported to the freebsd-stable@ mailing list. I know nothing about jails, but when looking at the code, the most obvious cause of this would be "pfind_locked(pid)" failing to find a process. - Will a jail affect how pfind_locked() behaves? - If the answer is "yes", then I need to know how to either... 1 - Make pfind_locked() work the same as when no jail exists. OR 2 - A way for the Renew thread can determine that a jail will affect pfi= nd_locked() behaviour, so it can avoid this problem. #1 is preferred, since #2 may not be 100% correct, although #2 would allow = the code to behave well for most cases. (The exception is a case where a file r= emains open for a long period of time, with different processes doing byte range l= ocks on the file.) Thanks in advance for any help w.r.t. jail behaviour, rick=