From owner-freebsd-bugs@freebsd.org Tue Apr 10 21:06:26 2018 Return-Path: Delivered-To: freebsd-bugs@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 3ED85F99596 for ; Tue, 10 Apr 2018 21:06:26 +0000 (UTC) (envelope-from decui@microsoft.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B1C837C4CF for ; Tue, 10 Apr 2018 21:06:25 +0000 (UTC) (envelope-from decui@microsoft.com) Received: by mailman.ysv.freebsd.org (Postfix) id 71958F99589; Tue, 10 Apr 2018 21:06:25 +0000 (UTC) Delivered-To: bugs@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 4F25FF99588 for ; Tue, 10 Apr 2018 21:06:25 +0000 (UTC) (envelope-from decui@microsoft.com) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sg2apc01on0108.outbound.protection.outlook.com [104.47.125.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 515697C4C8; Tue, 10 Apr 2018 21:06:23 +0000 (UTC) (envelope-from decui@microsoft.com) Received: from KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM (10.170.167.17) by KL1P15301MB0072.APCP153.PROD.OUTLOOK.COM (10.170.168.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.4; Tue, 10 Apr 2018 21:06:04 +0000 Received: from KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM ([10.170.167.17]) by KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM ([10.170.167.17]) with mapi id 15.20.0696.003; Tue, 10 Apr 2018 21:06:04 +0000 From: Dexuan Cui To: Bruce Evans CC: "jeff@freebsd.org" , "bugs@freebsd.org" , "Hongxiong Xian (Wicresoft)" Subject: RE: [Bug 227404] UP FreeBSD VM always hangs on reboot since 20180329-r331740 Thread-Topic: [Bug 227404] UP FreeBSD VM always hangs on reboot since 20180329-r331740 Thread-Index: AQHT0J/nyelI+LHsDUS3orlx6wz1raP6QPXQgAAtUgCAAAnyMA== Date: Tue, 10 Apr 2018 21:06:03 +0000 Message-ID: References: <20180410173347.D1459@besplex.bde.org> <20180411055306.P5336@besplex.bde.org> In-Reply-To: <20180411055306.P5336@besplex.bde.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=decui@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2018-04-10T21:06:01.0345303Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [2001:4898:80e8:8::616] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; KL1P15301MB0072; 7:t5EWs9UKVEwznh6HAS1+r1d4GaMUszcXIWZEodftBDj8pAW8MSEuxvvDX8ozCdtCQsMPnT5i0KObnj7GAZ4o9lAvE3OFnz1x2xLHK+akIwosLySFRWncgjGd2Cn9nqDafWMkJQwmUvZGsNHIYkvljOsG4sZd0yyorPdTJZdZCrbhYUAskmApM4idi9CK/9kSxl2Zxbgl1BAHKABAq1KxWodWi08xSSzyl05OQjWWpOKN1Wt9sDaL4OE5f/mX7KUa; 20:diPGWWA6SDCTnZE8rFqNTWeVMom8sW7Dq3bcyT7/NRx0VKD0ryzuteTyCTfyY/+tgYt7UVxdtGhlcCLJDJX0ymehL50TvkfnecBoP/fkf5h9M5A6OIDQr1ZM0AoKKY4d4syKXQFaEV0vXeLW2bKx5PHwh0v/aS9poHmyLB8aiq4= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(3008032)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:KL1P15301MB0072; x-ms-traffictypediagnostic: KL1P15301MB0072: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(46150409022019)(96448707832919); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:KL1P15301MB0072; BCL:0; PCL:0; RULEID:; SRVR:KL1P15301MB0072; x-forefront-prvs: 0638FD5066 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(396003)(376002)(39380400002)(346002)(39860400002)(199004)(189003)(316002)(229853002)(486006)(33656002)(46003)(8936002)(6506007)(10290500003)(2906002)(81166006)(8676002)(81156014)(54906003)(76176011)(3280700002)(9686003)(11346002)(446003)(6116002)(186003)(68736007)(55016002)(22452003)(53936002)(476003)(3660700001)(4326008)(6246003)(107886003)(7696005)(305945005)(93886005)(8990500004)(74316002)(77096007)(2900100001)(86362001)(105586002)(86612001)(106356001)(102836004)(478600001)(25786009)(99286004)(10090500001)(14454004)(6436002)(5660300001)(6916009)(97736004)(7736002); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1P15301MB0072; H:KL1P15301MB0006.APCP153.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: JYOws2Gqgs+WkQMMhVbYdT8si6D3KQ6EXCkCVB3NntO/FZlqJj+7igQJ5xA1+fASo2ksSQC17cHvxaIqZO5MuwZLQxrYRRIkZ2p7aGm+GmBJUKX5hJDL46YsTxLqAAlxoBXYrvIw0PIBr3uhEggfT7/lThz1B0jPqtiiWFjZ01kJY+rpz918MRsAPlv0nOxFoZd+WzzREI6N00m5U1NY/+edTMIwyxlHSa1He43+A+36f6eZYsKVgYNGwevmq2wMnZXUxB6MQ6HHopAeThowHdFdEegZ5hs7BvMugaiYM1BAROsWa5HwUZGxWEysa/PZerGrIdMmwnU3kkOrlq5P205zZhIhXz8LXZwyIkdyHSa7hI34jLKKbhoI8Eso7UzLo+F1LkD98IqkFzT7mF00XONYgYsvrzJ0pYU5OwCjhzE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 7b043e69-4574-4b64-4a42-08d59f26df08 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b043e69-4574-4b64-4a42-08d59f26df08 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2018 21:06:03.7229 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1P15301MB0072 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Apr 2018 21:06:26 -0000 > From: Bruce Evans > Sent: Tuesday, April 10, 2018 13:09 > > Here the bug is that UP FreeBSD VM hangs on reboot or power-off, and > > I'm sure this recent patch (which was committed by Jeff on Mar 26) caus= ed > > this bug: > > r331561:Fix a bug introduced in r329612 that slowly invalidates all cle= an bufs. > > > > However, SMP VM with 2 or more CPUs doesn't hang on reboot/power-off > > according to our tests. >=20 > Actually, r329612 is what causes this bug. I already did the bisection > to find almost this bug a couple of weeks ago. The hang occurs on amd64 > with 4 CPUs but not on amd64 with 8 CPUs or i386 with 4 or 8 CPUS. I > just checked that it occurs on i386 with 1 CPU. All on the same machine. > But r329611 doesn't hang for any of these cases. So, it looks to me that: r329612 introduced a hang issue, so Jeff made r331= 561, trying to fix the issue, but it looks the issue is not completely fixed (at= least for me). I didn't test r329612. We noticed our amd64 VM (which has a single CPU) hung . The VM kernel was=20 built with yesterday's latest kernel code + the default GENERIC kernel conf= ig. However, using the same kernel binary, if we configure 2 or more CPUs to the VM, the VM doesn't hang on reboot. If I use the latest code but manually remove the changes made by r331561,=20 the hang issue with our single-CPU VM will go away. I hope the info is helpful. =20 > I still think there is an older bug, but now think it is related. I > only tested with SCHED_4BSD. For SCHED_4BSD, I suspect that the bug > is from pinning a thread to a CPU and then stopping that CPU. Pure > UP has no problems since pinning is null for it. SCHED_4BSD has especial= ly > special handing for SMP (a separate runq for each CPU. I have been > modifying > SCHED_4BSD and the separate queues mostly get in the way). >=20 > Bruce I always use the default GENERIC kernel options, so I guess I'm using SCHED= _4BSD(?).. Thanks, -- Dexuan