From owner-freebsd-emulation@freebsd.org Thu Apr 1 13:25:42 2021 Return-Path: Delivered-To: freebsd-emulation@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 D20805CE1D8 for ; Thu, 1 Apr 2021 13:25:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4FB3pZ4w1Yz3nMD for ; Thu, 1 Apr 2021 13:25:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id A69C75CE58A; Thu, 1 Apr 2021 13:25:42 +0000 (UTC) Delivered-To: emulation@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 A64A95CE43D for ; Thu, 1 Apr 2021 13:25:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FB3pZ4935z3nNb for ; Thu, 1 Apr 2021 13:25:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 813285B26 for ; Thu, 1 Apr 2021 13:25:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 131DPg5Y003164 for ; Thu, 1 Apr 2021 13:25:42 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 131DPgRY003163 for emulation@FreeBSD.org; Thu, 1 Apr 2021 13:25:42 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: emulation@FreeBSD.org Subject: [Bug 254694] emulators/qemu-user-static: no progress when building lang/rust Date: Thu, 01 Apr 2021 13:25:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: d8zNeCFG@aon.at X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2021 13:25:42 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254694 Bug ID: 254694 Summary: emulators/qemu-user-static: no progress when building lang/rust Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: d8zNeCFG@aon.at CC: emulation@FreeBSD.org, rust@FreeBSD.org CC: emulation@FreeBSD.org, rust@FreeBSD.org Created attachment 223747 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D223747&action= =3Dedit pstree output when 0% CPU hang occurs Introduction: In this issue, lang/rust shall be compiled for armv6; the exa= ct same environment is used both with an emulation provided by qemu-user-static and natively; when using the emulation the build process eventually hangs w= ith 0% CPU, whereas natively it always proceeds. Emulation is desirable because= it is much faster than the armv6 machine. Scenario: - FreeBSD main at 51dfae383bf6298af9e6d816a78b92b6f34d68be (used in all installations in the following lines, regardless of armv6 or amd64) - iSCSI-exported disk ("disk925") carrying a complete FreeBSD armv6 installation - Raspberry Pi B+ ("rpi-b") carrying a complete FreeBSD armv6 installation (built using "make release") - bhyve amd64 virtual machine ("v903") - The goal is to update the armv6 ports using portmaster; amongst them, lang/rust needs to be built - Running v903 as a bhyve client under FreeBSD 12.2 - In v903, emulators/qemu-user-static is available, and /etc/rc.conf contai= ns "qemu_user_static_enable=3D"YES"" - Attaching disk925 in v903; mounting it in /d/925s2a, mounting the special filesystems underneath (/dev, /dev/fd, /proc, /tmp) - /usr/ports is NFS-exported from another host and mounted in v903 both in /net/... and in /d/925s2a/net/... using autofs (most likely not important = to this issue) - In v903, issuing "chroot /d/925s2a" - This opens a qemu-emulated zsh - Issue "cd /usr/ports/lang/rust" - Issue "TMPDIR=3D/usr/tmp make" (the standard TMPDIR=3D/tmp is too small; = most likely not relevant to this issue) Result: - After compiling for an extended period of time progress stops and the qemu processes just sit there idle. - It seems that this mostly happens at the linking stage of rust libraries. - Example: Here is the currently visible output, with 0% CPU load: Compiling rustc-main v0.0.0 (/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.51.0-src/= compiler/rustc) Running `/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.51.0-src/= build/bootstrap/debug/rustc --crate-name rustc_main --edition=3D2018 compiler/rustc/src/main.rs --error-format=3Djson --json=3Ddiagnostic-rendered-ansi --crate-type bin --emit=3Ddep-info,link -C opt-level=3D3 -C embed-bitcode=3Dno -C debuginfo= =3D0 --cfg 'feature=3D"llvm"' --cfg 'feature=3D"max_level_info"' -C metadata=3D33c78ee= c63c05f4e -C extra-filename=3D-33c78eec63c05f4e --out-dir /usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.51.0-src/b= uild/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-freebsd/release/deps --target armv6-unknown-freebsd -C linker=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/cc-wrappe= r -L dependency=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc= -1.51.0-src/build/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-freebsd/= release/deps -L dependency=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc= -1.51.0-src/build/armv6-unknown-freebsd/stage1-rustc/release/deps --extern rustc_codegen_ssa=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/wor= k/rustc-1.51.0-src/build/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-f= reebsd/release/deps/librustc_codegen_ssa-0891b87bc3d4da8f.rlib --extern rustc_driver=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rus= tc-1.51.0-src/build/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-freebs= d/release/deps/librustc_driver-623729bd2d57ce51.so -Zmacro-backtrace '-Clink-args=3D-Wl,-rpath,$ORIGIN/../lib' -Ztls-model=3Dinitial-exec -Zunstable-options '-Wrustc::internal' -Cprefer-dynamic -Z binary-dep-depinfo -L native=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.5= 1.0-src/build/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-freebsd/rele= ase/build/psm-fdd3708a2d632057/out -L native=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.5= 1.0-src/build/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-freebsd/rele= ase/build/rustc_llvm-6f28977a172d46d4/out -L native=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.5= 1.0-src/build/armv6-unknown-freebsd/llvm/build/lib` rustc command: "LD_LIBRARY_PATH"=3D"/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/wo= rk/rustc-1.51.0-src/build/armv6-unknown-freebsd/stage1/lib:/usr/tmp/net/hal= /z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.51.0-src/build/armv6-unkno= wn-freebsd/stage1-rustc/release/deps:/usr/tmp/net/hal/z/SRC/FreeBSD/ports/h= ead/lang/rust/work/rustc-1.51.0-src/build/armv6-unknown-freebsd/stage1/lib" "/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.51.0-src/= build/armv6-unknown-freebsd/stage1/bin/rustc" "--crate-name" "rustc_main" "--edition=3D2018" "compiler/rustc/src/main.rs" "--error-format=3Djson" "--json=3Ddiagnostic-rendered-ansi" "--crate-type" = "bin" "--emit=3Ddep-info,link" "-C" "opt-level=3D3" "-C" "embed-bitcode=3Dno" "-C" "debuginfo=3D0" "--cfg" "feature=3D\"llvm\"" "--cfg" "feature=3D\"max_level= _info\"" "-C" "metadata=3D33c78eec63c05f4e" "-C" "extra-filename=3D-33c78eec63c05f4e" "--out-dir" "/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.51.0-src/= build/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-freebsd/release/deps" "--target" "armv6-unknown-freebsd" "-C" "linker=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/cc-wrapp= er" "-L" "dependency=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rust= c-1.51.0-src/build/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-freebsd= /release/deps" "-L" "dependency=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rust= c-1.51.0-src/build/armv6-unknown-freebsd/stage1-rustc/release/deps" "--extern" "rustc_codegen_ssa=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/wo= rk/rustc-1.51.0-src/build/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-= freebsd/release/deps/librustc_codegen_ssa-0891b87bc3d4da8f.rlib" "--extern" "rustc_driver=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/ru= stc-1.51.0-src/build/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-freeb= sd/release/deps/librustc_driver-623729bd2d57ce51.so" "-Zmacro-backtrace" "-Clink-args=3D-Wl,-rpath,$ORIGIN/../lib" "-Ztls-model=3Dinitial-exec" "-Zunstable-options" "-Wrustc::internal" "-Cprefer-dynamic" "-Z" "binary-dep-depinfo" "-L" "native=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.= 51.0-src/build/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-freebsd/rel= ease/build/psm-fdd3708a2d632057/out" "-L" "native=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.= 51.0-src/build/armv6-unknown-freebsd/stage1-rustc/armv6-unknown-freebsd/rel= ease/build/rustc_llvm-6f28977a172d46d4/out" "-L" "native=3D/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.= 51.0-src/build/armv6-unknown-freebsd/llvm/build/lib" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "--sysroot" "/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.51.0-src/= build/armv6-unknown-freebsd/stage1" "-Z" "force-unstable-if-unmarked" sysroot: "/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.51.0-src/= build/armv6-unknown-freebsd/stage1" libdir: "/usr/tmp/net/hal/z/SRC/FreeBSD/ports/head/lang/rust/work/rustc-1.51.0-src/= build/armv6-unknown-freebsd/stage1/lib" Building [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D> ] 215/216: rustc-main(bin) Attached is the associated pstree. Scenario (continued; the purpose is to continue the compilation on the nati= ve armv6 machine): - Issue ^C - Exit the emulated zsh (^D) - Unmount /d/925s2a etc. from v903 - Detach disk925 from v903 - Attach disk925 in rpi-b - Mount /d/925s2a as well es /d/925s2a/dev etc. as well as the automounted directories (/d/925s2a/net; to reach /usr/ports) in rpi-b - Issue "chroot /d/925s2a" (starts a zsh, this time running natively in exa= ctly the same environment previously used with qemu-user-static on v903) - Issue "cd /usr/ports/lang/rust" - Issue "TMPDIR=3D/usr/tmp make" Result (continued): - The compilation restarts and proceeds alright (albeit much slower than wi= th the qemu emulation) Scenario (continued): - After successfully passing the offending compile (or link?) on the RPI-B+, again issue ^C, tear down everyting from the RPI-B+, reattach everything ag= ain in the v903 machine, and continue with building the port until the next hang occurs. Note: - This has happened for a very long time and with several updates to qemu-user-static. -- Martin --=20 You are receiving this mail because: You are on the CC list for the bug.=