You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "jackylee-ch (via GitHub)" <gi...@apache.org> on 2026/07/18 15:44:51 UTC

[PR] [VL][CI] Fix Spark 4.1 CI crash by moving tests back to CentOS 8 [gluten]

jackylee-ch opened a new pull request, #12557:
URL: https://github.com/apache/gluten/pull/12557

   ## What changes were proposed in this pull request?
   
   The `spark-test-spark41` / `spark-test-spark41-slow` jobs in `Velox Backend (x86)` have been failing **consistently** (exit 134 / SIGABRT) since the mid-July GitHub-hosted runner image rollout (tracked in #12534). The forked Surefire JVM crashes with SIGSEGV during Velox backend initialization, before the first native test (`ColumnarBatchTest`) even runs:
   
   ```
   # C  [libgluten.so+0xdb73a4]  std::__codecvt_utf16_base<char16_t>::do_unshift(...)+0x4
   # siginfo: si_code: SEGV_MAPERR, si_addr: 0x0000000000000030
   Java frames:
    org.apache.gluten.init.NativeBackendInitializer.initialize(...)
    org.apache.gluten.backendsapi.velox.VeloxListenerApi.onExecutorStart(...)
    org.apache.gluten.test.VeloxBackendTestBase.setup()
   ```
   
   `addr2line` against the CI native artifact resolves the faulting frame to the **statically-linked libstdc++ (gcc 13.2) locale/codecvt facet** path, reached via `std::ostream::_M_insert<long>`.
   
   ### Root cause
   
   The crash only reproduces inside the `apache/gluten:centos-9-jdk17` container (glibc 2.34 + system `libstdc++.so.6.0.29`), in combination with the centos-7/gcc13 statically-linked native libraries and the new runner image. Under the same native artifact, `spark-test-spark33` … `spark-test-spark40` (which run in the `centos-8` image) stay green — so this is not a code regression from any recently merged PR, but an environment issue specific to the `centos-9` container image.
   
   ### Fix
   
   Move the two Spark 4.1 jobs back to `apache/gluten:centos-8-jdk17` — the same image used by the (green) Spark 4.0 jobs. Because CentOS 8 does not package Python >= 3.10 (required by the Spark 4.1 python UDF tests), Python 3.11 is installed via miniconda in the `Prepare` step.
   
   ## How was this patch tested?
   
   Validated on a debug branch that trims the workflow to only the affected jobs. With the container switched to `centos-8-jdk17` + miniconda Python 3.11:
   
   - `spark-test-spark41` — **success** (the crash is gone; `arrow batched python udf over parquet scan` and the full backends-velox / gluten-ut suite pass)
   - `spark-test-spark41-slow` — **success**
   
   Run: https://github.com/jackylee-ch/gluten/actions/runs/29644190820
   
   Closes #12534


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL][CI] Fix Spark 4.1 CI crash: isolate libgluten's bundled libstdc++ [gluten]

Posted by "jackylee-ch (via GitHub)" <gi...@apache.org>.
jackylee-ch merged PR #12557:
URL: https://github.com/apache/gluten/pull/12557


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL][CI] Fix Spark 4.1 CI crash by moving tests back to CentOS 8 [gluten]

Posted by "philo-he (via GitHub)" <gi...@apache.org>.
philo-he commented on PR #12557:
URL: https://github.com/apache/gluten/pull/12557#issuecomment-5014711283

   @jackylee-ch, do you mean CentOS-7-built Velox static lib hitting an incompatibility issue on Centos-9 at runtime? The `apache/gluten:centos-9-jdk17` docker has been used for Spark 4.1 for a long time. Curious what Velox code changes make this issue happen recently.
   
   The PR looks good as a quick fix. Not sure if we still have strong reason to use Centos 9 for Spark 4.1 tests (introduced by https://github.com/apache/gluten/pull/11519). cc @zhouyuan 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL][CI] Fix Spark 4.1 CI crash by moving tests back to CentOS 8 [gluten]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #12557:
URL: https://github.com/apache/gluten/pull/12557#discussion_r3608669529


##########
.github/workflows/velox_backend_x86.yml:
##########
@@ -1207,10 +1207,13 @@ jobs:
           path: ./cpp/build/
       - name: Prepare
         run: |
-          dnf install -y python3.11 python3.11-pip python3.11-devel && \
-          ls -la /usr/bin/python3.11 && \
-          alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \
-          alternatives --set python3 /usr/bin/python3.11 && \
+          # Spark 4.1 python UDF tests require Python >= 3.10, which is not
+          # packaged for CentOS 8; install it via miniconda instead.
+          curl -fsSL -o /tmp/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py311_24.7.1-0-Linux-x86_64.sh && \
+          bash /tmp/miniconda.sh -b -p /opt/miniconda3 && \
+          ln -sf /opt/miniconda3/bin/python3.11 /usr/bin/python3 && \
+          ln -sf /opt/miniconda3/bin/pip3 /usr/bin/pip3 && \
+          python3 --version && \
           pip3 install setuptools==77.0.3 && \
           pip3 install pyspark==3.5.5 cython && \
           pip3 install pandas==2.2.3 pyarrow==20.0.0

Review Comment:
   Avoid mutating global /usr/bin/python3 and /usr/bin/pip3 via symlinks. This can have hard-to-debug side effects on other tooling in the container (and is unnecessary here). Prefer invoking the Miniconda Python directly (python -m pip) for installs and version checks.



##########
.github/workflows/velox_backend_x86.yml:
##########
@@ -1207,10 +1207,13 @@ jobs:
           path: ./cpp/build/
       - name: Prepare
         run: |
-          dnf install -y python3.11 python3.11-pip python3.11-devel && \
-          ls -la /usr/bin/python3.11 && \
-          alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \
-          alternatives --set python3 /usr/bin/python3.11 && \
+          # Spark 4.1 python UDF tests require Python >= 3.10, which is not
+          # packaged for CentOS 8; install it via miniconda instead.
+          curl -fsSL -o /tmp/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py311_24.7.1-0-Linux-x86_64.sh && \
+          bash /tmp/miniconda.sh -b -p /opt/miniconda3 && \

Review Comment:
   The workflow downloads and executes the Miniconda installer directly from the internet. For supply-chain safety, add an integrity check (e.g., pinned SHA-256 verification) before executing the script.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL][CI] Fix Spark 4.1 CI crash: isolate libgluten's bundled libstdc++ [gluten]

