The good news this week is that day10 now downloads each source archive just once on each host. Otherwise, the week was mostly about getting OCaml 4.14.5 out to the workers and comparing what’s in the OBuilder and day10 base images, until a crawler made ocaml.org very slow on Sunday afternoon.
day10 #
A download cache #
On opam-repository #31319, the colibri2 release, almost every day10 job failed with curl exit 6, while OBuilder passed. The error message in the log was very misleading, as it reported the failed download in a container without networking, masking the HTTP 503 that git.frama-c.com had returned, and the opam.ocaml.org cache fallback returned 404 for the unpublished package.
I’ve mentioned this issue before; the CI system attempts to download the same file for 18 distributions x 2 compiler variants concurrently from a single source IP address. OBuilder runs with the same matrix, but the round-robin allocation of work across the pool of machines distributes the load. My solution was to implement mtelvers/fetcher for opam to use via the convenient OPAMFETCH environment variable, but I had never deployed it. This tool coalesced concurrent fetches and cached the results.
With the offline build mechanism added last week, fetcher was no longer needed. Instead, I could use a simple lock file to block other processes while exactly one ran OpamDownload.download_as. If the download fails, then the error can be written to the log, and the layer not cached, allowing a retry to meaningfully happen.
Testing across macOS, FreeBSD and Windows found a race condition on macOS: two processes creating the same two-character prefix directory crashed with “File exists”. With the fix, the macOS test went from 25 crashes in 60 runs to 0 in 120, and a direct stress test on Linux went from 656 failures out of 800 to 0. While testing, I also noticed that the Linux and Windows layers were each keeping a copy of opam’s own download cache, so those are now excluded.
Within a few hours, 2,457 builds had taken their source from the cache. On doris, 1,107 builds needed only 10 downloads, and the colibrics archive, which started all this, is used by 782 layers on doris and was downloaded once.

