fix(ci): resolve cgroup v2 crash by replacing defunct run-buck action… - #151
fix(ci): resolve cgroup v2 crash by replacing defunct run-buck action…#151arnabnandy7 wants to merge 2 commits into
Conversation
… with JDK 11 The CI build was failing with a NullPointerException in CgroupV2Subsystem.getInstance() because the passy/run-buck GitHub Action uses an unmaintained Docker image (Ubuntu 18.04 + JDK 8) that is incompatible with cgroup v2 on the updated Ubuntu 24.04 runners. Changes: - Replace passy/run-buck@v0.1.0 Docker action with inline steps using thyrlian/android-sdk container and OpenJDK 11 (proper cgroup v2 support) - Upgrade actions/checkout from v2 to v4 (fixes Node.js 20 deprecation warnings) - Replace defunct jcenter.bintray.com Maven repo with Maven Central in .buckconfig
@hiSandog Thanks for the review! Agreed on both points. I'll add a step to log/detect the cgroup mode explicitly so future failures are easier to trace, and follow up with a smoke test verifying the restored setup actually hits cache/toolchain rather than silently falling back. Will push both in a follow-up commit shortly. |
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
|
@michalgr @helfper @shreerag-meta @VladimirMakaev please review |
Problem
The CI build is failing on every push with a
NullPointerExceptionduring Buck startup:Buck encountered an internal error java.lang.NullPointerException at jdk.internal.platform.cgroupv2.CgroupV2Subsystem.getInstance(CgroupV2Subsystem.java:81) at jdk.internal.platform.CgroupSubsystemFactory.create(CgroupSubsystemFactory.java:108) ... at com.facebook.buck.util.environment.DefaultExecutionEnvironment.getTotalMemory(...)Root Cause
The GitHub Actions runner recently upgraded to Ubuntu 24.04, which exclusively uses cgroup v2. The workflow uses the
passy/run-buck@v0.1.0Docker action, which bundles an unmaintained Docker image based on Ubuntu 18.04 + OpenJDK 8. JDK 8's backported cgroup v2 support is buggy — it throws aNullPointerExceptionwhen Buck tries to query system memory metrics viaManagementFactory.getOperatingSystemMXBean().Both
buck fetchandbuck buildcrash immediately on startup, before any compilation occurs.Changes
.github/workflows/build.ymlpassy/run-buck@v0.1.0(unmaintained, last updated 2019) with inline workflow steps using thethyrlian/android-sdkcontainer imageactions/checkoutfrom v2 to v4 — v2 was triggering Node.js 20 deprecation warnings on the latest runners.buckconfigjcenter.bintray.comwith Maven Central (repo1.maven.org/maven2) — JCenter was shut down in February 2021, sobuck fetchwould fail to download dependencies even after the cgroup fixTesting