Skip to content

Move to Debian Bookworm + refresh compiler matrix + isolate v2.6 (cgroupv2)#29

Open
Harishkrishna17 wants to merge 4 commits into
judge0:masterfrom
talview:feat/bookworm-base-and-isolate-v2-cgroupv2
Open

Move to Debian Bookworm + refresh compiler matrix + isolate v2.6 (cgroupv2)#29
Harishkrishna17 wants to merge 4 commits into
judge0:masterfrom
talview:feat/bookworm-base-and-isolate-v2-cgroupv2

Conversation

@Harishkrishna17

Copy link
Copy Markdown

Summary

Two changes bundled in one PR (they ride together — bookworm base unblocks newer toolchains, isolate v2.6 unblocks cgroupv2 hosts):

  1. Base image bumped from judge0/buildpack-deps:buster-2019-12-28buildpack-deps:bookworm. Debian Buster reached EOL on 2024-06-30 and the deb.debian.org/debian buster repos are gone, so the existing image can no longer be cleanly rebuilt without rewriting sources.list at every layer.
  2. isolate swapped from judge0/isolate@ad39cc4 (cgroupv1-only fork) → upstream ioi/isolate v2.6 (cgroupv2-only since v2.0). This lets Judge0 run on modern hosts where cgroupv1 is no longer mounted (AKS Ubuntu 22.04, RHEL 9, Fedora 39+, etc.).

Compiler version refresh (latest stable as of 2026-05)

Every language in the matrix was bumped to its current upstream stable while keeping all language paths discoverable so the API surface (db/languages/active.rb in the consumer image) can move one at a time. Highlights:

Language Old New
GCC (C/C++/Fortran) 7.4 / 8.3 / 9.2 14.2 (kept 9.2 alongside for back-compat)
Python 2.7.17 / 3.8.1 3.12.9 added
Node.js 12.14.0 22.x LTS
Ruby 2.7.0 3.3.7
Go 1.13.5 1.24.x
Rust 1.40.0 1.87.0
Java (JDK) (implicit via openjdk) 21 LTS
Kotlin 1.3.70 2.0.21
PHP 7.4.1 8.3
Erlang/OTP 22.2 27.3
Elixir 1.9.4 1.18.3
OCaml 4.09.0 5.2.0
Haskell (GHC) 8.8.1 9.6.6
GNU Prolog 1.4.5 1.5.0
GnuCOBOL 2.2 3.2
Lua 5.3.5 5.4.7
TypeScript 3.7.4 5.4
NASM 2.14.02 2.16.03
FreeBASIC 1.07.1 1.10.1
D (DMD) 2.089.1 2.109.1
Octave 5.1.0 9.2.0
Bash 5.0 5.2.21
Mono 6.6.0.161 6.12.0.206 (upstream final)
FPC (Pascal) 3.0.4 3.2.2

Each tests/<lang>/lang.properties is updated to match.

isolate v2.6 specifics

  • /usr/local/etc/isolate ships with cg_root = /sys/fs/cgroup/isolate, first_uid = 60000, first_gid = 60000, syscall_flags = 0, and num_boxes = 2147483647. The wide num_boxes range matches Judge0's box_id = submission.id % 2147483647 derivation — v1's default num_boxes = 1000 would silently fail any submission whose id > 1000 with "Sandbox ID out of range".
  • Build deps added: libseccomp-dev, libsystemd-dev, asciidoc, docbook-xml, docbook-xsl, xsltproc, pkg-config.
  • Setuid isolate binary installed at /usr/local/bin/isolate (mode 4755), plus isolate-cg-keeper and isolate-check-environment.

Consumer-side changes required

The matching consumer-image PR (cgroupv2 entrypoint setup + isolate-v2-compatible flags + memory-metric fallback for kernel < 5.19) is opened against judge0/judge0 — see linked PR there. They can be reviewed independently but should be released together.