Posted by "jackylee-ch (via GitHub)" <gi...@apache.org>.
jackylee-ch commented on PR #12557:
URL: https://github.com/apache/gluten/pull/12557#issuecomment-5017953929

   cc @zhouyuan @philo-he 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL][CI] Fix Spark 4.1 CI crash: isolate libgluten's bundled libstdc++ [gluten]

Posted by "jackylee-ch (via GitHub)" <gi...@apache.org>.
jackylee-ch commented on code in PR #12557:
URL: https://github.com/apache/gluten/pull/12557#discussion_r3610292462


##########
.github/workflows/velox_backend_x86.yml:
##########
@@ -1207,10 +1207,13 @@ jobs:
           path: ./cpp/build/
       - name: Prepare
         run: |
-          dnf install -y python3.11 python3.11-pip python3.11-devel && \
-          ls -la /usr/bin/python3.11 && \
-          alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \
-          alternatives --set python3 /usr/bin/python3.11 && \
+          # Spark 4.1 python UDF tests require Python >= 3.10, which is not
+          # packaged for CentOS 8; install it via miniconda instead.
+          curl -fsSL -o /tmp/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py311_24.7.1-0-Linux-x86_64.sh && \
+          bash /tmp/miniconda.sh -b -p /opt/miniconda3 && \
+          ln -sf /opt/miniconda3/bin/python3.11 /usr/bin/python3 && \
+          ln -sf /opt/miniconda3/bin/pip3 /usr/bin/pip3 && \
+          python3 --version && \
           pip3 install setuptools==77.0.3 && \
           pip3 install pyspark==3.5.5 cython && \
           pip3 install pandas==2.2.3 pyarrow==20.0.0

Review Comment:
   Resolved: this revision drops the miniconda approach entirely. The Spark 4.1 jobs stay on centos-9-jdk17 with the original `dnf install python3.11` Prepare step (unchanged from main), so there is no longer any symlink mutation of /usr/bin/python3. The workflow file is now identical to main; the only change in this PR is the native link step in cpp/core/CMakeLists.txt.



##########
.github/workflows/velox_backend_x86.yml:
##########
@@ -1207,10 +1207,13 @@ jobs:
           path: ./cpp/build/
       - name: Prepare
         run: |
-          dnf install -y python3.11 python3.11-pip python3.11-devel && \
-          ls -la /usr/bin/python3.11 && \
-          alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \
-          alternatives --set python3 /usr/bin/python3.11 && \
+          # Spark 4.1 python UDF tests require Python >= 3.10, which is not
+          # packaged for CentOS 8; install it via miniconda instead.
+          curl -fsSL -o /tmp/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py311_24.7.1-0-Linux-x86_64.sh && \
+          bash /tmp/miniconda.sh -b -p /opt/miniconda3 && \

Review Comment:
   Resolved: the miniconda download is gone in this revision. The Spark 4.1 jobs stay on centos-9-jdk17 and use the same `dnf install python3.11` step as main, so there is no longer any curl|bash of an external installer. The only change in this PR is the native link step in cpp/core/CMakeLists.txt.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL][CI] Fix Spark 4.1 CI crash: isolate libgluten's bundled libstdc++ [gluten]

Posted by "jackylee-ch (via GitHub)" <gi...@apache.org>.
jackylee-ch commented on PR #12557:
URL: https://github.com/apache/gluten/pull/12557#issuecomment-5015208912

   @philo-he It's not Velox code. libgluten's symbols.map has no local: *, so it exports its bundled gcc-13 libstdc++ symbols (locale facet ids/vtables) globally. When the process also loads the system gcc-11 libstdc++.so.6, those get interposed and the facet layout mismatches → crash. It's been latent; a recent image/runner change (system libstdc++ now new enough to interpose) exposed it. centos-8's older libstdc++ can't interpose, so it hid the bug.
   
   I'm trying another way to fix the problem.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org