From owner-freebsd-current@freebsd.org Wed Aug 22 00:01:59 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 752F91083E9B for ; Wed, 22 Aug 2018 00:01:59 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670080.outbound.protection.outlook.com [40.107.67.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1764674F36; Wed, 22 Aug 2018 00:01:58 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM (52.132.44.160) by YTOPR0101MB1900.CANPRD01.PROD.OUTLOOK.COM (52.132.49.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.23; Wed, 22 Aug 2018 00:01:57 +0000 Received: from YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM ([fe80::f171:1f28:a0a2:f127]) by YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM ([fe80::f171:1f28:a0a2:f127%3]) with mapi id 15.20.1080.010; Wed, 22 Aug 2018 00:01:57 +0000 From: Rick Macklem To: Matthew Macy CC: freebsd-current Subject: Re: panic excl->shared for an AF_LOCAL socket Thread-Topic: panic excl->shared for an AF_LOCAL socket Thread-Index: AQHUOBRM4+qxEJX+P0ebgxfNDW4pUKTHvz0AgAMlndk= Date: Wed, 22 Aug 2018 00:01:57 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTOPR0101MB1900; 6:JquWGld4q/TnV3KNqVkz6LzFnb8C+aa7834dQ+8v5IYhzz77Tj7sIk4degvW+RcxkH/sxHW0SuBPPUwygbwStiITyrTXKwqFhcHw8z4iX1w84QkXj+bUksJH/6pmDEAWDAKqO6efaPVP1WD+873Nd2GS1JS8gXXapiVG3wHCa9jATCS4OrW8LGIezC+84dS3OkJssMSFYzpGQ5o7pmpGQKXTjvO2xi/OMT/q7rVieVg+5/tP/DrOWF1ExjmOOuEp3eud35E4U+0XAfnKiRUSAHC8o1zeqFpBBd0HS1pY1yigM9bgRHhClkv834PA6wtdBc18hbDJVJ1+C2hXjVV8GVa7SiLdzZVs3HSQv1w03XZFm/22zhgiCOoMMLzyRLWWSI8JRxnzvsX1k4fwM9ac3NQDXm13yH/kvkcv5oX0pYL32bvunO/3OXSt2NExLpUVP6R7TvT0IqXP0cftfu5srg==; 5:NnguWa+eWByEg1ESVnPG4rktk0FWr3dzVFPIh/3InvxqExr+YP97XICh2Zx2cxYEFnbFGRCFBYeWVXhZu6VCmQtQQLYP5PLTm+Qx/XDFev2YMmMlVeS88TQLpyOKrEGAZPKiUz6BHJIWSCGNXqzT10eHj9glqbUcMwfrhuwLHL8=; 7:2tjxVbuaDBZm8+GbwzI76sZETxYvA36rKYj9iMXJRX/GbUdrtb/Yf6NPzoq1c56PoeK0BnBEnxgB/P2AmmD8muXM6fQoS1iRMWWpb+Ur1bvHnyXC9CruOnxM/a6tmQFR4079BxN45gm5Q3C7KVPDar1f7sUarbv9o0DLtk1xsqzVjMYguBw46ngWfLE4VP0FCvMfES19GDsJGN5CBATTB5GBcVu2oahpn3S6JJJTvu3sn+x9qO7i6NGNYZQnX4x6 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 158586a3-8609-4260-a90d-08d607c27a42 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:YTOPR0101MB1900; x-ms-traffictypediagnostic: YTOPR0101MB1900: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201708071742011)(7699016); SRVR:YTOPR0101MB1900; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB1900; x-forefront-prvs: 0772E5DAD5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(136003)(366004)(396003)(376002)(199004)(189003)(7696005)(6506007)(316002)(786003)(74482002)(99286004)(11346002)(446003)(76176011)(478600001)(450100002)(476003)(486006)(2900100001)(4326008)(6246003)(102836004)(229853002)(14454004)(5250100002)(5660300001)(2906002)(9686003)(25786009)(97736004)(53936002)(14444005)(26005)(6436002)(106356001)(105586002)(256004)(81166006)(74316002)(68736007)(305945005)(6916009)(8676002)(33656002)(86362001)(55016002)(186003)(8936002)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB1900; H:YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: 6YTICv8IxY+AgnbFk/XRXI4OpK/GXQNEoKiPpHrKGor71KzKK6A9V/2DiS3xYBMMAcfjp3e2YyDwpXWkB17dIRO6xuIDz0dSZXDNCBmXMLXG7eQHB6J+MhKf1iiNYWjBz8njIkmW7h4OJiGNn+gj6g+x9mqdowYR4v52GSsA1J74l+5OkUl4Sm6nOTTmII7b/SK0uI37p6w0D/HIrPJ+3vPRYqrc8SkQx6zCPEU7exfT6Yb9XhRvqS97X7gZnyveJQEc/XgQiJuAx6iL6pX7Xd/IZeXc4hUAe4Iw+8XAlrQudzZ59tM+id0IcfwIv2Rx/H0oPEQcif4/tB+JCneGca6ZzPBiLZLWMlCU7g3Np7s= 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-Network-Message-Id: 158586a3-8609-4260-a90d-08d607c27a42 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Aug 2018 00:01:57.5192 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1900 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 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: Wed, 22 Aug 2018 00:01:59 -0000 Matthew Macy wrote: [stuff snipped] >I don't know what's special in this case, but I did revamp the locking the= re several >months back so I'll take a look next weekend. Thanks but don't worry about it for now. I think I figured out how the pani= c() occurred. If the nfsd was accessing /var/run/nfsuserd.sock for a client and= then tried to soconnect() to it to do the upcall, the nfsd thread would already = have /var/run/nfsuserd.sock vnode locked. The old way (and what FreeBSD-11 still does) was to use a UDP socket, which isn't in the file system namespace. (I switched the default to AF_LOCAL so = that nfsuserd could be used in jails where 127.0.0.1 doesn't work, but I now thi= nk it isn't safe to use an AF_LOCAL socket, since it is in the file system's n= amespace and, therefore, can be accessed directly by the NFS code. I think I'll revert the "switch to AF_LOCAL socket" patch. Hopefully the reporter can help confirm this "theory", rick