Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 27 |
Nodes: | 6 (0 / 6) |
Uptime: | 40:39:40 |
Calls: | 631 |
Calls today: | 2 |
Files: | 1,187 |
D/L today: |
24 files (29,813K bytes) |
Messages: | 174,719 |
Hey there folks,Note that Poudriere uses RAM to store files by employing tmpfs. Take a
I've got poudriere running on a recently-16-ified VM with 8 cores and 48G ram (up from 32), and to eat the dogfood I'm attempting to build all my own packages.
lang/rust is a big one. It pontificates for about two hours, then dies with:
Hey there folks,
I've got poudriere running on a recently-16-ified VM with 8 cores and 48G ram (up from 32), and to eat the dogfood I'm attempting to build all my own packages.
lang/rust is a big one. It pontificates for about two hours, then dies with:
Hey there folks,
I've got poudriere running on a recently-16-ified VM with 8 cores and 48G ram (up from 32), and to eat the dogfood I'm attempting to build all my own packages.
lang/rust is a big one. It pontificates for about two hours, then dies with:
[ 45% 1690/3710] Building RISCVGenExegesis.inc...
[ 45% 1691/3710] Building RISCVGenGlobalISel.inc...
FAILED: [code=262] lib/Target/RISCV/RISCVGenGlobalISel.inc /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/lib/Target/RISCV/RISCVGenGlobalISel.inc
cd /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build && /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/bin/llvm-tblgen -gen-global-isel -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV -I/wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/include -I/wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/include -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target -no-warn-on-unused-template-args /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o lib/Target/RISCV/RISCVGenGlobalISel.inc -d lib/Target/RISCV/RISCVGenGlobalISel.inc.d
LLVM ERROR: out of memory
Allocation failed
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/bin/llvm-tblgen -gen-global-isel -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV -I/wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/include -I/wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/include -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target -no-warn-on-unused-template-args /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o lib/Target/RISCV/RISCVGenGlobalISel.inc -d lib/Target/RISCV/RISCVGenGlobalISel.inc.d
ninja: build stopped: subcommand failed.
thread 'main' panicked at /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/vendor/cmake-0.1.54/src/lib.rs:1119:5:
command did not execute successfully, got: exit status: 6
build script failed, must exit now
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: cmake::fail
Full logs here:
https://poudriere-src.isc.org/data/freebsd:16:x86:64-pkgbase-default_git/2025-09-11_04h17m42s/logs/rust-1.89.0.log
Is this actually likely an LLVM bug, or is 48G of ram not enough (it barely climbed at all for most of the files). Note that I'm not doing anything multi-threaded with Poudriere, this is single CPU bound.
-Dan
Hi,
My poudriere builds rust on a Raspberry PI with 8 GB RAM which is doing all kinds of other stuff like running Jenkins in the meantime. So I doubt your RAM is the issue.
I once helped somebody with out-of-memory problems and that person had set MAX_MEMORY in poudriere.conf to a really low value for testing purposes and than forgot about it.
What would help is if you post a link to the full build log as at the start of the log it prints all kinds of information about your memory settings.
Regards,
Ronald.
Van: "Dan Mahoney (Ports)" <freebsd@gushi.org>
Datum: donderdag, 11 september 2025 09:42
Aan: FreeBSD Mailing List <freebsd-ports@freebsd.org>
Onderwerp: Okay, how much ram does it take to build Rust?
Hey there folks,
I've got poudriere running on a recently-16-ified VM with 8 cores and 48G ram (up from 32), and to eat the dogfood I'm attempting to build all my own packages.
lang/rust is a big one. It pontificates for about two hours, then dies with:
[ 45% 1690/3710] Building RISCVGenExegesis.inc...
[ 45% 1691/3710] Building RISCVGenGlobalISel.inc...
FAILED: [code=262] lib/Target/RISCV/RISCVGenGlobalISel.inc /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/lib/Target/RISCV/RISCVGenGlobalISel.inc
cd /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build && /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/bin/llvm-tblgen -gen-global-isel -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV -I/wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/include -I/wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/include -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target -no-warn-on-unused-template-args /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o lib/Target/RISCV/RISCVGenGlobalISel.inc -d lib/Target/RISCV/RISCVGenGlobalISel.inc.d
LLVM ERROR: out of memory
Allocation failed
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/bin/llvm-tblgen -gen-global-isel -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV -I/wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/include -I/wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/include -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target -no-warn-on-unused-template-args /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o lib/Target/RISCV/RISCVGenGlobalISel.inc -d lib/Target/RISCV/RISCVGenGlobalISel.inc.d
ninja: build stopped: subcommand failed.
thread 'main' panicked at /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/vendor/cmake-0.1.54/src/lib.rs:1119:5:
command did not execute successfully, got: exit status: 6
build script failed, must exit now
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: cmake::fail
Full logs here:
https://poudriere-src.isc.org/data/freebsd:16:x86:64-pkgbase-default_git/2025-09-11_04h17m42s/logs/rust-1.89.0.log
Is this actually likely an LLVM bug, or is 48G of ram not enough (it barely climbed at all for most of the files). Note that I'm not doing anything multi-threaded with Poudriere, this is single CPU bound.
-Dan
Hey there folks,
I've got poudriere running on a recently-16-ified VM with 8 cores and
48G ram (up from 32), and to eat the dogfood I'm attempting to build
all my own packages.
lang/rust is a big one. It pontificates for about two hours, then
dies with:
Is this actually likely an LLVM bug, or is 48G of ram not enough (itFWIW, Until January rCo when I got the RAM extended rCo I have successfully been building Rust on a 16GB machine with 4 core i7 Kaby Lake CPU.
barely climbed at all for most of the files). Note that I'm not
doing anything multi-threaded with Poudriere, this is single CPU
bound.
On Sep 11, 2025, at 9:11rC>AM, Daniel Engberg <diizzy@freebsd.org> wrote:--
On 2025-09-11 09:42, Dan Mahoney (Ports) wrote:
Hey there folks,Hi,
I've got poudriere running on a recently-16-ified VM with 8 cores and 48G ram (up from 32), and to eat the dogfood I'm attempting to build all my own packages.
lang/rust is a big one. It pontificates for about two hours, then dies with: >>
[ 45% 1690/3710] Building RISCVGenExegesis.inc...
[ 45% 1691/3710] Building RISCVGenGlobalISel.inc...
FAILED: [code=262] lib/Target/RISCV/RISCVGenGlobalISel.inc /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/lib/Target/RISCV/RISCVGenGlobalISel.inc
cd /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build && /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/bin/llvm-tblgen -gen-global-isel -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV -I/wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/include -I/wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/include -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target -no-warn-on-unused-template-args /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o lib/Target/RISCV/RISCVGenGlobalISel.inc -d lib/Target/RISCV/RISCVGenGlobalISel.inc.d
LLVM ERROR: out of memory
Allocation failed
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/bin/llvm-tblgen -gen-global-isel -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV -I/wrkdirs/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/include -I/wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/include -I /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target -no-warn-on-unused-template-args /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/src/llvm-project/llvm/lib/Target/RISCV/RISCVGISel.td --write-if-changed -o lib/Target/RISCV/RISCVGenGlobalISel.inc -d lib/Target/RISCV/RISCVGenGlobalISel.inc.d
ninja: build stopped: subcommand failed.
thread 'main' panicked at /wrkdirs/usr/ports/lang/rust/work/rustc-1.89.0-src/vendor/cmake-0.1.54/src/lib.rs:1119:5:
command did not execute successfully, got: exit status: 6
build script failed, must exit now
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: cmake::fail
Full logs here:
https://poudriere-src.isc.org/data/freebsd:16:x86:64-pkgbase-default_git/2025-09-11_04h17m42s/logs/rust-1.89.0.log
Is this actually likely an LLVM bug, or is 48G of ram not enough (it barely climbed at all for most of the files). Note that I'm not doing anything multi-threaded with Poudriere, this is single CPU bound.
-Dan
During linking it can use up quite a bit of memory, especially if you have multiple jobs running. You will struggle with 12Gb of RAM, 8Gb swap and ZFS (ARC) using ports and 3 jobs (-j3) using slow CPU (older i3 etc). My Ryzen (7000 series) box needs about 40Gb of RAM (including tmpfs) alone to build Rust using Poudriere without ARC accounted for and that's running -j8. It can be a bit hard to estimate as time for linking processes to finish can wary greatly depending on hardware and if those accumulate you'll need even more memory because of the slow processing and multiple running in parallel. Best regards, Daniel
Entirely different problem:The actual error report in that log file is:
Build now fails within a minute of starting:
https://poudriere-src.isc.org/data/freebsd:16:x86:64-default/2025-09-11_23h25m42s/logs/errors/rust-1.89.0.log
My entire poudriere-conf is:Is the "-" a typo? The normal name is: poudriere.conf
ZPOOL=zrootrust uses huge amounts of temporary file system space,
FREEBSD_HOST=https://download.FreeBSD.org
RESOLV_CONF=/etc/resolv.conf
BASEFS=/usr/local/poudriere
USE_PORTLINT=no
USE_TMPFS=yes
DISTFILES_CACHE=/usr/ports/distfiles PKG_REPO_SIGNING_KEY=/usr/local/etc/ssl/keys/poudriere.key KEEP_OLD_PACKAGES=yesI've never tested if KEEP_OLD_PACKAGES interacts with
KEEP_OLD_PACKAGES_COUNT=5Same here.
Ideas welcome===
On Sep 11, 2025, at 5:56rC>PM, Mark Millard <marklmi@yahoo.com> wrote:Aah, so at some point, I guess I had a 16 vm, which was failing due to a memory limit, then tried updating to try and fix that, but at the same time as fixing the ram issue, so I was no longer memory bound, but now in the broken state. Whoops, perfect timing.
Dan Mahoney (Ports) <freebsd_at_gushi.org> wrote on
Date: Thu, 11 Sep 2025 23:35:33 UTC :
Entirely different problem:
Build now fails within a minute of starting:
https://poudriere-src.isc.org/data/freebsd:16:x86:64-default/2025-09-11_23h25m42s/logs/errors/rust-1.89.0.log
The actual error report in that log file is:
= note: ld: error: undefined symbol: readdir_r
cc: error: linker command failed with exit code 1 (use -v to see invocation)referenced by std.7afbaec6631a8b5b-cgu.01
std-3a0e78699a7df230.std.7afbaec6631a8b5b-cgu.01.rcgu.o:(std::sys::fs::unix::remove_dir_impl::remove_dir_all_recursive::hd9cf968a76fe7acb) in archive /wrkdirs/usr/ports/lang/rust/work/bootstrap/lib/rustlib/x86_64-unknown-freebsd/lib/libstd-3a0e78699a7df230.rlib
did you mean: readdir_r@FBSD_1.5
defined in: /lib/libc.so.7
Your poudriere jail's world is a version of FreeBSD 16
that had readdir_r removed, breaking builds of rust.
FreeBSD has had that removal reverted. You need to update
the poudriere jail's world content to be of a vintage that
includes:
rCo git: d20c82507278 - main - Revert "libc: Remove readdir_r(3)" Dag-Erling Sm|+rgrav
It was a typo, yes.My entire poudriere-conf is:
Is the "-" a typo? The normal name is: poudriere.conf
"USE_TMPFS=yes" means that much of the file system
space usage is competing for the system's RAM+SWAP
space instead of for disk space.
Having something like, say, SWAP=3.6*RAM [so
(RAM+SWAP)=4.6*RAM] is a possibility that will
page the part of the time that RAM is insufficient.
Otherwise you probably want more like: USE_TMPFS=data
Hello.
By the way, is it unpopular these days to use mdconfig to use a normal regular file as swap space?
However, despite the fact that I brought up the topic of that method, I have never actually used it myself, so it seems that the method is unpopular :)
Regards.
Hello.
By the way, is it unpopular these days to use mdconfig to use a normal regular file as swap space?
However, despite the fact that I brought up the topic of that method, I have never actually used it myself, so it seems that the method is unpopular :)
On Fri, Sep 12, 2025 at 01:20:08PM +0900, Tatsuki Makino wrote:
Hello.
By the way, is it unpopular these days to use mdconfig to use a normal regular file as swap space?
However, despite the fact that I brought up the topic of that method, I have never actually used it myself, so it seems that the method is unpopular :)
Useful to make extra swap space on-the-fly. I've used it on occasion
to add swap space. But it's best added to the fastest media, like
ssd. Adding it to a spinning rust ufs is slower. It's not really
suitable to add to a zfs filesystem in my experience.
--
I'll note that there is another option that I'd notOn Sep 11, 2025, at 5:56rC>PM, Mark Millard <marklmi@yahoo.com> wrote:
Dan Mahoney (Ports) <freebsd_at_gushi.org> wrote on
Date: Thu, 11 Sep 2025 23:35:33 UTC :
Entirely different problem:
Build now fails within a minute of starting:
https://poudriere-src.isc.org/data/freebsd:16:x86:64-default/2025-09-11_23h25m42s/logs/errors/rust-1.89.0.log
The actual error report in that log file is:
= note: ld: error: undefined symbol: readdir_r
cc: error: linker command failed with exit code 1 (use -v to see invocation)referenced by std.7afbaec6631a8b5b-cgu.01
std-3a0e78699a7df230.std.7afbaec6631a8b5b-cgu.01.rcgu.o:(std::sys::fs::unix::remove_dir_impl::remove_dir_all_recursive::hd9cf968a76fe7acb) in archive /wrkdirs/usr/ports/lang/rust/work/bootstrap/lib/rustlib/x86_64-unknown-freebsd/lib/libstd-3a0e78699a7df230.rlib
did you mean: readdir_r@FBSD_1.5
defined in: /lib/libc.so.7
Your poudriere jail's world is a version of FreeBSD 16
that had readdir_r removed, breaking builds of rust.
FreeBSD has had that removal reverted. You need to update
the poudriere jail's world content to be of a vintage that
includes:
rCo git: d20c82507278 - main - Revert "libc: Remove readdir_r(3)" Dag-Erling Sm|+rgrav
Aah, so at some point, I guess I had a 16 vm, which was failing due to a memory limit, then tried updating to try and fix that, but at the same time as fixing the ram issue, so I was no longer memory bound, but now in the broken state. Whoops, perfect timing.
I've updated now, and we're once again building. (I have both a jail built from src and one that uses pkgbase, trying both).
My entire poudriere-conf is:
Is the "-" a typo? The normal name is: poudriere.conf
It was a typo, yes.
"USE_TMPFS=yes" means that much of the file system
space usage is competing for the system's RAM+SWAP
space instead of for disk space.
Having something like, say, SWAP=3.6*RAM [so
(RAM+SWAP)=4.6*RAM] is a possibility that will
page the part of the time that RAM is insufficient.
Otherwise you probably want more like: USE_TMPFS=data
This is what I've done.
Let's see if it works. Rust builds so fast, after all...