You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "xiaojie19852006 (via GitHub)" <gi...@apache.org> on 2025/03/17 07:53:36 UTC
[I] When executing Spark-SQL to run a simple SQL query on an ARM cluster, a thread core dump file is generated [incubator-gluten]
xiaojie19852006 opened a new issue, #9023:
URL: https://github.com/apache/incubator-gluten/issues/9023
### Backend
VL (Velox)
### Bug description
When I execute the query SELECT * FROM tpcds_10000_parquet.time_dim, the Spark application crashes unexpectedly and generates thread core dump files. However, strangely, if I either change the database name to another one or rename the time_dim table to a new name, the query executes successfully without issues.
[hs_err_pid375168.log](https://github.com/user-attachments/files/19281561/hs_err_pid375168.log)
### Spark version
Spark-3.4.x
### Spark configurations
spark.plugins=org.apache.gluten.GlutenPlugin
spark.driver.extraClassPath=/usr/local/spark-3.4.1_ccdp3.7.0_1.0.2/auxlib/gluten-velox-bundle-spark3.4_2.12-ctyunos_2.0.1_aarch_64-test-release.jar
spark.executor.extraClassPath=gluten-velox-bundle-spark3.4_2.12-ctyunos_2.0.1_aarch_64-test-release.jar
spark.jars=/usr/local/spark-3.4.1_ccdp3.7.0_1.0.2/auxlib/gluten-velox-bundle-spark3.4_2.12-ctyunos_2.0.1_aarch_64-test-release.jar
spark.shuffle.manager=org.apache.spark.shuffle.sort.ColumnarShuffleManager
spark.gluten.loadLibFromJar=false
spark.executorEnv.LIBHDFS3_CONF="/usr/local/hadoop3/etc/hadoop/hdfs-site.xml"
spark.gluten.sql.debug=true
spark.gluten.sql.columnar.backend.lib=velox
spark.gluten.sql.columnar.backend.velox.memoryCapRatio=0.75
#spark.gluten.sql.columnar.logicalJoinOptimizeEnable=true
### System information
Gluten Version: 1.3.0
Commit: c9b1002fc28704ff58be462086dd5797b72cf681
CMake Version: 3.31.0
System: Linux-4.19.90-2102.2.0.0062.ctl2.aarch64
Arch: aarch64
CPU Name: Model name: Kunpeng-920
BIOS Model name: HUAWEI Kunpeng 920 5250
C++ Compiler: /usr/local/gcc-13/bin/g++
C++ Compiler Version: 12.2.0
C Compiler: /usr/local/gcc-13/bin/gcc
C Compiler Version: 12.2.0
CMake Prefix Path: /usr/local;/usr;/;/usr/local/cmake-3.31.0-linux-aarch64;/usr/local;/usr/X11R6;/usr/pkg;/opt
### Relevant logs
```bash
```
--
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.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: [I] When executing Spark-SQL to run a simple SQL query on an ARM cluster, a thread core dump file is generated [incubator-gluten]
Posted by "FelixYBW (via GitHub)" <gi...@apache.org>.
FelixYBW commented on issue #9023:
URL: https://github.com/apache/incubator-gluten/issues/9023#issuecomment-2731014088
You may try std::string directly and see if it works.
```c++
std::string ret;
ret.resize(clen + 1);
env->GetStringUTFRegion(string, 0, jlen, ret.data());
return ret;
```
--
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: [I] When executing Spark-SQL to run a simple SQL query on an ARM cluster, a thread core dump file is generated [incubator-gluten]
Posted by "xiaojie19852006 (via GitHub)" <gi...@apache.org>.
xiaojie19852006 commented on issue #9023:
URL: https://github.com/apache/incubator-gluten/issues/9023#issuecomment-2728515408
The same package does not exhibit similar issues in an x86 environment. Through investigation, we located the core dump to the jStringToCString method in cpp/core/jni/JniCommon.h, which is called by the Java_org_apache_gluten_utils_VeloxFileSystemValidationJniWrapper_allSupportedByRegisteredFileSystems method in ./cpp/velox/jni/VeloxJniWrapper.cc. The problem appears to stem from the failure of memory allocation for the buffer array in jStringToCString, which does not throw an exception but causes a core dump. After replacing the fixed-size array with a std::vector, the program runs normally. It seems there is a memory risk with the original array implementation. We recommend fixing it by switching to std::vector or exploring alternative solutions from the community. Are there other approaches suggested by the community?
--
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: [I] When executing Spark-SQL to run a simple SQL query on an ARM cluster, a thread core dump file is generated [incubator-gluten]
Posted by "FelixYBW (via GitHub)" <gi...@apache.org>.
FelixYBW commented on issue #9023:
URL: https://github.com/apache/incubator-gluten/issues/9023#issuecomment-2730964726
Do you mean here?
https://github.com/apache/incubator-gluten/blob/dc6e712845d538aa0db775beab2ad609a16ee182/cpp/core/jni/JniCommon.h#L42-L43
Feel free to submit a PR.
--
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: [I] [VL] When executing Spark-SQL to run a simple SQL query on an ARM cluster, a thread core dump file is generated [incubator-gluten]
Posted by "xiaojie19852006 (via GitHub)" <gi...@apache.org>.
xiaojie19852006 commented on issue #9023:
URL: https://github.com/apache/incubator-gluten/issues/9023#issuecomment-2731766065
Yes, approaches like "+1", upward alignment to 8 bits, or vectorization can all resolve this issue. I noticed the community adopted the "+1" approach, but theoretically, might upward alignment or vectorization be safer? It’s unclear why 80-bit path string lengths trigger exceptions, while other lengths show no issues.
--
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: [I] [VL] When executing Spark-SQL to run a simple SQL query on an ARM cluster, a thread core dump file is generated [incubator-gluten]
Posted by "xiaojie19852006 (via GitHub)" <gi...@apache.org>.
xiaojie19852006 closed issue #9023: [VL] When executing Spark-SQL to run a simple SQL query on an ARM cluster, a thread core dump file is generated
URL: https://github.com/apache/incubator-gluten/issues/9023
--
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