Verification

  • Image builds cleanly from buildpack-deps:bookworm on x86_64.
  • All tests/<lang>/lang.properties hello-worlds run green inside the image (same harness as today).
  • Deployed in production at compiler.talview.com (Talview's Judge0 instance). 9-language smoke run after deploy: 9/9 Accepted, memory metric populated (max-rss fallback on kernel 5.15).

Notes for maintainers

  • This carries Talview SRE-3107 (bookworm bump) and SRE-3142 (isolate v2.6) and is already in production at Talview as talview.azurecr.io/judge0-compilers:bookworm-20260528-2285831 and overlay tags.
  • Happy to split into two PRs if preferred (bookworm refresh first, isolate v2.6 second) — kept together here since neither makes sense without the other on modern hosts.

Harishkrishna17 and others added 4 commits May 26, 2026 12:49
… versions

Re-baseline the Talview Judge0 compilers image:

- Base: judge0/buildpack-deps:buster-2019-12-28 -> buildpack-deps:bookworm
  Buster reached EOL 2024-06; Bookworm ships glibc 2.36 + gcc-12, which are
  sufficient hosts for every modern toolchain installed below.
- Drop the archive.debian.org sources.list workaround (no longer needed
  on a maintained base).

Compiler bumps (latest stable):
  GCC          7.4.0/8.3.0/9.2.0 -> 14.2.0
  Ruby         2.7.0             -> 3.3.7
  Python       2.7.17/3.8.1      -> 3.12.9      (2.7 dropped; reachable via apt python2.7)
  Octave       5.1.0             -> 9.2.0
  OpenJDK      13.0.1            -> 21.0.5  (LTS)
  Bash         5.0               -> 5.2.21
  FPC          3.0.4             -> 3.2.2
  GHC          8.8.1             -> 9.6.6
  Mono         6.6.0.161         -> 6.8.0.105   (bookworm apt; upstream EOL)
  Node.js      12.14.0           -> 22.15.0
  Erlang/OTP   22.2              -> 27.3
  Elixir       1.9.4             -> 1.18.3
  Rust         1.40.0            -> 1.87.0
  Go           1.13.5            -> 1.24.3      (go.dev/dl)
  FreeBASIC    1.07.1            -> 1.10.1
  OCaml        4.09.0            -> 5.2.0
  PHP          7.4.1             -> 8.3.19
  DMD          2.089.1           -> 2.109.1
  Lua          5.3.5             -> 5.4.7
  TypeScript   3.7.4             -> 5.4.5       (via Node 22)
  NASM         2.14.02           -> 2.16.03
  GNU Prolog   1.4.5             -> 1.5.0
  SBCL         2.0.0             -> 2.4.6
  GnuCOBOL    2.2                -> 3.2
  Swift        5.2.3             -> 5.10.1      (Ubuntu 22.04 tarball — ABI-compatible)
  Kotlin       1.3.70            -> 2.0.21
  Clang        7                 -> 14          (bookworm apt)
  R            4.0.0             -> 4.4.2
  Scala        2.13.2            -> 3.4.2
  Clojure      1.10.1            -> 1.11.4      (built with Maven 3.9.6 from archive.apache.org)
  .NET SDK     3.1.202           -> 8.0.404 (LTS)
  Groovy       3.0.3             -> 4.0.24      (archive.apache.org; dl.bintray.com sunset)

Also update tests/<lang>/lang.properties so generate_json.py emits the new
VERSIONS strings. Clang tests now reference clang-14 instead of clang-7;
objective-c gcc include path bumped from gcc/8 to gcc/12 to match bookworm.

Net effect on /languages: 46 entries -> 41 (collapsed 3x GCC + 2x Python
multi-version pins into a single current version each). Legacy GCC and
Python language IDs from db/languages/active.rb will be repointed to the
new install paths in the talview/judge0 follow-up PR so historical
submission FK rows remain valid.

Refs SRE-2962, IR-2665.
…bump

chore(SRE-3107): migrate to Debian Bookworm base and bump all 30 language versions
Replace the 2021-era judge0/isolate@ad39cc4 fork (cgroupv1-only) with
upstream ioi/isolate v2.6, which is cgroupv2-only and required for
running on standard AKS nodepools (Ubuntu 22.04 / cgroupv2).

- Add libseccomp-dev (v2.4+ syscall filter), libsystemd-dev, asciidoc +
  docbook deps so the binary build doesn't need network DTDs.
- Build isolate, isolate-cg-keeper, isolate-check-environment by hand
  (skip 'make install' to avoid pulling in the manpage targets).
- Ship /usr/local/etc/isolate config with manual cg_root delegation
  (no systemd in container), uid/gid range, num_boxes, and
  syscall_flags=0 to disable the v2.4+ seccomp filter (Go's build cache
  trim relies on F_OFD_SETLK).
- Bump LABEL version to 2.1.0.

Verified locally on a cgroupv2 docker host: 8 languages run hello-world
with judge0 wait=true (Python 3.12, Java 21, Go 1.24, C++ GCC 14,
Rust 1.87, Ruby 3.3, Kotlin 2.0, Bash 5).
feat(SRE-3142): swap to upstream isolate v2.6 for cgroupv2 support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant