From owner-svn-src-head@freebsd.org Sat Nov 3 23:46:03 2018 Return-Path: Delivered-To: svn-src-head@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 ACA3910ECA74; Sat, 3 Nov 2018 23:46: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 E98A3713B0; Sat, 3 Nov 2018 23:46:02 +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 wA3Njpki067743 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 4 Nov 2018 01:45:54 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua wA3Njpki067743 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id wA3NjpQa067742; Sun, 4 Nov 2018 01:45:51 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 4 Nov 2018 01:45:51 +0200 From: Konstantin Belousov To: Charlie Li Cc: Brooks Davis , svn-src-head@freebsd.org, toolchain@freebsd.org, current@freebsd.org Subject: Re: svn commit: r339898 - head/lib/libc/amd64/sys Message-ID: <20181103234551.GX5335@kib.kiev.ua> References: <201810300011.w9U0BUui038857@repo.freebsd.org> <20181101160406.GA60233__23941.7825396687$1541088368$gmane$org@spindle.one-eyed-alien.net> <20181103152936.GQ5335@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: E98A3713B0 X-Spamd-Result: default: False [-0.83 / 200.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.80)[-0.804,0]; IP_SCORE(-0.02)[country: US(-0.08)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_TLS_LAST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Nov 2018 23:46:03 -0000 On Sat, Nov 03, 2018 at 06:59:02PM -0400, Charlie Li wrote: > On 03/11/2018 11:29, Konstantin Belousov wrote: > > Some minimal amount of facts instead of guesses would be much more useful. > > > Yeah, being sleep deprived and hurried (on my end) certainly doesn't help. > > What is the instruction which faulted ? Disassemble the text at 0x2f5664. > > Regardless of what is the instruction, show either the output from > > 'x86info -f' on the machine, or cpu identification lines from the > > _verbose_ boot dmesg. > > > It appears that 0x2f5664 does not exist: Or rather, it is a middle of the valid instruction. Next frame looks like it is process_irelocs(), if trusting the line numbers. So most likely it is something related to calling wrong relocator function, if anything. Perhaps you could try to trace the things manually, doing single-stepping of the startup code in debugger. There should be very modest amount of the irelocs, perhaps only one, and see where things go off the way. Might be try to vary the clang version, we know that this work with 6.0.1, and according to your report, breaks with 7.0. Try clang trunk ? > > Disassembly of section .init: > > 00000000002f565c <_init>: > 2f565c: 48 83 ec 08 sub $0x8,%rsp > 2f5660: e8 fb 3c f3 ff callq 229360 > 2f5665: e8 b6 ff ff ff callq 2f5620 > <__do_global_ctors_aux> > 2f566a: 48 83 c4 08 add $0x8,%rsp > 2f566e: c3 retq > > CPU ident: > > CPU: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz (2394.52-MHz K8-class CPU) > Origin="GenuineIntel" Id=0x306d4 Family=0x6 Model=0x3d Stepping=4 > > Features=0xbfebfbff > > Features2=0x7ffafbbf > AMD Features=0x2c100800 > AMD Features2=0x121 > Structured Extended > Features=0x21c27ab > Structured Extended Features3=0x9c000000 > XSAVE Features=0x1 > VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID > TSC: P-state invariant, performance statistics > > make is statically linked, do dynamically linked program fault ? > > > After some more checks, only the statically linked programs crash. > > -- > Charlie Li > Can't think of a witty .sigline today… > > (This email address is for mailing list use only; replace local-part > with vishwin for off-list communication) >