From owner-freebsd-current@freebsd.org Mon Nov 12 10:52:30 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 232BB1102764 for ; Mon, 12 Nov 2018 10:52:30 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from mail.madpilot.net (vogon.madpilot.net [159.69.1.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39BFD6A67A for ; Mon, 12 Nov 2018 10:52:29 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from mail (mail [192.168.254.3]) by mail.madpilot.net (Postfix) with ESMTP id 42tndl5vMDz6dPN; Mon, 12 Nov 2018 11:52:27 +0100 (CET) Received: from mail.madpilot.net ([192.168.254.3]) by mail (mail.madpilot.net [192.168.254.3]) (amavisd-new, port 10024) with ESMTP id iieaC1rHejat; Mon, 12 Nov 2018 11:52:25 +0100 (CET) Received: from marvin.madpilot.net (host109-128-dynamic.16-87-r.retail.telecomitalia.it [87.16.128.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.madpilot.net (Postfix) with ESMTPSA; Mon, 12 Nov 2018 11:52:25 +0100 (CET) Subject: Re: 13.0 failing to boot multiuser on one PC due to system utilities crashing during rc scipt To: Konstantin Belousov Cc: freebsd-current@freebsd.org References: <62bdb5ff-4d68-cf52-4dd5-f0a3cfa1c788@madpilot.net> <791e3488-b838-5cfd-8dca-8db8c74167a0@madpilot.net> <20181110230744.GN2378@kib.kiev.ua> <5176caee-126f-2709-d09a-0dcf5190e319@madpilot.net> <20181111211434.GS2378@kib.kiev.ua> From: Guido Falsi Openpgp: preference=signencrypt Autocrypt: addr=mad@madpilot.net; prefer-encrypt=mutual; keydata= xsBNBE+G+l0BCADi/WBQ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OEQ fOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB2i6A /xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45qfyh MiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0xpNi UilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWAdlKC NTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanCYrAg +8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNRgow3 kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCkX/qw EVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7FjfrV +dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxAlZ/7 i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+lQMZ 9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8LkQd rQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== Message-ID: Date: Mon, 12 Nov 2018 11:52:25 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181111211434.GS2378@kib.kiev.ua> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 39BFD6A67A X-Spamd-Result: default: False [-6.16 / 200.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[madpilot.net]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: eddie.gfratio.it]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.92)[-0.924,0]; IP_SCORE(-2.92)[ip: (-9.53), ipnet: 159.69.0.0/16(-2.15), asn: 24940(-2.92), country: DE(-0.01)]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[109.128.16.87.zen.spamhaus.org : 127.0.0.10] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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, 12 Nov 2018 10:52:30 -0000 On 11/11/18 22:14, Konstantin Belousov wrote: > On Sun, Nov 11, 2018 at 08:44:24PM +0100, Guido Falsi wrote: >> On 11/11/18 11:10, Guido Falsi wrote: >>> On 11/11/18 00:07, Konstantin Belousov wrote: >> I performed these tests. I downloaded the 12.0-BETA4 and 11.2 >> installation images and replaced the kernels in there. This was faster >> than working with jails on a crippled system. >> >> r339895 kernel on 11.2-RELEASE causes fsck (launched by rc) to dump core >> and this stops the boot procedure. >> >> r339894 kernel on 12.0-BETA4 works fine. > > Ok, let try to find some reason. The requested files are accessible here: https://www.madpilot.net/cloud/s/Q9DAGrntnneomSs > > - When you build your kernels, you do not use any cpu-specific optimization > flags, do you ? More, you follow the standard build procedure and your > make.conf and src.conf are empty, right ? At the start I did have some optimizations, but I disabled them all. I'm building with 'make -j buildkernel'. I usually enable META_MODE, but I also disabled that and even wiped out the contents of /usr/obj multiple times to make sure I was getting a clean build. > - Do you preload a microcode update from the loader ? At present no, I load it later via rc scripts. This is something I want to test though, I'll report later if it changes anything. > - Show the output of sysctl vm.pmap. > - Show verbose dmesg from the boot of the problematic kernel. > You posted non-verbose dmesg for 12.0-BETA4. Posted at the link above. > - Enter ddb, when booted the problematic kernel. Do > db> x/x cpu_stdext_feature cpu_stdext_feature: 281 > db> x/x cpu_stdext_feature+4 cpu_stdext_feature2: 0 > - From the same ddb session, disassemble e.g. cpu_set_user_tls(). > You could paste me whole disassembling, but really I want to know > the single line with the call to set_pcb_flagsXXXX, it should be > either set_pcb_flags_raw or set_pcb_flags_fsgsbase. To disassemble > in ddb, do > db> x/i cpu_set_user_tls > and then press more to get next and next instructions. > (I want the disassembly from ddb and not from gdb/kgdb). cpu_set_user_tls+0x2d: call set_pcb_flags_raw The full ddb session capture is posted at the link above. > - Try the following patch. > The patch does produce a working kernel. In fact I'm running that kernel now. I've also added the broken kernel with it's kernel.debug file as a txz archive in the URL posted above. Hope this helps. Thanks for your time and effort! -- Guido Falsi