Skip to content

Conversation

@pmenzel
Copy link
Collaborator

@pmenzel Paul Menzel (pmenzel) commented Oct 13, 2026 •

Tested on sigusr2 (Nvidia) and maleficent (amdgpu).

@pmenzel Paul Menzel (pmenzel) force-pushed the update-firefox-from-157.0-to-157.0.1 branch from e483b52 to 3650772 Compare October 13, 2026 21:34
https://www.firefox.com/en-US/firefox/157.0.1/releasenotes/

The source archive matches Mozilla’s SHA256SUMS
(483bedee9059df2479e4531c443b1073c6ebaed3570bda0c164eb562ee241c4c).

Assisted-by: claude-opus-5.5 (Claude Code)
A bee-mxqsub build on a full 256-processor node with `-t 15m` is killed
while linking the Rust part of libxul:

     9:35.75    Compiling gkrust-shared v0.1.0 (…/toolkit/library/rust/shared)
    13:09.84    Compiling gkrust v0.1.0 (…/toolkit/library/rust)
    /home/pmenzel/bee-files/scripts/bee-mxqsub: line 1: 244337 CPU time limit exceeded (core dumped) ${sandbox[@]+"${sandbox[@]}"} fakeroot beesh "${beesh_args[@]}" "${beefile}"

    job_threads=256 job_time=900s max_utime=24991 max_real=910

The node is busy only 11 % of the time (24991 s CPU in 910 s on 256
processors). The release source archive defaults to `--enable-release`,
so `config/makefiles/rust.mk` passes `-Clto` (fat LTO) to gkrust, which
runs on a single core for over ten minutes.

`--enable-lto=cross`, which Mozilla’s official Linux builds use, drops
`-Clto` and instead runs ThinLTO over the C++ and Rust code while linking
libxul, using all processors. It needs rustc and clang to share the LLVM
major version, which holds: rustc 1.97.0 uses LLVM 22.1.6, and the
bootstrapped clang is 22.1.8.

Timings of `mach build` with this recipe's mozconfig on full MXQ nodes
(job group firefox-build-time):

                         gkrust          mach build   CPU used
    without (baseline)   9:22 → 19:56    20:49        22 cores
    --enable-lto=cross   8:26 → 8:28     11:19        41 cores

With `mach install` the job takes 11:34. The ThinLTO link of libxul takes
about two minutes and peaks at 53 GB RSS.

Assisted-by: claude-opus-5.5 (Claude Code)
…ang's libraries

The bootstrapped clang loads the system libclang-cpp instead of its own
copy:

     2:07.27 checking whether the target C compiler can be used... …/build/mozbuild/clang/bin/clang: /usr/lib/libclang-cpp.so.22.1: no version information available (required by …/build/mozbuild/clang/bin/clang)
     3:09.23 W …/build/mozbuild/clang/bin/clang: /usr/lib/libclang-cpp.so.22.1: no version information available (required by …/build/mozbuild/clang/bin/clang)

bee-mxqsub runs beesh under fakeroot, which sets LD_LIBRARY_PATH to
`/usr/lib:/usr/lib64/libfakeroot:/usr/lib32/libfakeroot` followed by the
caller’s value. The dynamic loader searches LD_LIBRARY_PATH before
DT_RUNPATH, so `/usr/lib` wins over the clang’s `$ORIGIN/../lib`. It
only works because both copies are 22.1.x; a system LLVM of another
minor version would break the build or miscompile.

The rustc profile is not the cause. The same clang 22.1.8 with the same
profile, but without fakeroot, as in the firefox-build-time timing runs,
shows no warning, and under fakeroot the warning appears with or without
the profile.

Removing `/usr/lib` from LD_LIBRARY_PATH fixes it and keeps fakeroot
working, because `libfakeroot.so` lies in `/usr/lib`, which the loader
searches by default anyway. Checked by running `mee_configure()` under
fakeroot: clang 22.1.8 starts without the warning, and chown(2) in a
child process is still faked.

Assisted-by: claude-opus-5.5 (Claude Code)
Even with cross-language ThinLTO, the bee-mxqsub build on a full
256-processor node with `-t 15m` is killed, now while packaging after
libxul is linked:

    11:18.27 toolkit/library/build/libxul.so
    13:21.72 ipc/app/plugin-container
    14:38.60 E make[2]: *** Waiting for unfinished jobs....
    /home/pmenzel/bee-files/scripts/bee-mxqsub: line 1: 222979 CPU time limit exceeded (core dumped) ${sandbox[@]+"${sandbox[@]}"} fakeroot beesh "${beesh_args[@]}" "${beefile}"

bee-mxqsub runs beesh under fakeroot, so every process of `mach build`
inherits `LD_PRELOAD=libfakeroot.so`, and their stat, chmod and chown
calls are all served by the one faked daemon. This slows down the
file-heavy parts of the build: Python code generation, cargo checking
the vendored crates, and the final copying into `dist/`.

Timings of the same `mach build` (with `--enable-lto=cross`) on full
MXQ nodes (job group firefox-build-time):

                                  configured  gkrust-shared  libxul  total
    fakeroot (like bee-mxqsub)    2:44        8:41           11:18   17:37
    fakeroot, without LD_PRELOAD  2:23        6:02            8:41   11:34
    no fakeroot                   2:04        5:35            8:38   11:30

The bee log above matches the first row (2:38, 8:41, 11:18).

The build directory does not need faked ownership. `mach install`,
which fills the image directory, still runs under fakeroot, and with
`FAKED_MODE=unknown-is-root` the files created outside of fakeroot are
reported as owned by root, too.

Assisted-by: claude-opus-5.5 (Claude Code)
@pmenzel Paul Menzel (pmenzel) force-pushed the update-firefox-from-157.0-to-157.0.1 branch from 3650772 to 36c9244 Compare October 14, 2026 16:24
@pmenzel Paul Menzel (pmenzel) merged commit cb19495 into master Oct 14, 2026
@pmenzel Paul Menzel (pmenzel) deleted the update-firefox-from-157.0-to-157.0.1 branch October 14, 2026 16:26
Sign in to join this conversation on GitHub.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant