kevinw66 opened a new issue, #8894:
URL: https://github.com/apache/incubator-gluten/issues/8894

   ### Backend
   
   VL (Velox)
   
   ### Bug description
   
   Test fails on arm when running 
[VeloxScanSuite](https://github.com/apache/incubator-gluten/blob/ca2ab6ad7d9c461b7ca1eb7b032f460ce4d567ca/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxScanSuite.scala#L111)
 with this assertion 
   ```scala
   assert(
     VeloxFileSystemValidationJniWrapper.allSupportedByRegisteredFileSystems(
       Array("file:/test_path/")))
   ```
   Because in 
[jniCommon.h](https://github.com/apache/incubator-gluten/blob/ca2ab6ad7d9c461b7ca1eb7b032f460ce4d567ca/cpp/core/jni/JniCommon.h#L42)
 file, it will be a one-byte buffer overflow when GetStringUTFRegion writes the 
null terminator with string `file:/test_path/`, causes illegal memory access, 
lead jvm fails with SIGSEGV on arm.
   ```cpp
   static inline std::string jStringToCString(JNIEnv* env, jstring string) {
     int32_t jlen, clen;
     clen = env->GetStringUTFLength(string);
     jlen = env->GetStringLength(string);
     char buffer[clen];
     env->GetStringUTFRegion(string, 0, jlen, buffer);
     return std::string(buffer, clen);
   }
   ```
   
   ### Spark version
   
   None
   
   ### Spark configurations
   
   _No response_
   
   ### System information
   
   _No response_
   
   ### Relevant logs
   
   ```bash
   - tpch q22 subquery filter pushdown - v1
   - tpch q22 subquery filter pushdown - v2
   25/02/24 16:40:00 WARN GlutenFallbackReporter: Validation failed for plan: 
Exchange, due to: [FallbackByBackendSettings] Validation failed on node 
Exchange.
   25/02/24 16:40:00 WARN GlutenFallbackReporter: Validation failed for plan: 
Exchange[QueryId=3636], due to: [FallbackByBackendSettings] Validation failed 
on node Exchange.
   #
   # A fatal error has been detected by the Java Runtime Environment:
   #
   #  SIGSEGV (0xb) at pc=0x0000ff7de4365388, pid=1402, tid=0x0000ff7de38001e0
   #
   # JRE version: OpenJDK Runtime Environment (8.0_312-b07) (build 
1.8.0_312-b07)
   # Java VM: OpenJDK 64-Bit Server VM (25.312-b07 mixed mode linux-aarch64 
compressed oops)
   # Problematic frame:
   # V  [libjvm.so+0x7ef388]  Method::bci_from(unsigned char*) const+0x0
   #
   # Core dump written. Default location: 
/__w/incubator-gluten/incubator-gluten/backends-velox/core or core.1402
   #
   # An error report file with more information is saved as:
   # /__w/incubator-gluten/incubator-gluten/backends-velox/hs_err_pid1402.log
   #
   # If you would like to submit a bug report, please visit:
   #   
https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%208&component=java-1.8.0-openjdk
   #
   [INFO] 
------------------------------------------------------------------------
   [INFO] Reactor Summary for Gluten Parent Pom 1.4.0-SNAPSHOT:
   [INFO] 
   [INFO] Gluten Parent Pom .................................. SUCCESS [  0.575 
s]
   [INFO] Gluten Ras ......................................... SUCCESS [ 12.366 
s]
   [INFO] Gluten Ras Common .................................. SUCCESS [01:08 
min]
   [INFO] Gluten Shims ....................................... SUCCESS [  1.711 
s]
   [INFO] Gluten Shims Common ................................ SUCCESS [ 17.968 
s]
   [INFO] Gluten Shims for Spark 3.2 ......................... SUCCESS [ 21.605 
s]
   [INFO] Gluten UI .......................................... SUCCESS [  5.815 
s]
   [INFO] Gluten Core ........................................ SUCCESS [ 35.077 
s]
   [INFO] Gluten Substrait ................................... SUCCESS [01:03 
min]
   [INFO] Gluten Arrow ....................................... SUCCESS [ 14.678 
s]
   [INFO] Gluten Celeborn .................................... SUCCESS [  4.857 
s]
   [INFO] Gluten Iceberg ..................................... SUCCESS [ 13.327 
s]
   [INFO] Gluten DeltaLake ................................... SUCCESS [ 12.001 
s]
   [INFO] Gluten Hudi ........................................ SUCCESS [ 11.364 
s]
   [INFO] Gluten Backends Velox .............................. FAILURE [22:06 
min]
   [INFO] Gluten Package ..................................... SKIPPED
   [INFO] Gluten Ras Planner ................................. SKIPPED
   [INFO] Gluten Unit Test Parent ............................ SKIPPED
   [INFO] Gluten Unit Test Common ............................ SKIPPED
   [INFO] Gluten Unit Test ................................... SKIPPED
   [INFO] Gluten Unit Test Spark32 ........................... SKIPPED
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  26:51 min
   [INFO] Finished at: 2025-02-24T16:41:09Z
   [INFO] 
------------------------------------------------------------------------
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to