You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/10/11 07:38:35 UTC
[doris] branch master updated: [Bug](aarch64) Fix the BRPC "sched_to itself" error when building BE by Clang on Linux aarch64 (#13270)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 9350c0be80 [Bug](aarch64) Fix the BRPC "sched_to itself" error when building BE by Clang on Linux aarch64 (#13270)
9350c0be80 is described below
commit 9350c0be80036f0d7994f56150f55a6238138dd8
Author: Adonis Ling <ad...@gmail.com>
AuthorDate: Tue Oct 11 15:38:28 2022 +0800
[Bug](aarch64) Fix the BRPC "sched_to itself" error when building BE by Clang on Linux aarch64 (#13270)
---
thirdparty/download-thirdparty.sh | 7 ++++++-
...patch => brpc-fix-clang-15-linkage-error.patch} | 0
.../brpc-fix-linux-aarch64-clang-build.patch | 24 ++++++++++++++++++++++
3 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh
index 65e8fb4f6d..78107520af 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -373,7 +373,12 @@ echo "Finished patching ${AWS_SDK_SOURCE}"
cd "${TP_SOURCE_DIR}/${BRPC_SOURCE}"
if [[ ! -f "${PATCHED_MARK}" ]]; then
- for file in "${TP_PATCH_DIR}"/brpc-1.2.0-*.patch; do
+ # Currently, there are two types of patches for BRPC in Doris:
+ # 1. brpc-fix-*.patch - These patches are not included in upstream but they can fix some bugs in some specific
+ # scenarios.
+ # 2. brpc-{VERSION}-*.patch - These patches are included in upstream but they are not in current VERISON. We
+ # backport some bug fixes to the current VERSION.
+ for file in "${TP_PATCH_DIR}"/brpc-*.patch; do
patch -p1 <"${file}"
done
touch "${PATCHED_MARK}"
diff --git a/thirdparty/patches/brpc-1.2.0-00.patch b/thirdparty/patches/brpc-fix-clang-15-linkage-error.patch
similarity index 100%
rename from thirdparty/patches/brpc-1.2.0-00.patch
rename to thirdparty/patches/brpc-fix-clang-15-linkage-error.patch
diff --git a/thirdparty/patches/brpc-fix-linux-aarch64-clang-build.patch b/thirdparty/patches/brpc-fix-linux-aarch64-clang-build.patch
new file mode 100644
index 0000000000..10410048a0
--- /dev/null
+++ b/thirdparty/patches/brpc-fix-linux-aarch64-clang-build.patch
@@ -0,0 +1,24 @@
+diff --git a/src/bthread/task_group.cpp b/src/bthread/task_group.cpp
+index b8ead163..94ce5eb7 100644
+--- a/src/bthread/task_group.cpp
++++ b/src/bthread/task_group.cpp
+@@ -248,6 +248,9 @@ int TaskGroup::init(size_t runqueue_capacity) {
+ return 0;
+ }
+
++#if defined(__linux__) && defined(__aarch64__) && defined(__clang__)
++ __attribute__((optnone))
++#endif
+ void TaskGroup::task_runner(intptr_t skip_remained) {
+ // NOTE: tls_task_group is volatile since tasks are moved around
+ // different groups.
+@@ -567,6 +570,9 @@ void TaskGroup::sched(TaskGroup** pg) {
+ sched_to(pg, next_tid);
+ }
+
++#if defined(__linux__) && defined(__aarch64__) && defined(__clang__)
++ __attribute__((optnone))
++#endif
+ void TaskGroup::sched_to(TaskGroup** pg, TaskMeta* next_meta) {
+ TaskGroup* g = *pg;
+ #ifndef NDEBUG
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org