Bug 240099

Summary: lang/rust: build failed with SIGSEGV: invalid memory reference 1.37.0, 1.40.0
Product: Ports & Packages Reporter: iron.udjin
Component: Individual Port(s)Assignee: FreeBSD Rust Team <rust>
Status: Open ---    
Severity: Affects Some People CC: madpilot, mandree, portmgr
Priority: --- Flags: tobik: maintainer-feedback+
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
rust 1.40.0 build log in a 12.0 amd64 poudriere none

Description iron.udjin 2019-08-25 13:30:37 UTC
Hello,

I'm trying to build rust-1.37.0 on 12.0-STABLE r351477 and got:

...
   Compiling syntax_pos v0.0.0 (/usr/ports/lang/rust/work/rustc-1.37.0-src/src/libsyntax_pos)
   Compiling rustc_errors v0.0.0 (/usr/ports/lang/rust/work/rustc-1.37.0-src/src/librustc_errors)
   Compiling fmt_macros v0.0.0 (/usr/ports/lang/rust/work/rustc-1.37.0-src/src/libfmt_macros)
error: Could not compile `rustc_errors`.

Caused by:
  process didn't exit successfully: `/usr/ports/lang/rust/work/rustc-1.37.0-src/build/bootstrap/debug/rustc --edition=2018 --crate-name rustc_errors src/librustc_errors/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=462f917bf7af97bf -C extra-filename=-462f917bf7af97bf --out-dir /usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps --target x86_64-unknown-freebsd -L dependency=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps -L dependency=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/release/deps --extern annotate_snippets=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libannotate_snippets-21309ad59417079c.rlib --extern atty=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libatty-74c1d8e01172cf79.rlib --extern log=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/liblog-aaae1f3793c69196.rlib --extern rustc_cratesio_shim=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_cratesio_shim-35743d30de251cd3.so --extern rustc_data_structures=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_data_structures-27b829d9a8662ce5.so --extern serialize=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libserialize-d1d5b874fc8c9ee2.so --extern serialize=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libserialize-d1d5b874fc8c9ee2.rlib --extern syntax_pos=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libsyntax_pos-c54fb334711156e0.so --extern termcolor=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libtermcolor-353ba7bc4183fdce.rlib --extern unicode_width=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libunicode_width-cfb6bcaec9cbee54.rlib` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `rustc_target`.

Caused by:
  process didn't exit successfully: `/usr/ports/lang/rust/work/rustc-1.37.0-src/build/bootstrap/debug/rustc --edition=2018 --crate-name rustc_target src/librustc_target/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=0e9920e7fad9583b -C extra-filename=-0e9920e7fad9583b --out-dir /usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps --target x86_64-unknown-freebsd -L dependency=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps -L dependency=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/release/deps --extern bitflags=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libbitflags-ff801711d1e4cc72.rlib --extern log=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/liblog-aaae1f3793c69196.rlib --extern rustc_cratesio_shim=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_cratesio_shim-35743d30de251cd3.so --extern rustc_data_structures=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_data_structures-27b829d9a8662ce5.so --extern serialize=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libserialize-d1d5b874fc8c9ee2.so --extern serialize=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libserialize-d1d5b874fc8c9ee2.rlib --extern syntax_pos=/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libsyntax_pos-c54fb334711156e0.so` (signal: 11, SIGSEGV: invalid memory reference)
command did not execute successfully: "/usr/ports/lang/rust/work/rustc-1.37.0-src/build/x86_64-unknown-freebsd/stage0/bin/cargo" "build" "--target" "x86_64-unknown-freebsd" "-j" "16" "--release" "--frozen" "--features" "" "--manifest-path" "/usr/ports/lang/rust/work/rustc-1.37.0-src/src/rustc/Cargo.toml" "--message-format" "json"
expected success, got: exit code: 101
Traceback (most recent call last):
  File "/usr/ports/lang/rust/work/rustc-1.37.0-src/x.py", line 11, in <module>
    bootstrap.main()
  File "/usr/ports/lang/rust/work/rustc-1.37.0-src/src/bootstrap/bootstrap.py", line 847, in main
    bootstrap(help_triggered)
  File "/usr/ports/lang/rust/work/rustc-1.37.0-src/src/bootstrap/bootstrap.py", line 833, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/usr/ports/lang/rust/work/rustc-1.37.0-src/src/bootstrap/bootstrap.py", line 141, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /usr/ports/lang/rust/work/rustc-1.37.0-src/build/bootstrap/debug/bootstrap build --verbose --config ./config.toml --jobs 16
*** Error code 1

