From nobody Sat Nov 27 17:49:39 2021 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6925618BC59A for ; Sat, 27 Nov 2021 17:49:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-20.consmr.mail.gq1.yahoo.com (sonic305-20.consmr.mail.gq1.yahoo.com [98.137.64.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4J1fJf1PqCz3tS2 for ; Sat, 27 Nov 2021 17:49:54 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638035387; bh=slkC98I3+ObhNWquRarEZsDTwzu+g34hBUvOC8BKTLw=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=MU2vNVXSrMzknA3jugAyf5wxC3ZwLk5XENfa3dBW2JG3CfjklbkgGNL7gEkmYFJWDu7YSs24nuRQLJUTEbYurJX0IB0j23Gnk2/ymx58Y5Osvlrr6lHK13HHXADRtnKT2Ky+KHyOvtQCNlls5J5i47PEB/b2VS7lOnQFqEKAiAYup/2vP/1viAnAX/LViv40ioVY+lEk3RIRgsevQlWhviaNS8dGd2ZSDO1Ydm76JHItkrdB76avzNriEhDEmeCN55fDvI5JiPxewfuz7O/tisZ5vU9tro+3TmSszLoRh9opMbCI9XsPJC2Er77YuYKk/HHMniIVxzQxpdnHsX6L5A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638035387; bh=2odp3STlsw2xFa2UIclnSHqeoD2rAGU5DxH5UPTBjDd=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=VhoJvzcQFYZdwXaWHKbx8T4FIwAt3hmcV6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OG5hpOJKtYGgZrVftka_5dHyCZ_.Xrq7wpmRJVV.WgrINYpvRTD3ojoRFF4kFTT000drJ.. a2ybWdoeP4rM6ExKpgDBdIynaPEeedvHLFN6hyKh00LElxuQarWBS55KutruvSvTjsIpf_f_P4nf CUB_.Uy32VSV921hO0UhBVk9YL8S4vTCvwrkmM6lTs1ld08cRGUEYDvRdrE0UP4Rkbi_6_TTTKxw xtjyma0v7ZkITkL6JVHP69HCmqCA27v9kEypygkMzjGL9Pa54NLfW8uU0iN.Juiqhz5qsghtsltu mPVy0yb1A5amYIwWu2uQg64Hke8HpwkejRQ6NRbPXBi9YkUeIOWdEB2cTOnTUHM6utxGBsnCy9VY 6MglHjpcBpZTPLKvNxaFnyc.LEX9K1qLODM0XPmFffXbXvZAAHs9fuiPvTuo_QaJA6lNGZU1hkuJ OjFNne2MAdNoWGC_i34j.y1exwlXNFNt.nCtQHa0IMeV52CACy6JU9cEhHOtb.CriWKv.g_y_xx7 AJv6eJbgpXHdKeTAhywLY X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Sat, 27 Nov 2021 17:49:47 +0000 Received: by kubenode542.mail-prod1.omega.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 6b516206b97909cd83620819b9d76e7e; Sat, 27 Nov 2021 17:49:42 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: main [so: 14]: contrib/llvm-project/libunwind/src/Unwind-EHABI.cpp:915 failure in armv7 context Message-Id: <07C4B8C4-4EB8-44C4-B627-1ABA8722AEB3@yahoo.com> Date: Sat, 27 Nov 2021 09:49:39 -0800 To: Free BSD , freebsd-current X-Mailer: Apple Mail (2.3654.120.0.1.13) References: <07C4B8C4-4EB8-44C4-B627-1ABA8722AEB3.ref@yahoo.com> X-Rspamd-Queue-Id: 4J1fJf1PqCz3tS2 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=MU2vNVXS; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.83 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-1.51 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.99)[0.990]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.83:from]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.83:from] Reply-To: marklmi@yahoo.com From: Mark Millard via freebsd-arm X-Original-From: Mark Millard X-ThisMailContainsUnwantedMimeParts: N In tracking down a armv7 build failure for some ports the fail during rustc, I managed to get a gdb backtrace for an example .core finally. This is based on not striping (no debug information). (rustc's build in armv7 contexts attempt links that fail for lack of a sufficient process address space.) The thing is that the .core file is generated during rustc itself attempting to do a backtrace for its internal failure. The gdb backtrace shows the top-of-call-stack (larger address) stack frames as being in FreeBSD code. The freeBSD builds involved are a non-debug builds but with debug information present. Note that the thread involved is not the main thread but one created via _pthread_create instead. Also note that the SIGSEGV happened at: /usr/main-src/contrib/llvm-project/libunwind/src/Unwind-EHABI.cpp:915 which looks like: 915 uint32_t value =3D *sp++; I could get the other source lines for the FreeBSD call frames if needed. gdb reports: Core was generated by `/usr/local/bin/rustc --crate-name tempfile = --edition=3D2018 /wrkdirs/usr/ports/dev'. Program terminated with signal SIGSEGV, Segmentation fault. Address not mapped to object. #0 _Unwind_VRS_Pop (context=3D0xbfff5b80, regclass=3D_UVRSC_CORE, = discriminator=3D18432, representation=3D_UVRSD_UINT32) at = /usr/main-src/contrib/llvm-project/libunwind/src/Unwind-EHABI.cpp:915 915 uint32_t value =3D *sp++; [Current thread is 1 (LWP 710038)] (gdb) bt #0 _Unwind_VRS_Pop (context=3D0xbfff5b80, regclass=3D_UVRSC_CORE, = discriminator=3D18432, representation=3D_UVRSD_UINT32) at = /usr/main-src/contrib/llvm-project/libunwind/src/Unwind-EHABI.cpp:915 #1 _Unwind_VRS_Interpret (context=3D0xbfff5b80, data=3D, = offset=3D4, len=3D4) at = /usr/main-src/contrib/llvm-project/libunwind/src/Unwind-EHABI.cpp:281 #2 0x400c83e0 in libunwind::UnwindCursor::stepWithEHABI (this=3D0xbfff5b80) at = /usr/main-src/contrib/llvm-project/libunwind/src/UnwindCursor.hpp:921 #3 libunwind::UnwindCursor::step (this=3D0xbfff5b80) at = /usr/main-src/contrib/llvm-project/libunwind/src/UnwindCursor.hpp:2094 #4 0x400c7134 in (anonymous namespace)::unwindOneFrame = (state=3D, ucbp=3D0xbfff59d8, context=3D0xbfff5b80) at = /usr/main-src/contrib/llvm-project/libunwind/src/Unwind-EHABI.cpp:190 #5 0x400c7708 in _Unwind_Backtrace (callback=3D0x47346bc0 = , = ref=3D0xbfff5d58) at = /usr/main-src/contrib/llvm-project/libunwind/src/UnwindLevel1-gcc-ext.c:15= 6 #6 0x47311b58 in std::backtrace::Backtrace::create () from = /usr/local/lib/libstd-21f5f79d0bba7291.so #7 0x47311ac8 in std::backtrace::Backtrace::force_capture () from = /usr/local/lib/libstd-21f5f79d0bba7291.so #8 0x46c61f28 in rustc_errors::Handler::delay_good_path_bug () from = /usr/local/lib/librustc_driver-a196dfc434d07325.so #9 0x46a33998 in = rustc_middle::ty::print::pretty::trimmed_def_paths::h696a2e73b4fe3316 () = from /usr/local/lib/librustc_driver-a196dfc434d07325.so . . . #42 0x401371ac in thread_start (curthread=3D0x40073a00) at = /usr/main-src/lib/libthr/thread/thr_create.c:292 #43 0x40136cdc in _pthread_create (thread=3D0xffffb0b8, attr=3D, start_routine=3D, arg=3D) at = /usr/main-src/lib/libthr/thread/thr_create.c:187 #44 0x40139a4c in _thr_umutex_unlock2 (mtx=3D0x0, id=3D11, defer=3D0x0) = at /usr/main-src/lib/libthr/thread/thr_umtx.h:160 #45 _thr_umutex_unlock (mtx=3D0x0, id=3D11) at = /usr/main-src/lib/libthr/thread/thr_umtx.h:183Backtrace stopped: Cannot = access memory at address 0x4 For reference: # uname -apKU FreeBSD CA72_16Gp_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #22 = main-n250972-319e9fc642a1-dirty: Tue Nov 23 12:25:36 PST 2021 = root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm6= 4.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1400042 1400042 # poudriere jail -jmain-CA7 -i Jail name: main-CA7 Jail version: 14.0-CURRENT Jail arch: arm.armv7 Jail method: null Jail mount: /usr/obj/DESTDIRs/main-CA7-poud Jail fs: =20 Jail updated: 2021-06-27 17:58:33 Jail pkgbase: disabled # uname -apKU FreeBSD CA72_16Gp_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #22 = main-n250972-319e9fc642a1-dirty: Tue Nov 23 12:25:36 PST 2021 = root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm6= 4.aarch64/sys/GENERIC-NODBG-CA72 arm armv7 1400042 1400042 The backtracking also fails for releng/13.0 (-p5) poudriere jail targeting armv7 but some details are different that make it more complicated to deal with. I've only gone after gathering and reporting evidence from the simpler context that gets the somewhat earlier failure. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)