From owner-freebsd-current@freebsd.org Tue Aug 22 12:35:03 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 B7C2ADE8266 for ; Tue, 22 Aug 2017 12:35:03 +0000 (UTC) (envelope-from kostikbel@gmail.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 9E4BA84359 for ; Tue, 22 Aug 2017 12:35:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 9D852DE8265; Tue, 22 Aug 2017 12:35:03 +0000 (UTC) Delivered-To: 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 9D10CDE8264 for ; Tue, 22 Aug 2017 12:35:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 44F8284358 for ; Tue, 22 Aug 2017 12:35:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v7MCYnfU010243 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 22 Aug 2017 15:34:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v7MCYnfU010243 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v7MCYn62010242; Tue, 22 Aug 2017 15:34:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 22 Aug 2017 15:34:49 +0300 From: Konstantin Belousov To: David Wolfskill , current@freebsd.org Subject: Re: SIGSEGV in /bin/sh after r322740 -> r322776 update Message-ID: <20170822123449.GD1700@kib.kiev.ua> References: <20170822114627.GC1130@albert.catwhisker.org> <20170822115923.GC1700@kib.kiev.ua> <20170822122836.GH1130@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170822122836.GH1130@albert.catwhisker.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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: Tue, 22 Aug 2017 12:35:03 -0000 On Tue, Aug 22, 2017 at 05:28:36AM -0700, David Wolfskill wrote: > On Tue, Aug 22, 2017 at 02:59:23PM +0300, Konstantin Belousov wrote: > > ... > > > lldb's notion of the backtrace was fairly non-useful: > > > g1-252(11.1-S)[7] lldb -c sh.core > > > (lldb) target create --core "sh.core" > > > Core file '/home/david/sh.core' (x86_64) was loaded. > > > (lldb) bt > > > * thread #1, name = 'sh', stop reason = signal SIGSEGV > > > * frame #0: 0x0000000800b6ee08 > > > frame #1: 0x0000000800000003 > > > (lldb) > > I am not sure how to get the interesting information with lldb, > > try gdb. > > freebeast(12.0-C)[11] gdb -c sh.core > GNU gdb (GDB) 8.0 [GDB v8.0 for FreeBSD] > ... > Type "apropos word" to search for commands related to "word". > [New LWP 100182] > Core was generated by `sh -c cc --version || echo 0.0.0'. > Program terminated with signal SIGSEGV, Segmentation fault. > #0 0x0000000800b6ee08 in ?? () > (gdb) bt > #0 0x0000000800b6ee08 in ?? () > #1 0x0000000000000000 in ?? () > (gdb) > > > Disassemble the code around the faulting %rip. > > Sorry; I haven't done very much with any debugger other than the > one in Perl in ... decades. Checking the gdb docs online, the only > reference to "disassembly" reads "23.3.3.22 Disassembly In Guile", > which seems rather far off the mark. $ gdb /bin/sh sh.core (gdb) bt (gdb) info registers (gdb) disassemble > > I'm afraid I'll need a bit more detail. > > >Also provide the first > > 100 lines of verbose dmesg of the boot on the affected machine. > > Well, a copy of the complete (verbose) dmesg.boot from *yesterday* > (r322740) is at > > > I grabbed a copy of the dmesg.boot for today, and have attached > "head -100" from it to this message. Thank you. > > > Is it only /bin/sh which faults ? > > Well, /bin/csh doesn't seem to be giving me any trouble as I use > it interactively. I don't recall seeing evidence that anything > that isn't invoking /bin/sh is having a problem; on the other hand, > there is a lot of the system I don't normally use. But things like > "svn info" work, as does "svnlite info" (big difference there is > that former is a port, built under stable/11, while the latter would > be part of base). > > > Does system boot into multiuser ? > > Yes; it does. But checking /var/log/messages, I see: Ok, can you rebuild kernel and libc from scratch ? I.e. remove your object directories.