Builds needing a source archive against archives actually downloaded, per worker, after the first 8 hours
What’s in a base image? #
When a package passes on OBuilder but fails on day10, or vice versa, the first question is often whether the base images differ. I had an outstanding action to put these two in sync. I started by comparing the packages installed in each day10 base on doris with those in the matching ocaml/opam image across 17 platforms. On Debian and Ubuntu, they are close, but on Fedora, CentOS, and openSUSE, they are far apart because OBuilder installs entire package groups.
| Platform | Only in OBuilder | Only in day10 |
|---|---|---|
| Debian 12/13/testing/unstable, Ubuntu 22.04/24.04 | libcap-dev libx11-dev libzstd-dev nano (plus X11 dependencies) |
|
| Ubuntu 26.04/26.10 | the same, plus GNU coreutils | uutils coreutils, and on 26.04 build-essential, which the OBuilder image lacks |
| Alpine 3.24 | zstd-dev libx11-dev ncurses-dev nano, which pull in pkgconf and python3 |
diffutils bzip2 unzip |
| Arch | libx11 nano |
which |
| Fedora 43/44/45 | the c-development group (autoconf automake bison byacc flex libtool gdb strace valgrind ccache perf…), plus libX11-devel libzstd-devel nano |
openssl |
| CentOS 9/10 | the Development Tools group, which pulls in hundreds of packages, including Java, GTK3, PipeWire and Mesa on CentOS 9 |
EPEL, openssl |
| openSUSE 16.0/Tumbleweed | the devel_C_C++ and devel_basis patterns, plus libcap-devel libX11-devel libzstd-devel bubblewrap |
zstd is an interesting omission, as OCaml 5.1 and later detect it during the configure script and enable compressed marshalling. The other is GNU coreutils on Ubuntu 25.10 and later, which OBuilder swaps in because the uutils install breaks OCaml before 4.12.
I wondered why OBuilder had the packages it did, so I checked the git history of ocaml-dockerfile.
| Package | Added | Reason given |
|---|---|---|
libx11-dev |
2014 | none at the time, later described as for graphics, which left the compiler in 4.09 |
nano |
2016 | “to satisfy opam pin going interactive” |
ncurses-dev (Alpine) |
2016 | “needed as an ocaml compiler dependency for custom bytecode” |
Development Tools (CentOS) |
2014 | none |
libcap-dev |
2018 | for building bubblewrap |
c-development (Fedora) |
2023 | “lighter than the big set” |
| zstd | 2023 | OCaml 5.1 marshal compression |
| GNU coreutils (Ubuntu) | 2026 | uutils install breaks OCaml < 4.12 (my own commit) |
Honestly, the day10 lists feel as random as the ocaml-dockerfile ones. A set per OCaml version would be nice, but it doesn’t play well with a base image which comes first and is reused across compilers. What I’d like is the minimal set of packages needed to satisfy opam, build-essential plus any required extras, as that’s what a typical user would have. opam 2.6 itself only requires curl or wget, tar and unzip, and recommends make and a C compiler. The proposal is a per-distribution baseline (build-essential, build-base, base-devel, or gcc gcc-c++ make), plus whatever building the compilers proves necessary, and zstd everywhere. I need to do more testing here to determine which packages will break under a given decision.
why3find and -j 7 #
why3find.1.3.1 failed on day10 macOS only, with two proofs in mergesort failing. Initially, I misread this to be a knife-edge timing: mergesort took 0.984 s against a 1 s limit. However, the real problem was that day10 set OPAMJOBS from the host’s 8 cores, while each macOS VM only has 4 vCPUs. With the worker paused, I ran it four times at each setting: -j 4 passed every time and -j 7 failed every time. day10 now reads the CPU count from the VM image’s configuration, c81efd7.
HOME on Windows #
On parseff, the Windows test jobs failed with git complaining unable to access '//.config/git/config': Permission denied, which also hid the cram test diffs. day10 sets HOME on Linux, FreeBSD and macOS, but not on Windows, so Cygwin fell back to /. This is now set to C:\Users\ContainerAdministrator in b90faf5. This cleared the //.config errors, and the diffs reappeared.
Base image freshness #
On Sunday, I rebuilt my local day10 cache for the Ubuntu 24.04 base, but within hours I saw conf-sqlite3 fail with a 404 for libsqlite3-dev. The rebuild had simply replayed Docker’s build cache, including apt update, so the “new” base had the apt index from 22 November. docker build --pull only refreshes the FROM image, which feels like what you want, but those images only move every month, so FROM/RUN apt update could be cached for three to four weeks.
The base is now built with --no-cache, ac27c52. The workers which rebuild their bases automatically every 7 days were probably replaying the cache too.
OCaml 4.14.5 #
Last week I updated the base image builder for OCaml 4.14.5 and openSUSE Leap 16.1, so on Sunday it was time to roll it out everywhere.
- ocaml-ci#1086 and opam-repo-ci#498 bump ocaml-version and ocaml-dockerfile. Both were merged, and the
day10branches were rebased onto them. - FreeBSD: a one-line change in freebsd-infra#30, then rosemary was rebuilt.
- OpenBSD: a new 4.14.5 image on oregano, swapped in with the pool paused for about a minute (obuilder#227). 756 cached results built on the old image were retired, which freed 310 GB.
- macOS: m1-worker-01 to -03 were rebuilt. macos-infra#67
ocaml.org and a crawler #
On Sunday afternoon, my monitor alerted that ocaml.org was slow. The load average on the server was 390, with about 20,000 TLS connections from about 5,500 IP addresses. 93% of the requests were for /ocaml-planet, with different combinations of author, keyword, source, and year filters, each using an old Chrome user agent. Every URL was unique, so every request missed the cache.
The planet’s keyword search (#3907) is a fine feature for people, but each filtered page links to about 160 more filter combinations, and unknown values, zero-result combinations, case and ordering all create yet more URLs. A crawler following links will never finish. A one-line Varnish rule now returns 429 for planet URLs with four or more filters. Within four minutes, the load was down to 19, and later to about 3. The crawler kept going at about 900 requests per second, but now they are refused cheaply.
The proper fix is ocaml.org#4077, which canonicalises filter URLs with a redirect, caps the number of selections, and adds nofollow and noindex.
Cambridge machines #
hipp #
Following the CVE updates and the updated list of machines, hipp was reinstalled and repurposed for some spatial search work.
32-bit OCaml #
The arm32-multicore nightly failed on 26 November on a rebase conflict in asmcomp/power/emit.mlp, following upstream’s POWER subf change and VSX work. The conflicts were resolved the same afternoon.