From ad19dd814ff64d1f8b85c37ad680c55b513144cc Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Sat, 15 Apr 2023 18:19:15 +0200 Subject: [PATCH 1/2] PR_SET_NAME workaround AWS Lambdas (and other virtualized platforms) lack of support for PR_SET_NAME causing a blocking exception. Pending an upstream PR or fix in ClickHouse, this patch allows this function to fail unharmed. The resulting executable has been tested on various platforms without drawbacks and discussed in clickhouse issue [29378](https://github.com/ClickHouse/ClickHouse/issues/29378) $ sed -i '/Cannot set thread name/c\' /ClickHouse/src/Common/setThreadName.cpp --- src/Common/setThreadName.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/setThreadName.cpp b/src/Common/setThreadName.cpp index a8c1f001dcc..5e2177d450a 100644 --- a/src/Common/setThreadName.cpp +++ b/src/Common/setThreadName.cpp @@ -45,7 +45,7 @@ void setThreadName(const char * name) #else if (0 != prctl(PR_SET_NAME, name, 0, 0, 0)) #endif - DB::throwFromErrno("Cannot set thread name with prctl(PR_SET_NAME, ...)", DB::ErrorCodes::PTHREAD_ERROR); +// DB::throwFromErrno("Cannot set thread name with prctl(PR_SET_NAME, ...)", DB::ErrorCodes::PTHREAD_ERROR); memcpy(thread_name, name, 1 + strlen(name)); } From d4262944ca9ffdbe58b992cbd6250bae4fcc19d7 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Sat, 15 Apr 2023 18:23:12 +0200 Subject: [PATCH 2/2] Disable AVX2 support --- chdb/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chdb/build.sh b/chdb/build.sh index 329a9fa2fe1..958fd710216 100755 --- a/chdb/build.sh +++ b/chdb/build.sh @@ -43,7 +43,7 @@ elif [ "$(uname)" == "Linux" ]; then GLIBC_COMPATIBILITY="-DGLIBC_COMPATIBILITY=1" UNWIND="-DUSE_UNWIND=1" PYINIT_ENTRY="-Wl,-ePyInit_${CHDB_PY_MOD}" - AVX_SUPPORT="-DENABLE_AVX=1 -DENABLE_AVX2=1" + AVX_SUPPORT="-DENABLE_AVX=1 -DENABLE_AVX2=0" EMBEDDED_COMPILER="-DENABLE_EMBEDDED_COMPILER=1" else echo "OS not supported"