rust 1.85. on poudriere

Hello

I am trying to build rust on my 14.2 poudriere jail and all i get is this :
Code:
 => SHA256 Checksum OK for rust/2025-01-09/cargo-1.84.0-x86_64-unknown-freebsd.tar.xz.
Killed
===>  Failed to extract "/portdistfiles/rust/rustc-1.85.0-src.tar.xz".
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/rust
any ideas of what seems to be the case ?

thanks
 
Last edited by a moderator:
Dual Console: Video Primary, Serial Secondary
lo0: link state changed to UP
vtnet0: link state changed to UP
ums0 on uhub0
ums0: <BHYVE HID Tablet, class 0/0, rev 3.00/0.00, addr 1> on usbus0
ums0: 3 buttons and [Z] coordinates ID=0
pid 7281 (bsdtar), jid 3, uid 65534, was killed: failed to reclaim memory
root@poudriere:/home/geo #
 
I am trying to build it on a VM. I allocated 8 GB RAM to the VM first, which failed due to running out of RAM as described above. Then I increased the RAM allocated to that VM to 16 GB, the build failed again, this time by running out of swap space, which was defined in /etc/fstab as below:
Code:
/dev/gpt/swpfs none swap sw 0 0
VM has 46 GB disk space, of which 8.3 GB is currently being used.
I am now retrying with 64 GB RAM allocated to this VM and keeping my fingers crossed. Just how much RAM will it need for heaven's sake? I guess we shall see.
 
this time by running out of swap space, which was defined in /etc/fstab as below:
Doesn't say how big your swap is, just that it's defined and probably enabled.
VM has 46 GB disk space, of which 8.3 GB is currently being used.
This isn't related to the size of the swap partition either.

Just how much RAM will it need for heaven's sake?
It depends. For a long time my build server had 16GB of memory, and 16GB swap. I typically was able to build everything, except when poudriere tried to build several versions of LLVM, GCC and Rust simultaneously. Poudriere has a setting to prevent this nowadays, at least in the -devel version.
Code:
# List of package name globs that should never build at the same time.
# Default: none
#MUTUALLY_EXCLUSIVE_BUILD_PACKAGES="llvm* rust* gcc*"

And there's USE_TMPFS, which could use more or less memory depending on its setting.
Code:
# Use tmpfs(5)
# This can be a space-separated list of options:
# wrkdir    - Use tmpfs(5) for port building WRKDIRPREFIX
# data      - Use tmpfs(5) for poudriere cache/temp build data
# localbase - Use tmpfs(5) for LOCALBASE (installing ports for packaging/testing)
# all       - Run the entire build in memory, including builder jails.
# yes       - Enables tmpfs(5) for wrkdir and data
# no        - Disable use of tmpfs(5)
# EXAMPLE: USE_TMPFS="wrkdir data"
USE_TMPFS=yes

Additionally,
Code:
# parallel build support.
#
# By default poudriere uses hw.ncpu to determine the number of builders.
# You can override this default by changing PARALLEL_JOBS here, or
# by specifying the -J flag to bulk/testport.
#
# Example to define PARALLEL_JOBS to one single job
# PARALLEL_JOBS=1
In combination with
Code:
# By default MAKE_JOBS is disabled to allow only one process per cpu
# Use the following to allow it anyway
# ALLOW_MAKE_JOBS=yes

# List of package name globs that will always be allowed to use MAKE_JOBS
# regardless of ALLOW_MAKE_JOBS. This is useful for allowing ports
# which holdup the rest of the queue to build more quickly.
#ALLOW_MAKE_JOBS_PACKAGES="pkg ccache py*"
Can make the entire process use more or less memory (more concurrent "parallel" jobs, each with more cores per job will use a lot more memory).
 
It is odd that tar is the process that is failing. OP, can you confirm it is also tar that fails in the 16 GB runs?
 
Thank you SirDice for your amazingly comprehensive response. I know that my tries so far are attempting to build llvm AND rust simultaneously, I believe since I am not using the -devel version of poudriere, nor I uncommented the line you posted for mutually exclusive packages. I am at work now and will probably see another failed build when I get back home tonight. My plan is to dive into the poudriere.conf and define mutually exclusive build packages; not sure if it will respect it or not, since again, I am not using the -devel version.

As of this morning, the build job was working with 13 builders with 64 GB RAM attempting to build rust and llvm simultaneously when I left home.

Doesn't say how big your swap is, just that it's defined and probably enabled.
I know, I noticed that and that was why I posted it in my message. This is the FreeBSD 14.2 VM qcow2 official image setting, without modification. I wonder if I can modify it if I get the same out of swap space error message again. If so, do you have any recommendations about the swap space size? I need to figure out how to define its size in the fstab file, but I believe I can do that :).

... can you confirm it is also tar that fails in the 16 GB runs?
Although I am not the OP, I confirm that it is NOT tar that fails in the 16 GB runs in my case. As I mentioned above, it is trying to build llvm and rust simultaneously, and eventually fails with the out of swap space error.
 
Rust successfully built. llvm is still building and is currently 16% built over almost 9 hour time. Fingers crossed.
 
Mem(2,96)+swap(4,35)+tmpfs(5.07)- this on bhvye-Got a long way to go....
 

Attachments

  • Screenshot_2025-03-08_15-22-44.png
    Screenshot_2025-03-08_15-22-44.png
    297.1 KB · Views: 239
Back
Top