diff --git a/0013-increase-the-pthread-stack-size-of-x86-and-other-env-dsoftbus.patch b/0013-increase-the-pthread-stack-size-of-x86-and-other-env-dsoftbus.patch new file mode 100644 index 0000000000000000000000000000000000000000..598e3507abc618704907ad24019757b301949b35 --- /dev/null +++ b/0013-increase-the-pthread-stack-size-of-x86-and-other-env-dsoftbus.patch @@ -0,0 +1,47 @@ +From f22b729a9ea46420fc31fd630e7182120decd721 Mon Sep 17 00:00:00 2001 +From: heppen +Date: Tue, 27 Jun 2023 17:11:34 +0800 +Subject: [PATCH] increase the pthread stack size of x86 and other env + +--- + adapter/common/kernel/posix/softbus_adapter_thread.c | 3 ++- + core/common/message_handler/message_handler.c | 8 -------- + 2 files changed, 2 insertions(+), 9 deletions(-) + +diff --git a/adapter/common/kernel/posix/softbus_adapter_thread.c b/adapter/common/kernel/posix/softbus_adapter_thread.c +index f6c65e856..33eeaa922 100644 +--- a/adapter/common/kernel/posix/softbus_adapter_thread.c ++++ b/adapter/common/kernel/posix/softbus_adapter_thread.c +@@ -273,7 +273,8 @@ static int32_t SoftBusConfTransPthreadAttr(SoftBusThreadAttr *threadAttr, pthrea + if (stackSize != 0) { + ret = pthread_attr_setstacksize(attr, stackSize); + if (ret != 0) { +- HILOG_ERROR(SOFTBUS_HILOG_ID, "pthread_attr_setstacksize failed, ret[%{public}d]", ret); ++ HILOG_ERROR(SOFTBUS_HILOG_ID, "pthread_attr_setstacksize failed, stacksize[%{public}lu], ret[%{public}d]", ++ stackSize, ret); + return SOFTBUS_ERR; + } + } +diff --git a/core/common/message_handler/message_handler.c b/core/common/message_handler/message_handler.c +index d83ca3e89..12a2be117 100644 +--- a/core/common/message_handler/message_handler.c ++++ b/core/common/message_handler/message_handler.c +@@ -196,15 +196,7 @@ static void *LoopTask(void *arg) + + static int StartNewLooperThread(SoftBusLooper *looper) + { +-#ifdef __aarch64__ + #define MAINLOOP_STACK_SIZE (2 * 1024 * 1024) +-#else +-#ifdef ASAN_BUILD +-#define MAINLOOP_STACK_SIZE 10240 +-#else +-#define MAINLOOP_STACK_SIZE 8192 +-#endif +-#endif + int ret; + SoftBusThreadAttr threadAttr; + SoftBusThread tid; +-- +2.33.0 + diff --git a/distributed-utils.spec b/distributed-utils.spec index df19a10934f13deffd9639a9c7fc03348b8c456a..2c2632e52269255a294ff8bf33daaa62fe44950d 100644 --- a/distributed-utils.spec +++ b/distributed-utils.spec @@ -23,7 +23,7 @@ Name: distributed-utils Version: 1.0.0 -Release: 2 +Release: 3 Summary: Distributed middleware used components. License: Apache-2.0 and MIT Url: https://gitee.com/openharmony/ @@ -58,6 +58,7 @@ Patch9: 0009-remove-dependency-and-adapt-for-build-device_auth.patch Patch10: 0010-adapt-for-build-mbedtls.patch Patch11: 0011-remove-dependency-and-adapt-for-build-device_manager.patch Patch12: 0012-remove-dependency-and-adapt-for-build-device_security_level.patch +Patch13: 0013-increase-the-pthread-stack-size-of-x86-and-other-env-dsoftbus.patch BuildRequires: python3-jinja2 python3-pyyaml cjson cjson-devel BuildRequires: libatomic libicu-devel libxml2-devel openssl-devel @@ -113,6 +114,7 @@ rm -rf %{_builddir}/third_party/mbedtls/* %patch10 -p1 -d %{mbedtls_dir} %patch11 -p1 -d %{device_manager_dir} %patch12 -p1 -d %{device_security_level_dir} +%patch13 -p1 -d %{dsoftbus_dir} # build all components with build.sh %build @@ -206,7 +208,8 @@ cp -rvf single_include/nlohmann %{buildroot}/%{_includedir}/nlohmann_json/single /usr/bin/* %changelog - +* Tue Jun 27 2023 Peng He - 1.0.0-3 +- increase the softbus pthread stack size on x86 and other env. * Sun Jun 25 2023 Peng He - 1.0.0-2 - add missed libs of device_manager. * Tue Jun 20 2023 Peng He - 1.0.0-1