From f550a0686d3f11701b715fa5f9d7229b30f63d30 Mon Sep 17 00:00:00 2001 From: z30043230 Date: Thu, 24 Jul 2025 16:47:36 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=BC=80=E5=8F=91=E8=87=AA=E6=8F=90?= =?UTF-8?q?=E3=80=91=E3=80=90=E5=AE=89=E5=85=A8=E3=80=91bugfix:msmonitor?= =?UTF-8?q?=E5=86=85=E5=AD=98=E6=B3=84=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- msmonitor/plugin/ipc_monitor/NpuIpcClient.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/msmonitor/plugin/ipc_monitor/NpuIpcClient.cpp b/msmonitor/plugin/ipc_monitor/NpuIpcClient.cpp index 93fc9370a..89639e4d0 100644 --- a/msmonitor/plugin/ipc_monitor/NpuIpcClient.cpp +++ b/msmonitor/plugin/ipc_monitor/NpuIpcClient.cpp @@ -59,8 +59,17 @@ std::string IpcClient::IpcClientNpuConfig() for (size_t i = 0; i < size; i++) { req->pids[i] = pids_[i]; } - std::unique_ptr message = Message::ConstructMessage(*req, MSG_TYPE_REQUEST, size); - if (!SyncSendMessage(*message, DYNO_IPC_NAME)) { + std::unique_ptr message; + try{ + message = Message::ConstructMessage(*req, MSG_TYPE_REQUEST, size); + } + catch (const std::exception &e) { + LOG(ERROR) << "ConstructMessage failed: " << e.what(); + free(req); + req = nullptr; + throw; + } + if (!message || !SyncSendMessage(*message, DYNO_IPC_NAME)) { LOG(WARNING) << "Failed to send config to dyno server"; free(req); req = nullptr; -- Gitee