From owner-freebsd-hackers@freebsd.org Sat Oct 27 05:45:52 2018 Return-Path: Delivered-To: freebsd-hackers@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 72DBB10DA474 for ; Sat, 27 Oct 2018 05:45:52 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-30.consmr.mail.ne1.yahoo.com (sonic301-30.consmr.mail.ne1.yahoo.com [66.163.184.199]) (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 03A6B7F1CA for ; Sat, 27 Oct 2018 05:45:51 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: eAgNwj0VM1lV.s3oma3eYiRCYQUgZBrXptdJggPrgrWrtxYriJkJ.qE9V1GVUTF 6yFJdp1Sm01EvcWJagoLQxvkBgFyAxr5vp0coTSkrU8esC7lDIR.LmyC1qS7oFzJ838nll0ieSAh 93tOlFVYm9x6J_56n6Bh7JgzRqA6SLZUQ8cRmucnp1aHe4ZLjD2QqQFp7Ecv2ytUet56oRKCjPW0 BaJ94utXJZVnuZfy5wLBu_Z9DKXjbyYaU1fG9Tq4bM_1Myf3xm4a2w9tRKl8X2EbdR1_.Vn0vaDd wWhCC4B3.wwpImNe8bxCbwYfVrYEUPQOMK5YAOTR6nQyT3Dk3BGGSaoSXXKMYw69SaOPhOnRz3un xDr1nizhRZE99Jxu4XnLgIrksePXEg3F2VqxDL2cF1y8YzVZlxqE5g6BZydLPAULeMxrZa6f_Ukx OvkTlSirfpsF9VNwlUkuSdioaPOQaQmOuyqPupJm7WEDnZDKzaWSBIt8ftYLCYQf_LgG7S6Rk5vb yjqz6w5y7zi1LbNDxJrfFoqc.svmkjm97ppfJwmvKmkBzGFOgm4jxuQBamY6b0JNXBVsnge_NlT7 4S40MR7.Ot0MohBYRzgN__us1mDeLAbYp.iBVt5Orz963rqHj.7CtLPDjp21JHqRSvOLgcy0SYyy xZ3kJd.XshDFErueOsSKvResL34b58N9IiRRJaqBs0KsylQnGQGoysb8wTy3.nTvfu6_A.dZ6dQd JlBcuueul7kJfIdycOz.5zrGuGMjyLjJgOvl5xgu0ITTOkqU1cVuh4uxYodDVwcBl3XgDswk9DER 0FBNP1qaooGSDnYV9H9dH.mHrSoJSOhIBGP7q2hodOSY3gEVWatPEPM1Ifx33jzPYtcqgbYUpDae 5U0lar7peSOoltCCtEFdFEYDYsFScF3D1HeQFk9J2z5mQWNrnhaWEvyFwUznHuOzdbo9sW750K.b S_X6D.BdsvdeIesgxLt2_xhRsuESYrC9_7XuzcUHCVsL2SexYIKg99uT.sWKMw2CSiv6iIaXwa1w 63LGTLIFLyW2taW23ulzZQxb6Ts02gX35Z1Q9fAnykbCPkOkZ Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Sat, 27 Oct 2018 05:45:44 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.25]) ([76.115.7.162]) by smtp405.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 9d2efef407054cbd30f5dde6666a65ef; Sat, 27 Oct 2018 05:35:35 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: head -r339076 amd64 -> armv7 port cross build attempt with native tools involved: hangs between a cc (wait) and its child ld (uwait) Date: Fri, 26 Oct 2018 22:35:33 -0700 References: <33C58480-1E76-4748-83B4-CB39FAD8584A@yahoo.com> To: FreeBSD Toolchain , freeBSD In-Reply-To: <33C58480-1E76-4748-83B4-CB39FAD8584A@yahoo.com> Message-Id: <78DBB85A-44C5-42CF-88F2-79E75E93CF33@yahoo.com> X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2018 05:45:52 -0000 [Attaching to the ld process with gdb and detaching let things continue.] On 2018-Oct-26, at 8:42 PM, Mark Millard wrote: > In trying to amd64 -> armv7 cross build ports via poudriere-devel > use with native cross tools involved (and UFS, not ZFS), I'm > getting about 117 ports that built and then one that ends up stuck > in wait/uwait . ^C to poudriere and restarting it repeats the > stuck behavior at the same point (a cc and its ld), for example: >=20 >=20 > [00:02:51] [01] [00:00:00] Building print/texinfo | texinfo-6.5,1 >=20 > ps output extraction (blank lines added for each of > scanning): >=20 > UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME = COMMAND > . . . > 0 42312 32181 0 52 0 12904 3904 select I 1 0:00.02 sh: = poudriere[FBSDFSSDjailArmV7-default][01]: build_pkg (texinfo-6.5,1) (sh) > 0 42974 42312 0 52 0 12904 3900 wait I 1 0:00.00 sh: = poudriere[FBSDFSSDjailArmV7-default][01]: build_pkg (texinfo-6.5,1) (sh) > 0 42975 42974 0 52 0 10408 1840 wait IJ 1 0:00.01 = /usr/bin/make -C /usr/ports/print/texinfo configure > 0 43077 42975 0 52 0 10252 1792 wait IJ 1 0:00.00 /bin/sh = -e -c (cd /wrkdirs/usr/ports/print/texinfo/work/texinfo-6.5 && = _LATE_CONFIGURE_ARGS=3D"" ; if [ -z "" ] && ./configure --help=20 > 0 43375 43077 0 52 0 11164 2392 wait IJ 1 0:00.19 /bin/sh = ./configure --enable-nls --prefix=3D/usr/local --localstatedir=3D/var = --mandir=3D/usr/local/man --disable-silent-rules --infodir=3D/usr > 0 46850 43375 0 52 0 11164 2388 wait IJ 1 0:00.00 /bin/sh = ./configure --enable-nls --prefix=3D/usr/local --localstatedir=3D/var = --mandir=3D/usr/local/man --disable-silent-rules --infodir=3D/usr > 0 46857 46850 0 52 0 11080 2060 wait IJ 1 0:00.04 /bin/sh = ./configure --disable-option-checking --prefix=3D/usr/local --enable-nls = --localstatedir=3D/var --mandir=3D/usr/local/man --disable-s >=20 > 0 47796 46857 0 52 0 113840 26184 wait IJ 1 0:00.15 = /usr/local/bin/qemu-arm-static /usr/bin/cc -o conftest -O2 -pipe = -mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -mcpu=3Dcortex-a= >=20 > 0 47801 47796 0 52 0 285300 39672 uwait IJ 1 0:00.22 = qemu-arm-static -L /usr/gnemul/qemu-arm /usr/bin/ld --eh-frame-hdr = -dynamic-linker /libexec/ld-elf.so.1 --hash-style=3Dboth --enable-new- >=20 > So the "/usr/local/bin/qemu-arm-static /usr/bin/cc . . ." > creates the child "qemu-arm-static -L /usr/gnemul/qemu-arm /usr/bin/ld = . . ." > process and the two get hung up. Letting it sit for long periods does > not let it progress. >=20 > The full commands are (note the "-pipe" vs. the = "/tmp/conftest-6c0832.o"): >=20 > /usr/local/bin/qemu-arm-static /usr/bin/cc -o conftest -O2 -pipe = -mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing = -mcpu=3Dcortex-a7 -DLIBICONV_PLUG conftest.c >=20 > and: >=20 > qemu-arm-static -L /usr/gnemul/qemu-arm /usr/bin/ld --eh-frame-hdr = -dynamic-linker /libexec/ld-elf.so.1 --hash-style=3Dboth = --enable-new-dtags -o conftest /usr/lib/crt1.o /usr/lib/crti.o = /usr/lib/crtbegin.o -L/usr/lib /tmp/conftest-6c0832.o -lgcc --as-needed = -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed = /usr/lib/crtend.o /usr/lib/crtn.o >=20 > For reference for /tmp/conftest-6c0832.o : >=20 > # ls -lTd = /usr/local/poudriere/data/.m/FBSDFSSDjailArmV7-default/01/tmp/conftest-6c0= 832.o > -rw-r--r-- 1 root wheel 4204 Oct 26 17:33:13 2018 = /usr/local/poudriere/data/.m/FBSDFSSDjailArmV7-default/01/tmp/conftest-6c0= 832.o >=20 > (I'm not using tmpfs or the like at all.) >=20 >=20 > The context is based on head -r339076 an is on a > Ryzen Threadripper 1950X system, natively booted > (not Hyper-V). (I've not tried under Hyper-V yet.) >=20 > Note: I have built ports similarly before --but the > last time was back in March-May sometime. >=20 > # poudriere jail -jFBSDFSSDjailArmV7 -i > Jail name: FBSDFSSDjailArmV7 > Jail version: 12.0-ALPHA8 > Jail arch: arm.armv7 > Jail method: null > Jail mount: /usr/obj/DESTDIRs/clang-armv7-installworld-poud > Jail fs: =20 > Jail updated: 2018-10-26 16:42:55 > Tree name: default > Tree method: null > Status: parallel_build: > Building started: 2018-10-26 17:29:36 > Elapsed time: 02:47:50 > Packages built: 0 > Packages failed: 0 > Packages ignored: 0 > Packages skipped: 0 > Packages total: 84 > Packages left: 84 >=20 > # poudriere ports -l > PORTSTREE METHOD TIMESTAMP PATH > default null 2017-08-14 21:07:05 /usr/ports >=20 >=20 > I have yet to think of a way to look into this or to work around > it. But my long running build on an Orange Pi Plus 2nd Edition > has finished so I'll update from that for now. I tried again and when it hung up I used gdb to attach to the ld process and later to detach: # gdb `which qemu-arm-static` . . . (gdb) attach 18703 Attaching to program: /usr/local/bin/qemu-arm-static, process 18703 Couldn't get registers: Device busy. . . . (gdb) bt #0 _umtx_op () at _umtx_op.S:3 #1 0x0000000060050cd4 in _umtx_wait_uint_private (where=3D0x0, = addr=3D, target_val=3D, tsz=3D, t=3D) at = /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-495fb3a/b= sd-user/freebsd/os-thread.c:258 #2 freebsd_lock_umutex (target_addr=3D4102556064, id=3D100867, ts=3D0x0, = mode=3D) at = /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-495fb3a/b= sd-user/freebsd/os-thread.c:890 #3 0x000000006004a808 in do_freebsd__umtx_op (obj=3D4102556064, = op=3D, val=3D0, uaddr=3D0, target_time=3D0) at = /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-495fb3a/b= sd-user/freebsd/os-thread.h:359 #4 0x00000000600414d5 in do_freebsd_syscall (cpu_env=3D0x8607a4c58, = num=3D454, arg1=3D, arg2=3D, = arg3=3D, arg4=3D0, arg5=3D0, arg6=3D-185272152, arg7=3D0, = arg8=3D0) at = /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-495fb3a/b= sd-user/syscall.c:1364 #5 0x0000000060038d03 in target_cpu_loop (env=3D0x8607a4c58) at = /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-495fb3a/b= sd-user/arm/target_arch_cpu.h:207 #6 0x00000000600386a9 in cpu_loop (env=3D0xf48809bc) at = /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-495fb3a/b= sd-user/main.c:121 #7 0x0000000060039922 in main (argc=3D-10608, argv=3D0x7fffffffd1d8) at = /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-495fb3a/b= sd-user/main.c:513 (gdb) detach Detaching from program: /usr/local/bin/qemu-arm-static, process 18703 Things started back up from there. We will see if it hangs up again. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)