From 715adc13c51782c4d2bea36653aaef4d2b18e30f Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Thu, 27 Nov 2025 15:41:51 +0800 Subject: [PATCH 1/5] deps: upgrade redis-server. --- apps/common/utils/tool_code.py | 2 +- installer/Dockerfile-base | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/common/utils/tool_code.py b/apps/common/utils/tool_code.py index f4fd3d748..9621e59aa 100644 --- a/apps/common/utils/tool_code.py +++ b/apps/common/utils/tool_code.py @@ -254,7 +254,7 @@ exec({dedent(code)!a}) if proc.poll() is None: #如果仍未终止,强制终止 os.killpg(pgid, signal.SIGKILL) proc.wait() - raise Exception(_("Sandbox process execution timeout, consider increasing MAXKB_SANDBOX_PYTHON_PROCESS_TIMEOUT_SECONDS.")) + raise Exception(_("Process execution timed out.")) # 执行超时,到了MAXKB_SANDBOX_PYTHON_PROCESS_TIMEOUT_SECONDS限制 def validate_mcp_transport(self, code_str): servers = json.loads(code_str) diff --git a/installer/Dockerfile-base b/installer/Dockerfile-base index c04a7a6d6..9a48f15d1 100644 --- a/installer/Dockerfile-base +++ b/installer/Dockerfile-base @@ -20,6 +20,8 @@ ARG DEPENDENCIES=" \ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ echo "Asia/Shanghai" > /etc/timezone && \ + echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list && \ + echo -e "Package: redis-server\nPin: release a=testing\nPin-Priority: 501" > /etc/apt/preferences.d/redis #注释:用最新版本redis && \ apt-get update && apt-get install -y --no-install-recommends $DEPENDENCIES && \ chmod 755 /usr/bin/start-*.sh && \ find /etc/ -type f ! -path '/etc/resolv.conf' ! -path '/etc/hosts' | xargs chmod g-rx && \ From 2d0e0b45c4d2bb0c91929fccf15ce5866db1edb6 Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Thu, 27 Nov 2025 15:46:20 +0800 Subject: [PATCH 2/5] deps: upgrade redis-server. --- installer/Dockerfile-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/Dockerfile-base b/installer/Dockerfile-base index 9a48f15d1..e98c26dc1 100644 --- a/installer/Dockerfile-base +++ b/installer/Dockerfile-base @@ -21,7 +21,7 @@ ARG DEPENDENCIES=" \ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ echo "Asia/Shanghai" > /etc/timezone && \ echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list && \ - echo -e "Package: redis-server\nPin: release a=testing\nPin-Priority: 501" > /etc/apt/preferences.d/redis #注释:用最新版本redis && \ + echo -e "Package: redis-server\nPin: release a=testing\nPin-Priority: 501" > /etc/apt/preferences.d/redis && \ apt-get update && apt-get install -y --no-install-recommends $DEPENDENCIES && \ chmod 755 /usr/bin/start-*.sh && \ find /etc/ -type f ! -path '/etc/resolv.conf' ! -path '/etc/hosts' | xargs chmod g-rx && \ From 916a8fe67c7416d7733932159a519bf2651395df Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Thu, 27 Nov 2025 15:53:49 +0800 Subject: [PATCH 3/5] deps: upgrade redis-server. --- installer/Dockerfile-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/Dockerfile-base b/installer/Dockerfile-base index e98c26dc1..e766fe0e7 100644 --- a/installer/Dockerfile-base +++ b/installer/Dockerfile-base @@ -21,7 +21,7 @@ ARG DEPENDENCIES=" \ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ echo "Asia/Shanghai" > /etc/timezone && \ echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list && \ - echo -e "Package: redis-server\nPin: release a=testing\nPin-Priority: 501" > /etc/apt/preferences.d/redis && \ + printf "Package: redis-server\nPin: release a=testing\nPin-Priority: 501\n" > /etc/apt/preferences.d/redis && \ apt-get update && apt-get install -y --no-install-recommends $DEPENDENCIES && \ chmod 755 /usr/bin/start-*.sh && \ find /etc/ -type f ! -path '/etc/resolv.conf' ! -path '/etc/hosts' | xargs chmod g-rx && \ From 3bfe400d70ec6edcf5b7cd52c55b6b7bc9ab33f5 Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Thu, 27 Nov 2025 16:08:58 +0800 Subject: [PATCH 4/5] build: fix gcc error in arm64. --- installer/sandbox.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/installer/sandbox.c b/installer/sandbox.c index 570d0c7b1..c17e0381a 100644 --- a/installer/sandbox.c +++ b/installer/sandbox.c @@ -295,8 +295,12 @@ long syscall(long number, ...) { switch (number) { case SYS_execve: case SYS_execveat: +#ifdef SYS_fork case SYS_fork: +#endif +#ifdef SYS_vfork case SYS_vfork: +#endif case SYS_clone: case SYS_clone3: #ifdef SYS_posix_spawn From 94e60b073f5f9c0bff7b9357a10212997d1a5a02 Mon Sep 17 00:00:00 2001 From: liqiang-fit2cloud Date: Thu, 27 Nov 2025 16:56:20 +0800 Subject: [PATCH 5/5] refactor: optimize timeout exception msg. --- apps/common/utils/tool_code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/utils/tool_code.py b/apps/common/utils/tool_code.py index 9621e59aa..54b9daf2f 100644 --- a/apps/common/utils/tool_code.py +++ b/apps/common/utils/tool_code.py @@ -254,7 +254,7 @@ exec({dedent(code)!a}) if proc.poll() is None: #如果仍未终止,强制终止 os.killpg(pgid, signal.SIGKILL) proc.wait() - raise Exception(_("Process execution timed out.")) # 执行超时,到了MAXKB_SANDBOX_PYTHON_PROCESS_TIMEOUT_SECONDS限制 + raise Exception(_(f"Process execution timed out after {self.process_timeout_seconds} seconds.")) def validate_mcp_transport(self, code_str): servers = json.loads(code_str)