From owner-freebsd-arm@freebsd.org Mon Mar 23 21:26:39 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 73F52270037 for ; Mon, 23 Mar 2020 21:26:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-21.consmr.mail.gq1.yahoo.com (sonic310-21.consmr.mail.gq1.yahoo.com [98.137.69.147]) (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 48mSB46KF9z4nrL for ; Mon, 23 Mar 2020 21:26:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: Zzsxy4QVM1kUQikPqaQYLA_zk_bM238VGEwM_DOqa5rR9kts1lP8IQdTe6ZsVT8 nPur7sjusySi2fgyVPsdY1VyoBGmzAJ4LLQsqXJm.jSjqZKiqawfu9ApDLMbA5dK4wTIFIi90.bo LIFe3Qgv5Nmlb.dyitHftytjkP9w0fdyBCJR__0Mhi5nP.cGziPBzhf37IqON0itfnOWB6t0U5Uw vBOY0OUnQfBKab2Whg1ZgrmRzel_sh_lMhPA5DxHDrjWHnrbkE0w45lQ7GB3Vsnv_HnEBq2pCdlz par9x8ezjCpMd0sp5CIR1ZfZEKEqNczAWwFVWhCFXvo8FOSyEZri547ytcq_htbjh7qkVExPjRIP ICmtrHcF9wO9UOXF8hhS7G0bqX8XMKenfpb9kcn9d0kbNE1mRwqRwZ3deURtCzxobm0mZInZcSes xanmz4gKt.86l4z7sKmzB9R.0Sqiw1N.A6ZFyljAI8DL2GsqwvuzekJ8xZcOx5yBXpcJgy9VVm99 Ze72vxBi_nh2lsWMCC1d5vp0NXr4qtGBJyGySG0cQ8L4qO.1dDJnVrkl2g0qvR3KDyLyqp3CpiJB wmQUZ.M_jqeK5E4imlFcFg6Gghb2UNvwdgxNpDwbgdlPdCYob_alhBbPXhSCBcuj3DUqQ_J_5lqV KVszGvgzRDXCPgJH9hfLFhGYSPGkH6Lj7pk6ZBYmldcq8qgsRbAcoClsQlxnN_FDMvxBl1VamU2y Psq5SHtSt8ICaD1HpZAhS2_ibizavJXnfqUtzyhKQS4G4q9g6T.D3f.YdWYz7wnn700gJ3P17niT xkhKo6SILlYAoqoKuBFPSM6fdjXMPAtl49I.ENe_QCdGJBjFKPC24dznwapBxg_I9kKixGKVVnGB P0iGvk.HxEUzO5iLt4I4KWWx9iVKZBnY4fngbOGaZGxL5XzafRlDOgrlhTdCf77msEybeYONd494 V712hUOhsJqL9y9Y.4PVW.h4gzh25NK5HAYdbutYHjTQPgUqMmGLEbxP2jT2q53SSNCAF3CMKooO 73jTXs_dSwf9ldQT5o7lY6Zwlp.Y9oHB3sWOVYoU6m.YWIUxlaJGrx0DtEJDDQpH_JieXuTBMjwN QeNA9JgqN_rkJq8KU8.x6Om_O1UXWR2QJbW0K.TiA1YBtIKuPKShGTse8DjIh8vbWU0kwPbXPjKU KcsDOoOlLvwjjoH7zHFowowxFJde5d2eubMSmO_K525z1LuaN1.7NNmcaTHUow4a3gAJVsonAIBn DedZSzmqImGYmB7eyi4LnUcK3k3LjaAhGWKlvTZ38aI8a6zpGMyGUrn8vnZ5xu2IDWVdrJKWjMDz OV5vx6i9_vdLGLLieUQwMZ0pivK21NGGQYFZbRjXRPKCsEO21uONmNHb_p0XT0xKJmhpC8HMKuye jxEJ8iwpnURpG9Vfp9Rhppm8ARcZJ8Q-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Mon, 23 Mar 2020 21:26:33 +0000 Received: by smtp424.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID ef3749e4e6381ba8706626ddf7cbee4e; Mon, 23 Mar 2020 21:26:31 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: amd64->armv7 cross-build failure for security/ca_root_nss: It failed in memcpy () from /libexec/ld-elf.so.1 From: Mark Millard In-Reply-To: <1EC37157-CBA2-4334-92C1-E845F63DB5CA@yahoo.com> Date: Mon, 23 Mar 2020 14:26:30 -0700 Cc: FreeBSD ports Content-Transfer-Encoding: quoted-printable Message-Id: References: <1EC37157-CBA2-4334-92C1-E845F63DB5CA@yahoo.com> To: freebsd-arm , FreeBSD Hackers X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48mSB46KF9z4nrL X-Spamd-Bar: + X-Spamd-Result: default: False [1.30 / 15.00]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (3.27), ipnet: 98.137.64.0/21(0.82), asn: 36647(0.65), country: US(-0.05)]; NEURAL_SPAM_MEDIUM(0.88)[0.885,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.91)[0.914,0]; RCVD_IN_DNSWL_NONE(0.00)[147.69.137.98.list.dnswl.org : 127.0.5.0]; RWL_MAILSPIKE_POSSIBLE(0.00)[147.69.137.98.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 21:26:39 -0000 On 2020-Mar-16, at 21:48, Mark Millard wrote: > Context: head -r358966 attempting to update ports > to -r528535 . Also, 50+ ports built just fine > but the below has been repeatable in my context. >=20 > The original failure was under devel/poudriere-devel (with > nxb-bin/ materials used). But part of the below is from > exploring with various steps in a handier context. >=20 > The original error message was: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D> Building for ca_root_nss-3.51 > ## Untrusted certificates omitted from this bundle: 2 > openssl x509 failed with exit code 11 at = /wrkdirs/usr/ports/security/ca_root_nss/work/MAca-bundle.pl line 78. > *** Error code 255 >=20 > The original source that reported the message was: >=20 > sub printcert_info($$) > { > my (undef, $certdata) =3D @_; > return unless $certdata; > open(OUT, "|openssl x509 -text -inform DER -fingerprint") > || die "could not pipe to openssl x509"; > print OUT $certdata; > close(OUT) or die "openssl x509 failed with exit code $?"; > } >=20 > The die produced: >=20 > -rw-r--r-- 1 root wheel 7909376 Mar 17 03:18:04 2020 = qemu_openssl.core >=20 > gdb reported for it: >=20 > Core was generated by `openssl'. > Program terminated with signal SIGSEGV, Segmentation fault. > #0 0xf501adb4 in memcpy () from /libexec/ld-elf.so.1 >=20 > and: >=20 > (gdb) info threads > Id Target Id Frame=20 > * 1 LWP 1592 "x509" 0xf501adb4 in memcpy () from = /libexec/ld-elf.so.1 >=20 > and: >=20 > gdb) bt > #0 0xf501adb4 in memcpy () from /libexec/ld-elf.so.1 > #1 0xf5004cd0 in do_copy_relocations () from /libexec/ld-elf.so.1 >=20 > and (from a disass): >=20 > =3D> 0xf501adb4 <+436>: strd r4, [r3], #8 >=20 > (It was not clear what code context to supply so > I stuck to showing the instruction with the register > used such that SIGSEGV could result from the use: r3 .) >=20 > Finally the registers were listed as holding: >=20 > (gdb) info reg > r0 0xf4f5d57c 4109751676 > r1 0x14 20 > r2 0x93000 602112 > r3 0x1 1 > r4 0x10 16 > r5 0x9fffdfa4 2684346276 > r6 0xf4fe2404 4110296068 > r7 0xf4fe2004 4110295044 > r8 0x93000 602112 > r9 0x93000 602112 > r10 0x9fffdfe0 2684346336 > r11 0x0 0 > r12 0x9fffdf80 2684346240 > sp 0x9fffdf80 0x9fffdf80 > lr 0xf5004cd0 4110437584 > pc 0xf501adb4 0xf501adb4 > cpsr 0x60000010 1610612752 >=20 > Yep: r3=3D=3D1 would do it. >=20 >=20 > Note: I've otherwise ignored here seeing lots of: >=20 > qemu: unsupported syscall: 574 (calling anyway) >=20 > notices while doing things for extracting > this information. >=20 >=20 > I'll note that I had no such SIGSEGV when > ca_root_nss 3.50 built back at OSVERSION=3D1300077 > on 2020-Feb-16: it built and worked fine back > then. >=20 >=20 >=20 > I'm not sure when I'll have time to do more with this > or if I will again just abandon qemu-user-static for > a time. (Insufficient time to allocate to do more?) > Hopefully the basic information is useful to someone > at some point. >=20 > I'm not claiming that I know qemu-user-static is the > problem, or openssl, or whatever. Just that the > combination is broken in my context. >=20 > Having security/ca_root_nss blocked, blocks > cross-building lots of other things, including > devel/llvm10 . Using: # poudriere bulk -j FBSDFSSDjailArmV7 -i -w ports-mgmt/portmaster to allow trying things from inside the poudriere build environment, I tried: # openssl=20 qemu: uncaught target signal 11 (Segmentation fault) - core dumped # file `which openssl` /usr/bin/openssl: ELF 32-bit LSB executable, ARM, EABI5 version 1 = (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for = FreeBSD 13.0 (1300084), FreeBSD-style, not stripped The backtrace was again memcpy and do_copy_relocations. (So "x509" had nothing to do with the inability to run the original failed command.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)