Bug 265799 - lang/rust fails to build on 12.3 amd64
Summary: lang/rust fails to build on 12.3 amd64
Status: Closed DUPLICATE of bug 256099
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: FreeBSD Rust Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-12 17:12 UTC by Victor Sudakov
Modified: 2023-01-24 08:44 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (rust)


Attachments
Poudriere log (232.83 KB, application/gzip)
2022-08-12 17:13 UTC, Victor Sudakov
no flags Details
Build still failing (431.52 KB, application/gzip)
2022-09-01 03:22 UTC, Victor Sudakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Sudakov 2022-08-12 17:12:08 UTC
lang/rust fails to build on 12.3 amd64 in Poudriere. The complete poudriere log is attached.

Sorry I'm not qualified to figure out what's happening.
Comment 1 Victor Sudakov 2022-08-12 17:13:54 UTC
Created attachment 235868 [details]
Poudriere log
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2022-08-15 12:45:48 UTC
rustc exited with signal: 9

Make sure you don't run out of ram / swap.
Comment 3 Victor Sudakov 2022-08-26 04:40:03 UTC
n a(In reply to Mikael Urankar from comment #2)

On a dedicated builder VM with 8GB RAM and 8GB swap? Sorry this is highly unlikely.
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2022-08-26 06:29:38 UTC
(In reply to Victor Sudakov from comment #3)
what's in /var/log/messages when the crash happens?
Comment 5 Victor Sudakov 2022-08-26 07:59:28 UTC
(In reply to Mikael Urankar from comment #4)
> what's in /var/log/messages when the crash happens?

Please stand by, I'll rerun the build with PARALLEL_JOBS=1 and report.
Comment 6 Victor Sudakov 2022-09-01 03:20:28 UTC
It's still failing with 12GB RAM and 14G swap, that's ridiculous.
Comment 7 Victor Sudakov 2022-09-01 03:22:56 UTC
Created attachment 236278 [details]
Build still failing
Comment 8 Victor Sudakov 2022-09-02 02:54:16 UTC
I've been able to build it eventually with 12GB of RAM and 28GB of swap, but it's an outrage! It's a dedicated build VM with nothing but poudriere.
Comment 9 Henri Hennebert 2022-09-02 10:52:35 UTC
Really strange...

I encounter the same problem under poudriere on a ROCKPRO64 (4 GB)

But at the 3rd try it run smoothly :-O

I build it on a amd64 without problem....
Comment 10 Victor Sudakov 2023-01-19 11:10:49 UTC
It is a bug and it's probably a duplicate of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256099
Comment 11 Victor Sudakov 2023-01-19 11:12:32 UTC

*** This bug has been marked as a duplicate of bug 256099 ***
Comment 12 Mark Millard 2023-01-19 19:55:12 UTC
(In reply to Victor Sudakov from comment #3)

You did not provide your poudriere configuration. The below is actually about
poudreire-devel . I do not know the plain poudriere's status. It is just
based on my guessing at your unspecified context.

If one uses poudriere to build rust with USE_TMPFS=all just the tmpfs space
can be 17 GiBytes+ by the end of the build, even for PARALLEL_JOBS=1. With
tmpfs being RAM+SWAP backed, the processes themselves temporarily add more
to the total for RAM+SWAP use so maximum use might be higher for a time.

There are 2 USE_TMPFS settings that avoid this (not just for rust):

USE_TMPFS=data
USE_TMPFS=no

There is also a way to explicitly list rust or others as to not
use tmpfs despite USE_TMPFS=all being specified (from the .sample file):

# List of package globs that are not allowed to use tmpfs for their WRKDIR
# Note that you *must* set TMPFS_BLACKLIST_TMPDIR
# EXAMPLE: TMPFS_BLACKLIST="rust"

# The host path where tmpfs-blacklisted packages can be built in.
# A temporary directory will be generated here and be null-mounted as the
# WRKDIR for any packages listed in TMPFS_BLACKLIST.
# EXAMPLE: TMPFS_BLACKLIST_TMPDIR=${BASEFS}/data/cache/tmp

Of course one still needs that roughly 17 GiBytes or more of file space
someplace when tmpfs is avoided. PARALLEL_JOBS=1 and the like does not
change the total much.
Comment 13 Victor Sudakov 2023-01-24 05:10:40 UTC
Yes, Mark, I've read the recommendations about USE_TMPFS=data in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256099 , I wish I had been referred to it earlier.

I've also tried to use 'bulk -b latest' for lang/rust as poudriere-devel permits, but it never seems to find a matching version of the binary package in the pkg.freebsd.org and builds it locally anyway.