GH-49767: [CI][C++] Disable mold on Ubuntu 24.04 to work around mold#1247#50033
GH-49767: [CI][C++] Disable mold on Ubuntu 24.04 to work around mold#1247#50033tadeja wants to merge 4 commits into
Conversation
|
|
There was a problem hiding this comment.
Pull request overview
Updates the C++ ODBC Linux CI container command to install a newer mold linker version to avoid an intermittent pre-main() segfault in the ODBC job attributed to a known bug in Ubuntu 24.04’s packaged mold.
Changes:
- Add
MOLD_URLto theubuntu-cpp-odbcservice environment for a pinnedmold.debdownload. - Download/install the pinned
moldpackage at container runtime before running the existing C++ build + ODBC registration + test steps.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /bin/bash -c " | ||
| curl -fsSL $$MOLD_URL -o /tmp/mold.deb && | ||
| sudo apt-get update && | ||
| sudo apt-get install -y /tmp/mold.deb && | ||
| ld.mold --version && | ||
| /arrow/ci/scripts/cpp_build.sh /arrow /build && | ||
| sudo /arrow/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh /usr/local/lib/libarrow_flight_sql_odbc.so && | ||
| /arrow/ci/scripts/cpp_test.sh /arrow /build" |
| curl -fsSL $$MOLD_URL -o /tmp/mold.deb && | ||
| sudo apt-get update && | ||
| sudo apt-get install -y /tmp/mold.deb && |
|
Wow! Good catch! How about just disabling mold on Ubuntu 24.04? diff --git a/ci/docker/ubuntu-24.04-cpp.dockerfile b/ci/docker/ubuntu-24.04-cpp.dockerfile
index 074301b472..2cfc8be6ff 100644
--- a/ci/docker/ubuntu-24.04-cpp.dockerfile
+++ b/ci/docker/ubuntu-24.04-cpp.dockerfile
@@ -176,6 +176,11 @@ RUN /arrow/ci/scripts/install_sccache.sh unknown-linux-musl /usr/local/bin
# provided by the distribution:
# - Abseil is old and we require a version that has CRC32C
# - opentelemetry-cpp-dev is not packaged
+#
+# Don't use mold 2.30.0 on Ubuntu 24.04. It has a bug in section placement:
+# - https://github.com/rui314/mold/issues/1247
+# - https://github.com/apache/arrow/issues/49767
+# - https://github.com/apache/arrow/pull/50033
ENV absl_SOURCE=BUNDLED \
ARROW_ACERO=ON \
ARROW_AZURE=ON \
@@ -197,7 +202,7 @@ ENV absl_SOURCE=BUNDLED \
ARROW_SUBSTRAIT=ON \
ARROW_USE_ASAN=OFF \
ARROW_USE_CCACHE=ON \
- ARROW_USE_MOLD=ON \
+ ARROW_USE_MOLD=OFF \
ARROW_USE_UBSAN=OFF \
ARROW_WITH_BROTLI=ON \
ARROW_WITH_BZ2=ON \(We may want to measure build times with/without mold. If mold reduces much build time, we may want to install recent mold manually.) |
|
Approach changed to My earlier approach on fork using ARROW_USE_MOLD: "OFF" in compose.yaml section of ubuntu-cpp-odbc resulted in fast re-runs : here 1st, 2nd and 3rd attempt in less than 5min 'Execute Docker Build' but probably due to successful ccache hits. Currently Github Actions are down, hence all the new CI failures - https://www.githubstatus.com/incidents/gnftqj9htp0g |
Rationale for this change
Fixes #49767 - intermittent SIGSEGV in the ODBC Linux CI job, the crash occurs during
_dl_relocate_objectbeforemain(): #49767 (comment)apt ships mold 2.30.0 on Ubuntu 24.04 'Noble Numbat'.
mold 2.30.0 has a non-determinism bug in section placement that causes this crash (rui314/mold#1247). Fixed upstream in mold 2.31.0.
What changes are included in this PR?
Disable mold on Ubuntu 24.04 in
ubuntu-24.04-cpp.dockerfileby settingARROW_USE_MOLD=OFF.Re-enable if apt mold reaches 2.31+ - note that Ubuntu 24.04 'Noble Numbat' might never update to 2.31+ https://launchpad.net/ubuntu/noble/+source/mold - its mold release is over 2 years old.
A follow-up issue tracking apt mold updates and other CI jobs using mold (more added with #49898/#49899) will be opened separately.
Are these changes tested?
Yes, ODBC Linux job runs complete successfully on fork: 1st, 2nd , 3rd , 4th
Are there any user-facing changes?
No.