Please let me know in case you'll need any additional info.
Comment 1 Tobias Kortkamp freebsd_committer 2019-09-08 12:41:09 UTC
Since we have not gotten any other reports like this, and Rust 1.37.0 builds
fine on the cluster, do you have any customization in your kernel config or
make.conf?
Comment 2 iron.udjin 2019-09-08 12:59:24 UTC
(In reply to Tobias Kortkamp from comment #1)
In my make.conf I have only:

CFLAGS+= -O2 -pipe -march=native -mtune=native

My kernel config pretty standard. I have only disabled unused devices. Here is it: https://pastebin.com/VeiR7DSg
Comment 3 Tobias Kortkamp freebsd_committer 2019-09-08 13:02:29 UTC
> CFLAGS+= -O2 -pipe -march=native -mtune=native

Can you retry without that?
Comment 4 iron.udjin 2019-09-08 13:39:29 UTC
(In reply to Tobias Kortkamp from comment #3)
Got the same result.
Comment 5 Tobias Kortkamp freebsd_committer 2019-09-27 21:05:43 UTC
Is it any better for you with Rust 1.38.0?
Comment 6 iron.udjin 2019-09-27 21:17:35 UTC
(In reply to Tobias Kortkamp from comment #5)
The same here:

error: Could not compile `rustc`.

Caused by:
  process didn't exit successfully: `/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/bootstrap/debug/rustc --edition=2018 --crate-name rustc src/librustc/lib.rs --color always --error-format json --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C metadata=aeb285aa546b66e4 -C extra-filename=-aeb285aa546b66e4 --out-dir /tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps --target x86_64-unknown-freebsd -L dependency=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps -L dependency=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/release/deps --extern arena=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libarena-eb797b55bd9f5636.rlib --extern backtrace=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libbacktrace-fcf3541caabcba32.rlib --extern bitflags=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libbitflags-c57707f9f7520fcc.rlib --extern byteorder=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libbyteorder-efda35616a67f061.rlib --extern chalk_engine=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libchalk_engine-cc0c0d2c02c20733.rlib --extern fmt_macros=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libfmt_macros-f2072d1806f9f34a.rlib --extern graphviz=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libgraphviz-e6011a9f4a2d8fb9.rlib --extern jobserver=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libjobserver-ba69698d65d6673a.rlib --extern lazy_static=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/liblazy_static-d5a6d8036a19ae9a.rlib --extern log=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/liblog-f5e15fd383053fdb.rlib --extern measureme=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libmeasureme-c2dc57f8492ea037.rlib --extern num_cpus=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libnum_cpus-e33ddc4a79a9511d.rlib --extern parking_lot=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libparking_lot-0784af453d3b9fb2.rlib --extern polonius_engine=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libpolonius_engine-54faa024be00343c.rlib --extern rustc_rayon=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_rayon-6b893a854cea133d.rlib --extern rustc_rayon_core=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_rayon_core-33ef4f7da9170b53.rlib --extern rustc_apfloat=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_apfloat-8d3abdd64f1be745.rlib --extern rustc_data_structures=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_data_structures-c0f158b492b98655.rlib --extern errors=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_errors-0838086121f00058.rlib --extern rustc_fs_util=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_fs_util-b31ca2dcc33e5771.rlib --extern rustc_macros=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/release/deps/librustc_macros-59029da47385354e.so --extern rustc_target=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_target-5577833c2d4ad198.rlib --extern scoped_tls=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libscoped_tls-8fc3a85c58d25cd8.rlib --extern rustc_serialize=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libserialize-6e7591f5f25b6f4c.rlib --extern smallvec=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libsmallvec-8cf8422bb2b06a3d.rlib --extern syntax=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libsyntax-a26f062b19040606.rlib --extern syntax_pos=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libsyntax_pos-ff927d0ec92c63e3.rlib -L native=/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/backtrace-sys-3f6677ecb4591546/out` (signal: 11, SIGSEGV: invalid memory reference)
command did not execute successfully: "/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/x86_64-unknown-freebsd/stage0/bin/cargo" "build" "--target" "x86_64-unknown-freebsd" "-j" "16" "--release" "--frozen" "--features" "" "--manifest-path" "/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/src/rustc/Cargo.toml" "--message-format" "json"
expected success, got: exit code: 101
Traceback (most recent call last):
  File "/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/x.py", line 11, in <module>
    bootstrap.main()
  File "/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/src/bootstrap/bootstrap.py", line 866, in main
    bootstrap(help_triggered)
  File "/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/src/bootstrap/bootstrap.py", line 852, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/src/bootstrap/bootstrap.py", line 141, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /tmpfs/usr/ports/lang/rust/work/rustc-1.38.0-src/build/bootstrap/debug/bootstrap build --verbose --config ./config.toml --jobs 16
*** Error code 1
Comment 7 Matthias Andree freebsd_committer 2019-12-21 14:06:33 UTC
Created attachment 210104 [details]
rust 1.40.0 build log in a 12.0 amd64 poudriere

Same story for me on FreeBSD 12.0 amd64 (poudriere), with rust 1.40.0 - xz-compressed poudriere log attached.
Comment 8 Matthias Andree freebsd_committer 2019-12-22 23:01:53 UTC
Summoning portmgr@ - this breaks Mozilla builds (Thunderbird, Firefox)
Comment 9 Tobias Kortkamp freebsd_committer 2019-12-23 07:44:20 UTC
Did you try that only once or is it always reproducible?  Did
rust-1.39.0 build fine for you?  If yes, any build host changes
since then?  Any kernel customizations?  If yes, try it again with
GENERIC.  Did you try running the failing command it gives you after
'process didn't exit successfully' under devel/gdb to get a backtrace
or maybe under truss?

Note that rust-1.40.0 built fine on the package cluster and also
for me too many times to count on multiple systems, so I doubt that
I can reproduce and debug this myself.
Comment 10 Matthias Andree freebsd_committer 2019-12-23 09:03:34 UTC
It has reproduced on each and every build since 1.40, about half a dozen. Only change is a build jail upgrade from an older 12.0-RELEASE-p patchlevel to 12.0-RELEASE-p12 (amd64). Default GENERIC kernel, no customizations. 

Previous versions used to work, I have successfully built Thunderbird/Firefox with them, but now my poudriere is stuck. Now retrying on bare metal (12.1 though) to compare logs.

The log contains a rustc SIGSEGV and that is something I find strange. 35 GB free disk space, 12 GB RAM (in a Fedora 31 Linux-hosted qemu-based virtual host - I could also boot bare metal if needed)
Comment 11 Matthias Andree freebsd_committer 2019-12-23 14:31:28 UTC
(In reply to Matthias Andree from comment #10)
Hmmm... after a clean rebuild on a live 12.1 amd64 system, the poudriere build in a 12.0 amd64 release also passed. Very strange.
Comment 12 Guido Falsi freebsd_committer 2020-01-07 18:56:55 UTC
Hi,

I've updated my machines to a recent head (r356422) and I'm seeing an error quite similar to the one reported here when building rust in poudriere. I'm building it there because I build my own package sets.

The failure it completely reproducible, I've tried starting with a clean poudriere jail a few times getting the same exact result.

The only thing changed from before is the update to a more recent head, and the biggest difference in this update is clang changing from 9.0.0 to 9.0.1, not sure if this could be related.

Here's the error I'm getting:

  extracting cargo-0.40.0-x86_64-unknown-freebsd/cargo/share/doc/cargo/README.md
  extracting cargo-0.40.0-x86_64-unknown-freebsd/cargo/manifest.in
  extracting cargo-0.40.0-x86_64-unknown-freebsd/cargo/etc/bash_completion.d/cargo
  extracting cargo-0.40.0-x86_64-unknown-freebsd/cargo/bin/cargo
  extracting cargo-0.40.0-x86_64-unknown-freebsd/cargo/share/zsh/site-functions/_cargo
running: /wrkdirs/usr/ports/lang/rust/work/rustc-1.40.0-src/build/x86_64-unknown-freebsd/stage0/bin/cargo build --manifest-path /wrkdirs/usr/ports/lang/rust/work/rustc-1.40.0-src/src/bootstrap/Cargo.toml --frozen
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.40.0-src/x.py", line 11, in <module>
    bootstrap.main()
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.40.0-src/src/bootstrap/bootstrap.py", line 909, in main
    bootstrap(help_triggered)
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.40.0-src/src/bootstrap/bootstrap.py", line 880, in bootstrap
    build.build_bootstrap()
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.40.0-src/src/bootstrap/bootstrap.py", line 675, in build_bootstrap
    run(args, env=env, verbose=self.verbose)
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.40.0-src/src/bootstrap/bootstrap.py", line 141, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /wrkdirs/usr/ports/lang/rust/work/rustc-1.40.0-src/build/x86_64-unknown-freebsd/stage0/bin/cargo build --manifest-path /wrkdirs/usr/ports/lang/rust/work/rustc-1.40.0-src/src/bootstrap/Cargo.toml --frozen
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/rust
=>> Cleaning up wrkdir
===>  Cleaning for rust-1.40.0
Comment 13 Tobias Kortkamp freebsd_committer 2020-01-07 19:14:42 UTC
(In reply to Guido Falsi from comment #12)
Seems unrelated to this bug.  Your log does not show it crashing
with SIGSEGV later.  Sounds similar to bug #243157 instead.
Comment 14 Guido Falsi freebsd_committer 2020-01-07 20:36:27 UTC
(In reply to Tobias Kortkamp from comment #13)

Thanks for the fast feedback. I did not notice that bug report when searching.

Thanks for pointing me in the right direction!
Comment 15 Guido Falsi freebsd_committer 2020-02-03 09:07:42 UTC
Hi again,

After solving the previous problem I'm now getting a failure very similar to the one reported here.

I'm trying to build in poudriere, machine ha 16 GiB RAM and 24 Gib swap. I've tried also disabling all parallelism in poudriere. BTW, it looks like the port is ignoring poudriere's ALLOW_MAKE_JOBS=no.

I'm almost sure the failure is caused by the process consuming all memory.

This started to ahappen after I updated from my previous head to a recent one, I'm on r357249 now, I was on r356422 before.

error: could not compile `rustc_typeck`.

Caused by:
  process didn't exit successfully: `/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/bootstrap/debug/rustc --edition=2018 --crate-name rustc_typeck src/librustc_typeck/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C debuginfo=0 -C metadata=4a1c4fba6cf77174 -C extra-filename=-4a1c4fba6cf77174 --out-dir /wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps --target x86_64-unknown-freebsd -C linker=cc -L dependency=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps -L dependency=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/release/deps --extern arena=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libarena-d4d8f84ad3e7fbd2.rmeta --extern log=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/liblog-50fe33312738ed96.rmeta --extern rustc=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc-7f0befffd43bd8e2.rmeta --extern rustc_data_structures=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_data_structures-37483e1f4c93069a.rmeta --extern rustc_error_codes=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_error_codes-3470bf7055a658b4.rmeta --extern errors=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_errors-a144f2bf4b81ffec.rmeta --extern rustc_index=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_index-3675e34f8dd062a3.rmeta --extern rustc_target=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_target-f3c5543f573b721a.rmeta --extern smallvec=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libsmallvec-55f2014f3d2cfa5a.rmeta --extern syntax=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libsyntax-50bffd4003ce3a29.rmeta --extern syntax_pos=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/libsyntax_pos-5747b87180718c65.rmeta --cfg=bootstrap -Zexternal-macro-backtrace '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Wrust_2018_idioms -Wunused_lifetimes -Dwarnings -Zunstable-options '-Wrustc::internal' -Cprefer-dynamic -Zbinary-dep-depinfo -L native=/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/backtrace-sys-c2d8ba32f706ac39/out` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/x86_64-unknown-freebsd/stage0/bin/cargo" "build" "-Zconfig-profile" "--target" "x86_64-unknown-freebsd" "-Zbinary-dep-depinfo" "-j" "8" "-v" "--release" "--frozen" "--features" " llvm" "--manifest-path" "/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
Traceback (most recent call last):
  File "x.py", line 11, in <module>
    bootstrap.main()
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/src/bootstrap/bootstrap.py", line 912, in main
    bootstrap(help_triggered)
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/src/bootstrap/bootstrap.py", line 898, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/src/bootstrap/bootstrap.py", line 141, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /wrkdirs/usr/ports/lang/rust/work/rustc-1.41.0-src/build/bootstrap/debug/bootstrap build --config=config.toml --jobs=8
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/rust
=>> Cleaning up wrkdir
===>  Cleaning for rust-1.41.0
build of lang/rust | rust-1.41.0 ended at Sat Feb  1 17:42:47 CET 2020
build time: 00:27:03
!!! build failure encountered !!!
Comment 16 Tobias Kortkamp freebsd_committer 2020-02-03 09:26:10 UTC
(In reply to Guido Falsi from comment #15)
> This started to ahappen after I updated from my previous head to a recent one, I'm on r357249 now, I was on r356422 before.

Try again after updating to after base r357253.
Comment 17 Tobias Kortkamp freebsd_committer 2020-02-15 14:10:43 UTC
(In reply to Tobias Kortkamp from comment #16)
Guido, does the problem still persist?
Comment 18 Guido Falsi freebsd_committer 2020-02-15 15:26:17 UTC
(In reply to Tobias Kortkamp from comment #17)

Hi,

Sorry for the delay. I actually forgot to followup to this one.

Yes I solved it by updating base to r357448.

Thanks for giving me the solution!