Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TMPFS weirdness #1188

Open
4 tasks done
bileslav opened this issue Nov 21, 2024 · 2 comments
Open
4 tasks done

TMPFS weirdness #1188

bileslav opened this issue Nov 21, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@bileslav
Copy link

bileslav commented Nov 21, 2024

Prerequisites

  • Have you checked for an existing issue describing your problem?
  • Are you running the latest version?
  • Is your ports tree recent?
  • Is your FreeBSD Host on a supported release?

Describe the bug

The configurations mentioned below are presented at the end of the issue.

  1. devel/electron32 builds just fine with the config B, but it fails due to an exhausted memory with the config A.
  2. This is what I get using the config B (look at TMPFS usage):
 ID  TOTAL              ORIGIN   PKGNAME           PHASE PHASE    TMPFS        CPU%  MEM%
[01] 00:17:07 devel/electron32 | electron32-32.2.5 build 00:05:21 39.18 GiB 1541.6% 16.4%
[04] 00:17:07      www/firefox | firefox-133.0,2   build 00:15:00 37.93 GiB   91.8%  6.2%
[07] 00:17:07         lang/ghc | ghc-9.6.6_1       build 00:09:55 38.98 GiB  159.2%  2.4%

For what it's worth, I'm almost sure that I didn't observe such numbers using the config A.

How to reproduce

Build devel/electron32 using the A and B configurations.

Expected behavior

  1. A successful build in both cases.
  2. Real TMPFS usage.

Environment

Host memory 64 GiB
Host OS version 14.1 amd64
Jail OS version 14.1 amd64
Poudriere version git-3.4.99.20240811
Ports branch latest

Additional context

Configuration A

USE_TMPFS=all
TMPFS_LIMIT=8
TMPFS_BLACKLIST="rust llvm* electron* ghc* firefox"
TMPFS_BLACKLIST_TMPDIR=${BASEFS}/data/cache/tmp
# MAX_MEMORY isn't set

Configuration B

USE_TMPFS="wrkdir data localbase"
TMPFS_LIMIT=8
TMPFS_BLACKLIST="rust llvm* electron* ghc* firefox"
TMPFS_BLACKLIST_TMPDIR=${BASEFS}/data/cache/tmp
# MAX_MEMORY isn't set

The difference is only in the value of USE_TMPFS.

@bileslav bileslav added the bug label Nov 21, 2024
@bdrewery
Copy link
Member

bdrewery commented Dec 9, 2024

@bileslav How much space do you have on the filesystem? I am guessing that the port build is filling on /tmp in the jail which lands on your host ZFS/UFS.


From just reviewing the code I see some problems.

It looks like there are several places that check ${TMPFS_ALL} -eq 1 which do not consider the individual options as an alternative. I think ${TMPFS_ALL} needs to be only checked in 1 place (to enable the smaller flags).

I think the real problem is that we don't have a USE_TMPFS=builder as implied by USE_TMPFS=all doc:

# all       - Run the entire build in memory, including builder jails.

We only have wrkdir, data, and localbase, but no base/builder. And tmpdir apparently.

@bdrewery bdrewery self-assigned this Dec 9, 2024
@bdrewery bdrewery added this to the 3.5.0 milestone Dec 9, 2024
@bileslav
Copy link
Author

@bdrewery,

How much space do you have on the filesystem? I am guessing that the port build is filling on /tmp in the jail which lands on your host ZFS/UFS.

1T, only half occupied. I use ZFS.

We only have wrkdir, data, and localbase, but no base/builder. And tmpdir apparently.

Yes, I also thought about that.

Just in case, I want to point out that I put electron* to TMPFS_BLACKLIST in both configurations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants